- Timestamp:
- 2019-09-16T18:54:28+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfstp.F90
r11541 r11553 39 39 PRIVATE 40 40 41 PUBLIC isf_stp, isf_ stp_init! routine called in sbcmod and divhor41 PUBLIC isf_stp, isf_init, isf_nam ! routine called in sbcmod and divhor 42 42 43 43 !!---------------------------------------------------------------------- … … 114 114 END SUBROUTINE isf_stp 115 115 116 SUBROUTINE isf_ stp_init116 SUBROUTINE isf_init 117 117 !!--------------------------------------------------------------------- 118 118 !! *** ROUTINE isfstp_init *** … … 127 127 !! - call cav/param init routine 128 128 !!---------------------------------------------------------------------- 129 INTEGER :: inum, ierror 130 INTEGER :: ios ! Local integer output status for namelist read 131 INTEGER :: ikt, ikb 132 INTEGER :: ji, jj 133 !!---------------------------------------------------------------------- 134 NAMELIST/namisf/ ln_isf , & 135 & ln_isfcav_mlt, cn_isfcav_mlt, cn_gammablk, rn_gammat0, rn_gammas0, rn_htbl, sn_isfcav_fwf, & 136 & ln_isfpar_mlt, cn_isfpar_mlt, sn_isfpar_fwf, sn_isfpar_zmin, sn_isfpar_zmax, sn_isfpar_Leff, & 137 & ln_isfcpl , nn_drown, ln_isfcpl_cons, & 138 & cn_isfload , cn_isfdir 139 !!---------------------------------------------------------------------- 129 ! 130 ! constrain: l_isfoasis need to be known 131 ! 132 ! Read namelist 133 CALL isf_nam() 140 134 ! 141 135 ! Allocate public array 142 136 CALL isf_alloc() 143 137 ! 144 ! initalisation of fwf and tsc array to 0 145 riceload(:,:) = 0.0_wp 146 fwfisf_oasis(:,:) = 0.0_wp 147 fwfisf_par(:,:) = 0.0_wp ; fwfisf_par_b(:,:) = 0.0_wp 148 fwfisf_cav(:,:) = 0.0_wp ; fwfisf_cav_b(:,:) = 0.0_wp 149 risf_cav_tsc(:,:,:) = 0.0_wp ; risf_cav_tsc_b(:,:,:) = 0.0_wp 150 risf_par_tsc(:,:,:) = 0.0_wp ; risf_par_tsc_b(:,:,:) = 0.0_wp 151 ! 152 REWIND( numnam_ref ) ! Namelist namsbc_rnf in reference namelist : Runoffs 153 READ ( numnam_ref, namisf, IOSTAT = ios, ERR = 901) 154 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namisf in reference namelist', lwp ) 155 ! 156 REWIND( numnam_cfg ) ! Namelist namsbc_rnf in configuration namelist : Runoffs 157 READ ( numnam_cfg, namisf, IOSTAT = ios, ERR = 902 ) 158 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namisf in configuration namelist', lwp ) 159 IF(lwm) WRITE ( numond, namisf ) 160 ! 138 ! check option compatibility 139 CALL isf_ctl() 140 ! 141 ! compute ice shelf load 142 IF ( ln_isfcav ) CALL isf_load( risfload ) 143 ! 144 ! terminate routine now if no ice shelf melt formulation specify 145 IF ( ln_isf ) THEN 146 ! 147 !--------------------------------------------------------------------------------------------------------------------- 148 ! initialisation melt in the cavity 149 IF ( ln_isfcav_mlt ) THEN 150 ! 151 ! initialisation of cav variable 152 CALL isf_cav_init() 153 ! 154 ! read cav variable from restart 155 IF ( ln_rstart ) CALL isfrst_read('cav', risf_cav_tsc, fwfisf_cav, risf_cav_tsc_b, fwfisf_cav_b) 156 ! 157 END IF 158 ! 159 !--------------------------------------------------------------------------------------------------------------------- 160 ! initialisation parametrised melt 161 IF ( ln_isfpar_mlt ) THEN 162 ! 163 ! initialisation of par variable 164 CALL isf_par_init() 165 ! 166 ! read par variable from restart 167 IF ( ln_rstart ) CALL isfrst_read('par', risf_par_tsc, fwfisf_par, risf_par_tsc_b, fwfisf_par_b) 168 ! 169 END IF 170 ! 171 !--------------------------------------------------------------------------------------------------------------------- 172 ! initialisation ice sheet coupling 173 IF( ln_isfcpl ) THEN 174 ! 175 ! prepare writing restart 176 IF( lwxios ) CALL iom_set_rstw_var_active('ssmask') 177 IF( lwxios ) CALL iom_set_rstw_var_active('tmask') 178 IF( lwxios ) CALL iom_set_rstw_var_active('e3t_n') 179 IF( lwxios ) CALL iom_set_rstw_var_active('e3u_n') 180 IF( lwxios ) CALL iom_set_rstw_var_active('e3v_n') 181 ! 182 END IF 183 ! 184 END IF 185 186 END SUBROUTINE isf_init 187 188 SUBROUTINE isf_ctl()! 161 189 IF (lwp) THEN 162 190 WRITE(numout,*) … … 166 194 ! 167 195 WRITE(numout,*) ' ice shelf cavity (open or parametrised) ln_isf = ', ln_isf 196 WRITE(numout,*) 168 197 ! 169 198 IF ( ln_isf ) THEN … … 181 210 WRITE(numout,*) '' 182 211 ! 183 WRITE(numout,*) ' ice shelf melt parametrisation ln_isfpar_mlt 212 WRITE(numout,*) ' ice shelf melt parametrisation ln_isfpar_mlt = ', ln_isfpar_mlt 184 213 IF ( ln_isfpar_mlt ) THEN 185 214 WRITE(numout,*) ' isf parametrisation formulation cn_isfpar_mlt = ', TRIM(cn_isfpar_mlt) … … 187 216 WRITE(numout,*) '' 188 217 ! 189 WRITE(numout,*) ' Coupling to an ice sheet model ln_isfcpl 218 WRITE(numout,*) ' Coupling to an ice sheet model ln_isfcpl = ', ln_isfcpl 190 219 IF ( ln_isfcpl ) THEN 191 WRITE(numout,*) ' conservation activated ln_isfcpl_cons 192 WRITE(numout,*) ' number of call of the extrapolation loop= ', nn_drown220 WRITE(numout,*) ' conservation activated ln_isfcpl_cons = ', ln_isfcpl_cons 221 WRITE(numout,*) ' number of call of the extrapolation loop = ', nn_drown 193 222 ENDIF 194 223 WRITE(numout,*) '' … … 208 237 END IF 209 238 ! 239 210 240 !--------------------------------------------------------------------------------------------------------------------- 211 ! initialisation ice shelf load 212 IF ( ln_isfcav ) THEN 213 ! 214 ! compute ice shelf mask 215 mskisf_cav(:,:) = (1._wp - tmask(:,:,1)) * ssmask(:,:) 216 ! 217 ! compute ice shelf load 218 CALL isf_load( risfload ) 219 ! 220 END IF 221 ! 222 !--------------------------------------------------------------------------------------------------------------------- 223 ! sanity check 241 ! sanity check ! issue ln_isfcav not yet known as well as l_isfoasis => move this call in isf_stp ? 224 242 ! melt in the cavity without cavity 225 IF ( ln_isfcav_mlt .AND. (.NOT. ln_isfcav) ) &226 & CALL ctl_stop('ice shelf melt in the cavity activated (ln_isfcav_mlt) but no cavity detected in domcfg (ln_isfcav), STOP' )243 IF ( ln_isfcav_mlt .AND. (.NOT. ln_isfcav) ) & 244 & CALL ctl_stop('ice shelf melt in the cavity activated (ln_isfcav_mlt) but no cavity detected in domcfg (ln_isfcav), STOP' ) 227 245 ! 228 246 ! ice sheet coupling without cavity … … 233 251 & CALL ctl_stop( 'The coupling between NEMO and an ice sheet model with the conservation option does not work with the linssh option' ) 234 252 ! 235 IF ( l_isfoasis ) THEN 253 IF ( l_isfoasis .AND. .NOT. ln_isf ) CALL ctl_stop( ' OASIS send ice shelf fluxes to NEMO but NEMO does not have the isf module activated' ) 254 ! 255 IF ( l_isfoasis .AND. ln_isf ) THEN 236 256 ! 237 257 CALL ctl_stop( ' ln_ctl and ice shelf not tested' ) … … 251 271 IF ( TRIM(cn_isfpar_mlt) == 'oasis' .AND. TRIM(cn_isfcav_mlt) == 'oasis' ) CALL ctl_stop( 'cn_isfpar_mlt = oasis and cn_isfcav_mlt = oasis not coded' ) 252 272 END IF 253 END IF 254 ! 255 ! terminate routine now if no ice shelf melt formulation specify 256 IF ( ln_isf ) THEN 257 ! 258 !--------------------------------------------------------------------------------------------------------------------- 259 ! initialisation melt in the cavity 260 IF ( ln_isfcav_mlt ) THEN 261 ! 262 ! initialisation of cav variable 263 CALL isf_cav_init() 264 ! 265 ! read cav variable from restart 266 IF ( ln_rstart ) CALL isfrst_read('cav', risf_cav_tsc, fwfisf_cav, risf_cav_tsc_b, fwfisf_cav_b) 267 ! 268 END IF 269 ! 270 !--------------------------------------------------------------------------------------------------------------------- 271 ! initialisation parametrised melt 272 IF ( ln_isfpar_mlt ) THEN 273 ! 274 ! initialisation of par variable 275 CALL isf_par_init() 276 ! 277 ! read par variable from restart 278 IF ( ln_rstart ) CALL isfrst_read('par', risf_par_tsc, fwfisf_par, risf_par_tsc_b, fwfisf_par_b) 279 ! 280 END IF 281 ! 282 !--------------------------------------------------------------------------------------------------------------------- 283 ! initialisation ice sheet coupling 284 IF( ln_isfcpl ) THEN 285 ! 286 ! prepare writing restart 287 IF( lwxios ) CALL iom_set_rstw_var_active('ssmask') 288 IF( lwxios ) CALL iom_set_rstw_var_active('tmask') 289 IF( lwxios ) CALL iom_set_rstw_var_active('e3t_n') 290 IF( lwxios ) CALL iom_set_rstw_var_active('e3u_n') 291 IF( lwxios ) CALL iom_set_rstw_var_active('e3v_n') 292 ! 293 IF( ln_rstart ) THEN 294 ! 295 CALL isf_alloc_cpl() 296 ! 297 ! extrapolation tracer properties 298 CALL isfcpl_tra() 299 ! 300 ! correction of the horizontal divergence and associated temp. and salt content flux 301 CALL isfcpl_vol() 302 ! 303 ! apply the 'conservation' method 304 IF ( ln_isfcpl_cons ) CALL isfcpl_cons() 305 ! 306 ! Need to : - include in the cpl cons the risfcpl_vol/tsc contribution 307 ! - decide how to manage thickness level change in conservation 308 ! 309 tsb (:,:,:,:) = tsn (:,:,:,:) 310 sshb (:,:) = sshn(:,:) 311 ub (:,:,:) = un(:,:,:) 312 vb (:,:,:) = vn(:,:,:) 313 ! 314 END IF 315 ! 316 END IF 317 ! 318 END IF 319 320 END SUBROUTINE isf_stp_init 273 ! 274 END IF 275 END SUBROUTINE isf_ctl 276 ! 277 SUBROUTINE isf_nam 278 !!--------------------------------------------------------------------- 279 !! *** ROUTINE isf_nam *** 280 !! 281 !! ** Purpose : Read ice shelf namelist cfg and ref 282 !! 283 !!---------------------------------------------------------------------- 284 INTEGER :: ios ! Local integer output status for namelist read 285 !!---------------------------------------------------------------------- 286 NAMELIST/namisf/ ln_isf , & 287 & ln_isfcav_mlt, cn_isfcav_mlt, cn_gammablk, rn_gammat0, rn_gammas0, rn_htbl, sn_isfcav_fwf, & 288 & ln_isfpar_mlt, cn_isfpar_mlt, sn_isfpar_fwf, sn_isfpar_zmin, sn_isfpar_zmax, sn_isfpar_Leff, & 289 & ln_isfcpl , nn_drown, ln_isfcpl_cons, & 290 & cn_isfload , cn_isfdir 291 !!---------------------------------------------------------------------- 292 ! 293 REWIND( numnam_ref ) ! Namelist namsbc_rnf in reference namelist : Runoffs 294 READ ( numnam_ref, namisf, IOSTAT = ios, ERR = 901) 295 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namisf in reference namelist', lwp ) 296 ! 297 REWIND( numnam_cfg ) ! Namelist namsbc_rnf in configuration namelist : Runoffs 298 READ ( numnam_cfg, namisf, IOSTAT = ios, ERR = 902 ) 299 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namisf in configuration namelist', lwp ) 300 IF(lwm) WRITE ( numond, namisf ) 301 302 END SUBROUTINE isf_nam 303 !! 321 304 !!====================================================================== 322 305 END MODULE isfstp
Note: See TracChangeset
for help on using the changeset viewer.