SURFEX v8.1
General documentation of Surfex
read_default_seafluxn.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_seaflux_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 sea-ice scheme
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 !
51 USE modd_diag_n, ONLY : diag_options_t
53 USE modd_ocean_n, ONLY : ocean_t
54 USE modd_seaflux_n, ONLY : seaflux_t
55 !
57 !
58 USE mode_pos_surf
59 !
61 USE modi_get_default_nam_n
62 USE modi_get_luout
63 !
64 USE modd_read_namelist, ONLY : lnam_read
66 !
67 USE yomhook ,ONLY : lhook, dr_hook
68 USE parkind1 ,ONLY : jprb
69 !
70 IMPLICIT NONE
71 !
72 !* 0.1 Declarations of arguments
73 ! -------------------------
74 !
75 !
76 TYPE(ch_seaflux_t), INTENT(INOUT) :: CHS
77 TYPE(diag_ocean_t), INTENT(INOUT) :: DOC
78 TYPE(diag_options_t), INTENT(INOUT) :: DGO
79 TYPE(diag_misc_seaice_t), INTENT(INOUT) :: DGMSI
80 TYPE(ocean_t), INTENT(INOUT) :: O
81 TYPE(seaflux_t), INTENT(INOUT) :: S
82 !
83  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling ISBA
84 !
85 !* 0.2 Declarations of local variables
86 ! -------------------------------
87 !
88 !
89 LOGICAL :: GFOUND ! Return code when searching namelist
90 INTEGER :: ILUOUT ! output listing logical unit
91 INTEGER :: ILUDES ! .des file logical unit
92 INTEGER :: IMI
93 REAL(KIND=JPRB) :: ZHOOK_HANDLE
94 !-------------------------------------------------------------------------------
95 !
96 IF (lhook) CALL dr_hook('READ_DEFAULT_SEAFLUX_N',0,zhook_handle)
97  CALL get_luout(hprogram,iluout)
98 !
99  CALL get_default_nam_n(hprogram,'READ ',iludes)
100 !
101 IF (iludes==0 .AND. lhook) CALL dr_hook('READ_DEFAULT_SEAFLUX_N',1,zhook_handle)
102 IF (iludes==0) RETURN
103 !
105 !
106 IF (imi.NE.-1 .AND. lnam_read) THEN
107  CALL init_nam_seafluxn(o, s)
108  CALL init_nam_diag_surfn(dgo)
109  CALL init_nam_ch_seafluxn(chs)
110  CALL init_nam_diag_oceann(doc)
111  CALL init_nam_seaicen(dgmsi, s)
112 ENDIF
113 !
114 IF (lnam_read) THEN
115  !
116  !* reading of namelist
117  ! -------------------
118  !
119  CALL posnam(iludes,'NAM_SEAFLUXN',gfound,iluout)
120  IF (gfound) READ(unit=iludes,nml=nam_seafluxn)
121  CALL posnam(iludes,'NAM_DIAG_SURFN',gfound,iluout)
122  IF (gfound) READ(unit=iludes,nml=nam_diag_surfn)
123  CALL posnam(iludes,'NAM_CH_SEAFLUXN',gfound,iluout)
124  IF (gfound) READ(unit=iludes,nml=nam_ch_seafluxn)
125  CALL posnam(iludes,'NAM_DIAG_OCEANN',gfound,iluout)
126  IF (gfound) READ(unit=iludes,nml=nam_diag_oceann)
127  !
128  CALL posnam(iludes,'NAM_SEAICEN',gfound,iluout)
129  IF (gfound) READ(unit=iludes,nml=nam_seaicen)
130  !
131  CALL test_nam_var_surf(iluout,'CSEA_FLUX',csea_flux,'DIRECT','ITERAT','ECUME ','ECUME6','COARE3')
132  CALL test_nam_var_surf(iluout,'CSEA_ALB', csea_alb, 'UNIF','TA96','MK10','RS14')
133  CALL test_nam_var_surf(iluout,'CCH_DRY_DEP',cch_dry_dep,' ','WES89 ','NONE ')
134  CALL test_nam_var_surf(iluout,'CINTERPOL_SST',cinterpol_sst,'LINEAR','UNIF ','QUADRA','NONE ')
135  CALL test_nam_var_surf(iluout,'CINTERPOL_SSS',cinterpol_sss,'LINEAR','UNIF ','QUADRA','NONE ')
136  CALL test_nam_var_surf(iluout,'CINTERPOL_SIC',cinterpol_sic,'LINEAR','UNIF ','NONE ')
137  CALL test_nam_var_surf(iluout,'CINTERPOL_SIT',cinterpol_sit,'LINEAR','UNIF ','NONE ')
138 
139 ENDIF
140 !
141 IF (imi.NE.-1) THEN
142  CALL update_nam_seafluxn(o, s)
143  CALL update_nam_diag_surfn(dgo)
144  CALL update_nam_ch_seafluxn(chs)
145  CALL update_nam_diag_oceann(doc)
146  CALL update_nam_seaicen(dgmsi, s)
147 ENDIF
148 IF (lhook) CALL dr_hook('READ_DEFAULT_SEAFLUX_N',1,zhook_handle)
149 !
150 !
151 !-------------------------------------------------------------------------------
152 !
153 END SUBROUTINE read_default_seaflux_n
subroutine init_nam_ch_seafluxn(CHS)
character(len=6) cinterpol_sic
subroutine get_default_nam_n(HPROGRAM, HACTION, KLUDES, ONAM_WRITTEN)
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)
integer, parameter jprb
Definition: parkind1.F90:32
character(len=4) csea_alb
character(len=6) cinterpol_sst
subroutine read_default_seaflux_n(CHS, DOC, DGO, DGMSI, O, S, HPR
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 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)