SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
read_default_surf_atm.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 read_default_surf_atm(HPROGRAM)
7 ! #######################################################
8 !
9 !!**** *READ_DEFAULT_SURF_ATM* - routine to read the default general configuration for surface
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !!** METHOD
15 !! ------
16 !!
17 !! EXTERNAL
18 !! --------
19 !!
20 !!
21 !! IMPLICIT ARGUMENTS
22 !! ------------------
23 !!
24 !! REFERENCE
25 !! ---------
26 !!
27 !!
28 !! AUTHOR
29 !! ------
30 !! V. Masson *Meteo France*
31 !!
32 !! MODIFICATIONS
33 !! -------------
34 !! Original 01/2003
35 !-------------------------------------------------------------------------------
36 !
37 !* 0. DECLARATIONS
38 ! ------------
39 !
40 USE mode_pos_surf
41 !
42 USE modi_get_luout
43 USE modi_get_default_nam_n
44 !
45 USE modd_read_namelist, ONLY : lnam_read
46 !
48 USE modn_surf_atm
50 !
51 !
52 USE yomhook ,ONLY : lhook, dr_hook
53 USE parkind1 ,ONLY : jprb
54 !
55 IMPLICIT NONE
56 !
57 !* 0.1 Declarations of arguments
58 ! -------------------------
59 !
60  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! program calling GROUND
61 !
62 !* 0.2 Declarations of local variables
63 ! -------------------------------
64 !
65 !
66 LOGICAL :: gfound ! Return code when searching namelist
67 INTEGER :: iluout ! output listing logical unit
68 INTEGER :: iludes ! .des file logical unit
69 REAL(KIND=JPRB) :: zhook_handle
70 !-------------------------------------------------------------------------------
71 !
72 IF (lhook) CALL dr_hook('READ_DEFAULT_SURF_ATM',0,zhook_handle)
73  CALL get_luout(hprogram,iluout)
74 !
75  CALL get_default_nam_n(hprogram,'READ ',iludes)
76 !
77 IF (iludes==0 .AND. lhook) CALL dr_hook('READ_DEFAULT_SURF_ATM',1,zhook_handle)
78 IF (iludes==0) RETURN
79 !
80 !* reading of file with default value
81 ! ----------------------------------
82 !
83  CALL posnam(iludes,'NAM_CHS_ORILAM',gfound,iluout)
84 IF (gfound) READ(unit=iludes,nml=nam_chs_orilam)
85  CALL posnam(iludes,'NAM_SURF_ATM',gfound,iluout)
86 IF (gfound) READ(unit=iludes,nml=nam_surf_atm)
87  CALL posnam(iludes,'NAM_WRITE_SURF_ATM',gfound,iluout)
88 IF (gfound) READ(unit=iludes,nml=nam_write_surf_atm)
89 IF (lhook) CALL dr_hook('READ_DEFAULT_SURF_ATM',1,zhook_handle)
90 !
91 !
92 !-------------------------------------------------------------------------------
93 !
94 END SUBROUTINE read_default_surf_atm
subroutine read_default_surf_atm(HPROGRAM)
subroutine posnam(KULNAM, HDNAML, OFOUND, KLUOUT)
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:6
subroutine get_default_nam_n(HPROGRAM, HACTION, KLUDES)