SURFEX v8.1
General documentation of Surfex
read_ideal_confn.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_ideal_conf_n (DGO, HPROGRAM)
7 ! #######################################################
8 !
9 !!**** *READ_IDEAL_CONF* - routine to read the configuration for IDEAL
10 !! (MESONH universe)
11 !!
12 !! PURPOSE
13 !! -------
14 !!
15 !!** METHOD
16 !! ------
17 !!
18 !! EXTERNAL
19 !! --------
20 !!
21 !!
22 !! IMPLICIT ARGUMENTS
23 !! ------------------
24 !!
25 !! REFERENCE
26 !! ---------
27 !!
28 !!
29 !! AUTHOR
30 !! ------
31 !! V. Masson *Meteo France*
32 !!
33 !! MODIFICATIONS
34 !! -------------
35 !! Original 01/2003
36 !-------------------------------------------------------------------------------
37 !
38 !* 0. DECLARATIONS
39 ! ------------
40 !
41 !
42 !
43 USE modd_diag_n, ONLY : diag_options_t
44 !
46 !
47 USE mode_pos_surf
48 USE modi_get_luout
49 USE modi_open_namelist
50 USE modi_close_namelist
51 !
52 USE modn_ideal_n
53 !
54 USE modd_read_namelist, ONLY : lnam_read
55 USE modd_surf_par, ONLY : xundef
56 !
57 !
58 USE yomhook ,ONLY : lhook, dr_hook
59 USE parkind1 ,ONLY : jprb
60 !
61 IMPLICIT NONE
62 !
63 !* 0.1 Declarations of arguments
64 ! -------------------------
65 !
66 !
67 TYPE(diag_options_t), INTENT(INOUT) :: DGO
68 !
69  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA
70 
71 !
72 !* 0.2 Declarations of local variables
73 ! -------------------------------
74 !
75 !
76 LOGICAL :: GFOUND ! Return code when searching namelist
77 INTEGER :: ILUOUT ! logical unit of output file
78 INTEGER :: INAM ! logical unit of namelist file
79 INTEGER :: IMI
80 REAL(KIND=JPRB) :: ZHOOK_HANDLE
81 !-------------------------------------------------------------------------------
82 !
83 !* get output listing file logical unit
84 !
85 IF (lhook) CALL dr_hook('READ_IDEAL_CONF_N',0,zhook_handle)
86  CALL get_luout(hprogram,iluout)
87 !
89 !
90 IF (imi.NE.-1 .AND. lnam_read) CALL init_nam_diag_surfn(dgo)
91 !
92 IF (lnam_read) THEN
93  !
94  !* open namelist file
95  !
96  CALL open_namelist(hprogram,inam)
97  !
98  !* reading of namelist
99  ! -------------------
100  !
101  CALL posnam(inam,'NAM_DIAG_SURFN',gfound,iluout)
102  IF (gfound) READ(unit=inam,nml=nam_diag_surfn)
103  !
104  !* close namelist file
105  !
106  CALL close_namelist(hprogram,inam)
107 !
108 ENDIF
109 !
110 IF (imi.NE.-1) CALL update_nam_diag_surfn(dgo)
111 IF (lhook) CALL dr_hook('READ_IDEAL_CONF_N',1,zhook_handle)
112 !
113 !-------------------------------------------------------------------------------
114 !
115 !* surface time-step forced by the atmosphere
116 !
117 !
118 !-------------------------------------------------------------------------------
119 !
120 END SUBROUTINE read_ideal_conf_n
subroutine init_nam_diag_surfn(DGO)
Definition: modn_idealn.F90:59
integer function get_current_model_index_surfex()
subroutine posnam(KULNAM, HDNAML, OFOUND, KLUOUT)
real, parameter xundef
integer, parameter jprb
Definition: parkind1.F90:32
subroutine read_ideal_conf_n(DGO, HPROGRAM)
subroutine close_namelist(HPROGRAM, KLUNAM)
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:7
logical lhook
Definition: yomhook.F90:15
subroutine update_nam_diag_surfn(DGO)
Definition: modn_idealn.F90:82
subroutine open_namelist(HPROGRAM, KLUNAM, HFILE)