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