Changeset 11553
- Timestamp:
- 2019-09-16T18:54:28+02:00 (5 years ago)
- Location:
- NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DOM/domain.F90
r11521 r11553 26 26 !!---------------------------------------------------------------------- 27 27 USE oce ! ocean variables 28 USE isfstp 28 29 USE dom_oce ! domain: ocean 29 30 USE sbc_oce ! surface boundary condition: ocean … … 448 449 #endif 449 450 ! 451 ! need to know ln_isfcpl for istate (restart extrapolation) 452 ! and for domvvl_init (ssh extrapolation when recompute e3 variable 453 CALL isf_nam 454 ! 450 455 END SUBROUTINE dom_nam 451 456 -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DOM/domvvl.F90
r11521 r11553 822 822 CALL isfcpl_ssh() 823 823 ! 824 ! e verything need to compute over new water column824 ! e3t need to be computed where ice shelf draft changed (new ht_0) 825 825 id1 = 0 ; id2 = 0 ; id3 = 0 ; id4 = 0 ; id5 = 0 826 826 ! -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/IOM/restart.F90
r11523 r11553 19 19 !!---------------------------------------------------------------------- 20 20 USE oce ! ocean dynamics and tracers 21 USE isf ! ice shelf 22 USE isfcpl ! ice shelf coupling 21 23 USE dom_oce ! ocean space and time domain 22 24 USE sbc_ice ! only lk_si3 … … 282 284 ENDIF 283 285 ! 286 ! ice sheet coupling: extrapolation of restart to fill new wet cell and compute divergence correction 287 IF ( ln_isfcpl ) CALL isfcpl_init() 288 ! 284 289 IF( neuler == 0 ) THEN ! Euler restart (neuler=0) 285 290 tsb (:,:,:,:) = tsn (:,:,:,:) ! all before fields set to now values -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isf.F90
r11541 r11553 182 182 ierr = 0 183 183 ! 184 ALLOCATE( risfcpl_ssh(jpi,jpj), risfcpl_tsc(jpi,jpj,jpk,jpts) , risfcpl_vol(jpi,jpj,jpk) , & 185 & risfcpl_cons_tsc(jpi,jpj,jpk,jpts) , risfcpl_cons_vol(jpi,jpj,jpk) , & 186 & risfcpl_cons_tsc_b(jpi,jpj,jpk,jpts) , risfcpl_cons_vol_b(jpi,jpj,jpk), & 187 risfcpl_cons_ssh_b(jpi,jpj), risfcpl_cons_ssh(jpi,jpj), STAT=ialloc ) 188 ierr = ierr + ialloc 184 ALLOCATE( risfcpl_ssh(jpi,jpj), risfcpl_tsc(jpi,jpj,jpk,jpts), risfcpl_vol(jpi,jpj,jpk), STAT=ialloc ) 185 ierr = ierr + ialloc 186 ! 187 risfcpl_tsc(:,:,:,:) = 0.0 ; risfcpl_vol(:,:,:) = 0.0 ; risfcpl_ssh(:,:) = 0.0 188 189 IF ( ln_isfcpl_cons) THEN 190 ALLOCATE( risfcpl_cons_tsc(jpi,jpj,jpk,jpts) , risfcpl_cons_vol(jpi,jpj,jpk) ,risfcpl_cons_ssh(jpi,jpj), STAT=ialloc ) 191 ierr = ierr + ialloc 192 ! 193 risfcpl_cons_tsc(:,:,:,:) = 0.0 ; risfcpl_cons_vol(:,:,:) = 0.0 ; risfcpl_cons_ssh(:,:) = 0.0 194 ! 195 END IF 189 196 ! 190 197 CALL mpp_sum ( 'isf', ierr ) … … 226 233 CALL mpp_sum ( 'isf', ierr ) 227 234 IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'isf: failed to allocate arrays.' ) 235 ! 236 ! initalisation of fwf and tsc array to 0 237 risfload(:,:) = 0.0_wp 238 fwfisf_oasis(:,:) = 0.0_wp 239 fwfisf_par(:,:) = 0.0_wp ; fwfisf_par_b(:,:) = 0.0_wp 240 fwfisf_cav(:,:) = 0.0_wp ; fwfisf_cav_b(:,:) = 0.0_wp 241 risf_cav_tsc(:,:,:) = 0.0_wp ; risf_cav_tsc_b(:,:,:) = 0.0_wp 242 risf_par_tsc(:,:,:) = 0.0_wp ; risf_par_tsc_b(:,:,:) = 0.0_wp 243 ! 228 244 229 245 END SUBROUTINE isf_alloc -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcav.F90
r11541 r11553 192 192 END SELECT 193 193 ! 194 ! compute mask 195 mskisf_cav(:,:) = (1._wp - tmask(:,:,1)) * ssmask(:,:) 196 ! 194 197 END SUBROUTINE isf_cav_init 195 198 -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfload.F90
r11541 r11553 73 73 !!---------------------------------------------------------------------- 74 74 ! 75 ! print76 IF(lwp) WRITE(numout,*)77 IF(lwp) WRITE(numout,*) ' ice shelf case: set the ice-shelf load following isomip case'78 !79 75 znad = 1._wp !- To use density and not density anomaly 80 76 ! -
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 -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/SBC/sbccpl.F90
r11521 r11553 474 474 srcv(jpr_icb)%clname = 'OIceberg' ; IF( TRIM( sn_rcv_icb%cldes) == 'coupled' ) srcv(jpr_icb)%laction = .TRUE. 475 475 476 IF( srcv(jpr_isf)%laction .AND. ln_isf) THEN476 IF( srcv(jpr_isf)%laction ) THEN 477 477 l_isfoasis = .TRUE. ! -> isf fwf comes from oasis 478 478 IF(lwp) WRITE(numout,*) -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/nemogcm.F90
r11403 r11553 435 435 RETURN ! end of initialization 436 436 ENDIF 437 ! 437 438 438 439 CALL istate_init ! ocean initial state (Dynamics and tracers) … … 453 454 ! ! Active tracers 454 455 IF( ln_traqsr ) CALL tra_qsr_init ! penetrative solar radiation qsr 455 CALL isf_stp_init ! ice shelf456 456 CALL tra_bbc_init ! bottom heat flux 457 457 CALL tra_bbl_init ! advective (and/or diffusive) bottom boundary layer scheme … … 476 476 ! ! Icebergs 477 477 CALL icb_init( rdt, nit000) ! initialise icebergs instance 478 479 ! ice shelf 480 CALL isf_init 478 481 479 482 ! ! Misc. options
Note: See TracChangeset
for help on using the changeset viewer.