SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
read_seaflux_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_seaflux_conf_n (CHS, DGO, DGS, DGSI, O, S, &
7  hprogram)
8 ! #############################################################
9 !
10 !!**** *READ_SEAFLUX_CONF* - routine to read the configuration for SEAFLUX
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 !! Modified 01/2006 : sea flux parameterization.
37 !! Modified 09/2013 : S. Senesi : introduce 1D version of sea-ice model Gelato
38 !! Modified 01/2015 : R. Séférian: introduce ocean surface albedo
39 !-------------------------------------------------------------------------------
40 !
41 !* 0. DECLARATIONS
42 ! ------------
43 !
44 !
45 !
46 !
47 !
48 !
49 !
50 !
55 USE modd_ocean_n, ONLY : ocean_t
56 USE modd_seaflux_n, ONLY : seaflux_t
57 !
59 !
60 USE mode_pos_surf
61 !
63 USE modi_get_luout
64 USE modi_open_namelist
65 USE modi_close_namelist
66 !
68 !
69 USE modd_read_namelist, ONLY : lnam_read
70 USE modd_surf_par, ONLY : xundef
71 !
72 !
73 USE yomhook ,ONLY : lhook, dr_hook
74 USE parkind1 ,ONLY : jprb
75 !
76 IMPLICIT NONE
77 !
78 !* 0.1 Declarations of arguments
79 ! -------------------------
80 !
81 !
82 TYPE(ch_seaflux_t), INTENT(INOUT) :: chs
83 TYPE(diag_ocean_t), INTENT(INOUT) :: dgo
84 TYPE(diag_seaflux_t), INTENT(INOUT) :: dgs
85 TYPE(diag_seaice_t), INTENT(INOUT) :: dgsi
86 TYPE(ocean_t), INTENT(INOUT) :: o
87 TYPE(seaflux_t), INTENT(INOUT) :: s
88 !
89  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! program calling ISBA
90 !
91 !* 0.2 Declarations of local variables
92 ! -------------------------------
93 !
94 !
95 LOGICAL :: gfound ! Return code when searching namelist
96 INTEGER :: iluout ! logical unit of output file
97 INTEGER :: inam ! logical unit of namelist file
98 INTEGER :: imi
99 REAL(KIND=JPRB) :: zhook_handle
100 !-------------------------------------------------------------------------------
101 !
102 !* get output listing file logical unit
103 !
104 IF (lhook) CALL dr_hook('READ_SEAFLUX_CONF_N',0,zhook_handle)
105  CALL get_luout(hprogram,iluout)
106 !
108 !
109 IF (imi.NE.-1 .AND. lnam_read) THEN
110  CALL init_nam_seafluxn(o, s)
111  CALL init_nam_diag_surfn(dgs)
112  CALL init_nam_ch_seafluxn(chs)
113  CALL init_nam_diag_oceann(dgo)
114  CALL init_nam_seaicen(dgsi, s)
115 ENDIF
116 !
117 IF (lnam_read) THEN
118  !
119  !* open namelist file
120  !
121  CALL open_namelist(hprogram,inam)
122  !
123  !* reading of namelist
124  ! -------------------
125  !
126  CALL posnam(inam,'NAM_SEAFLUXN',gfound,iluout)
127  IF (gfound) READ(unit=inam,nml=nam_seafluxn)
128  CALL posnam(inam,'NAM_DIAG_SURFN',gfound,iluout)
129  IF (gfound) READ(unit=inam,nml=nam_diag_surfn)
130  CALL posnam(inam,'NAM_CH_SEAFLUXN',gfound,iluout)
131  IF (gfound) READ(unit=inam,nml=nam_ch_seafluxn)
132  CALL posnam(inam,'NAM_DIAG_OCEANN',gfound,iluout)
133  IF (gfound) READ(unit=inam,nml=nam_diag_oceann)
134  !
135  CALL posnam(inam,'NAM_SEAICEN',gfound,iluout)
136  IF (gfound) READ(unit=inam,nml=nam_seaicen)
137 
138  !
139  CALL test_nam_var_surf(iluout,'CSEA_FLUX',csea_flux,'DIRECT','ITERAT','ECUME ','ECUME6','COARE3')
140  CALL test_nam_var_surf(iluout,'CSEA_ALB',csea_alb,'UNIF','TA96','MK10','RS14')
141  CALL test_nam_var_surf(iluout,'CCH_DRY_DEP',cch_dry_dep,' ','WES89 ','NONE ')
142  CALL test_nam_var_surf(iluout,'CINTERPOL_SST',cinterpol_sst,'LINEAR','UNIF ','QUADRA','NONE ')
143  CALL test_nam_var_surf(iluout,'CINTERPOL_SSS',cinterpol_sss,'LINEAR','UNIF ','QUADRA','NONE ')
144  CALL test_nam_var_surf(iluout,'CINTERPOL_SIC',cinterpol_sic,'LINEAR','UNIF ','NONE ')
145  CALL test_nam_var_surf(iluout,'CINTERPOL_SIT',cinterpol_sit,'LINEAR','UNIF ','NONE ')
146  !
147  !
148  !* close namelist file
149  !
150  CALL close_namelist(hprogram,inam)
151  !
152 ENDIF
153 !
154 IF (imi.NE.-1) THEN
155  CALL update_nam_seafluxn(o, s)
156  CALL update_nam_diag_surfn(dgs)
157  CALL update_nam_ch_seafluxn(chs)
158  CALL update_nam_diag_oceann(dgo)
159  CALL update_nam_seaicen(dgsi, s)
160 ENDIF
161 !
162 !-------------------------------------------------------------------------------
163 !
164 !* surface time-step forced by the atmosphere
165 !
166 xtstep = xundef
167 IF (lhook) CALL dr_hook('READ_SEAFLUX_CONF_N',1,zhook_handle)
168 !
169 !-------------------------------------------------------------------------------
170 !
171 END SUBROUTINE read_seaflux_conf_n
subroutine update_nam_ch_seafluxn(CHS)
subroutine init_nam_ch_seafluxn(CHS)
subroutine init_nam_seaicen(DGSI, S)
subroutine init_nam_diag_surfn(DGF)
subroutine read_seaflux_conf_n(CHS, DGO, DGS, DGSI, O, S, HPROGRAM)
subroutine update_nam_diag_surfn(DGF)
subroutine close_namelist(HPROGRAM, KLUNAM)
subroutine posnam(KULNAM, HDNAML, OFOUND, KLUOUT)
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:6
subroutine init_nam_diag_oceann(DGO)
subroutine update_nam_seafluxn(O, S)
subroutine update_nam_seaicen(DGSI, S)
subroutine update_nam_diag_oceann(DGO)
subroutine open_namelist(HPROGRAM, KLUNAM, HFILE)
integer function get_current_model_index_surfex()
subroutine init_nam_seafluxn(O, S)