SURFEX v8.1
General documentation of Surfex
town_presence.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6 SUBROUTINE town_presence (HFILETYPE,OTEB,HDIR)
7 ! #################################################################################
8 !
9 !
10 !
11 !
13 !
14 USE yomhook ,ONLY : lhook, dr_hook
15 USE parkind1 ,ONLY : jprb
16 !
17 IMPLICIT NONE
18 !
19 !* 0.1 declarations of arguments
20 !
21 !
22 !
23  CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! type of input file
24 LOGICAL, INTENT(OUT) :: OTEB ! TRUE if TEB data exist in the file
25  CHARACTER(LEN=1), INTENT(IN), OPTIONAL :: HDIR
26 !
27 !* 0.2 declarations of local variables
28 !
29  CHARACTER(LEN=1) :: YDIR
30 INTEGER :: IRESP ! reading return code
31  CHARACTER(LEN=6) :: YTOWN ! scheme for towns in input file
32 INTEGER :: IDIM_TOWN ! number of TEB points in input file
33 REAL(KIND=JPRB) :: ZHOOK_HANDLE
34 !-------------------------------------------------------------------------------------
35 !
36 !* 1. reads if TEB fields exist in the input file
37 ! -------------------------------------------
38 !
39 IF (lhook) CALL dr_hook('TOWN_PRESENCE',0,zhook_handle)
40 !
41 ydir = 'H'
42 IF (PRESENT(hdir)) ydir = hdir
43 !
44 ytown = ''
45 idim_town = 0
46  CALL read_surf(hfiletype,'TOWN',ytown,iresp,hdir=ydir)
47  CALL read_surf(hfiletype,'DIM_TOWN',idim_town,iresp,hdir=ydir)
48 !
49 oteb = (ytown=='TEB ') .AND. (idim_town > 0)
50 IF (lhook) CALL dr_hook('TOWN_PRESENCE',1,zhook_handle)
51 !
52 !---------------------------------------------------------------------------------------
53 !
54 END SUBROUTINE town_presence
subroutine town_presence(HFILETYPE, OTEB, HDIR)
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15