SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
init_read_data_cover.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 init_read_data_cover(HPROGRAM)
7 ! ##########################################################################
8 !!
9 !! PURPOSE
10 !! -------
11 !! initialyse flag to read or not data for covers in external binary files
12 !! ecoclimapI_covers_param.bin & ecoclimapII_eu_covers_param.bin
13 !!
14 !! METHOD
15 !! ------
16 !!
17 !! EXTERNAL
18 !! --------
19 !!
20 !!
21 !! IMPLICIT ARGUMENTS
22 !! ------------------
23 !!
24 !!
25 !! REFERENCE
26 !! ---------
27 !!
28 !! AUTHOR
29 !! ------
30 !!
31 !! V. Masson Meteo-France
32 !!
33 !! MODIFICATION
34 !! ------------
35 !!
36 !! Original 09/11
37 !----------------------------------------------------------------------------
38 !
39 !* 0. DECLARATION
40 ! -----------
41 !
42 USE modi_open_namelist
43 USE modi_close_namelist
44 USE modi_get_luout
45 !
46 USE modd_data_cover, ONLY : lread_data_cover
47 !
48 USE mode_pos_surf
49 !
50 !
51 USE yomhook ,ONLY : lhook, dr_hook
52 USE parkind1 ,ONLY : jprb
53 !
54 IMPLICIT NONE
55 !
56 !* 0.1 Declaration of dummy arguments
57 ! ------------------------------
58 !
59  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! program calling READ_PGD
60 !
61 !
62 !* 0.2 Declaration of local variables
63 ! ------------------------------
64 !
65 INTEGER :: iluout ! logical unit
66 INTEGER :: ilunam ! logical unit
67 !
68 LOGICAL :: gfound
69 REAL(KIND=JPRB) :: zhook_handle
70 !
71 !
72 !* 0.2 local namelist variables
73 ! ------------------------
74 !
75 namelist/nam_read_data_cover/lread_data_cover
76 !------------------------------------------------------------------------------
77 !
78 !* 1. defaults
79 !
80 IF (lhook) CALL dr_hook('INIT_READ_DATA_COVER',0,zhook_handle)
81 !
82 !
83 lread_data_cover = .true.
84 !
85 #ifdef SFX_MNH
86 IF (hprogram=='MESONH') lread_data_cover = .false.
87 #endif
88 !
89 !------------------------------------------------------------------------------
90 !
91 !* 2. opening of namelist
92 !
93  CALL get_luout(hprogram,iluout)
94 !
95  CALL open_namelist(hprogram,ilunam)
96 !
97 !-------------------------------------------------------------------------------
98 !
99 !* 3. reading of namelist
100 !
101  CALL posnam(ilunam,'NAM_READ_DATA_COVER',gfound,iluout)
102 IF (gfound) READ(unit=ilunam,nml=nam_read_data_cover)
103 !
104 !-------------------------------------------------------------------------------
105 !
106 !* 5. close namelist file
107 !
108  CALL close_namelist(hprogram,ilunam)
109 IF (lhook) CALL dr_hook('INIT_READ_DATA_COVER',1,zhook_handle)
110 !
111 !-------------------------------------------------------------------------------
112 !
113 END SUBROUTINE init_read_data_cover
subroutine init_read_data_cover(HPROGRAM)
subroutine close_namelist(HPROGRAM, KLUNAM)
subroutine posnam(KULNAM, HDNAML, OFOUND, KLUOUT)
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:6
subroutine open_namelist(HPROGRAM, KLUNAM, HFILE)