Changeset 12068
- Timestamp:
- 2019-12-05T13:18:21+01:00 (4 years ago)
- Location:
- NEMO/branches/2019/UKMO_MERGE_2019
- Files:
-
- 6 deleted
- 58 edited
- 5 copied
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/UKMO_MERGE_2019/cfgs/SHARED/field_def_nemo-oce.xml
r11777 r12068 264 264 265 265 <!-- * variable related to ice shelf forcing * --> 266 <field id="fwfisf" long_name="Ice shelf melting" unit="kg/m2/s" /> 267 <field id="fwfisf3d" long_name="Ice shelf melting" unit="kg/m2/s" grid_ref="grid_T_3D" /> 268 <field id="qlatisf" long_name="Ice shelf latent heat flux" unit="W/m2" /> 269 <field id="qlatisf3d" long_name="Ice shelf latent heat flux" unit="W/m2" grid_ref="grid_T_3D" /> 270 <field id="qhcisf" long_name="Ice shelf heat content flux" unit="W/m2" /> 271 <field id="qhcisf3d" long_name="Ice shelf heat content flux" unit="W/m2" grid_ref="grid_T_3D" /> 272 <field id="isfgammat" long_name="transfert coefficient for isf (temperature) " unit="m/s" /> 273 <field id="isfgammas" long_name="transfert coefficient for isf (salinity) " unit="m/s" /> 274 <field id="stbl" long_name="salinity in the Losh tbl " unit="PSU" /> 275 <field id="ttbl" long_name="temperature in the Losh tbl " unit="C" /> 276 <field id="utbl" long_name="zonal current in the Losh tbl at T point " unit="m/s" /> 277 <field id="vtbl" long_name="merid current in the Losh tbl at T point " unit="m/s" /> 278 <field id="thermald" long_name="thermal driving of ice shelf melting " unit="C" /> 279 <field id="tfrz" long_name="top freezing point (used to compute melt) " unit="C" /> 280 <field id="tinsitu" long_name="top insitu temperature (used to cmpt melt) " unit="C" /> 281 <field id="ustar" long_name="ustar at T point used in ice shelf melting " unit="m/s" /> 266 <field id="isftfrz_par" long_name="fzp temperature at ocean/isf interface" unit="degC" /> 267 <field id="isftfrz_cav" long_name="fzp temperature at ocean/isf interface" unit="degC" /> 268 <field id="fwfisf_cav" long_name="Ice shelf melting" unit="kg/m2/s" /> 269 <field id="fwfisf_par" long_name="Ice shelf melting" unit="kg/m2/s" /> 270 <field id="qoceisf_cav" long_name="Ice shelf ocean heat flux" unit="W/m2" /> 271 <field id="qoceisf_par" long_name="Ice shelf ocean heat flux" unit="W/m2" /> 272 <field id="qlatisf_cav" long_name="Ice shelf latent heat flux" unit="W/m2" /> 273 <field id="qlatisf_par" long_name="Ice shelf latent heat flux" unit="W/m2" /> 274 <field id="qhcisf_cav" long_name="Ice shelf heat content flux" unit="W/m2" /> 275 <field id="qhcisf_par" long_name="Ice shelf heat content flux" unit="W/m2" /> 276 <field id="fwfisf3d_cav" long_name="Ice shelf melting" unit="kg/m2/s" grid_ref="grid_T_3D" /> 277 <field id="fwfisf3d_par" long_name="Ice shelf melting" unit="kg/m2/s" grid_ref="grid_T_3D" /> 278 <field id="qoceisf3d_cav" long_name="Ice shelf ocean heat flux" unit="W/m2" grid_ref="grid_T_3D" /> 279 <field id="qoceisf3d_par" long_name="Ice shelf ocean heat flux" unit="W/m2" grid_ref="grid_T_3D" /> 280 <field id="qlatisf3d_cav" long_name="Ice shelf latent heat flux" unit="W/m2" grid_ref="grid_T_3D" /> 281 <field id="qlatisf3d_par" long_name="Ice shelf latent heat flux" unit="W/m2" grid_ref="grid_T_3D" /> 282 <field id="qhcisf3d_cav" long_name="Ice shelf heat content flux" unit="W/m2" grid_ref="grid_T_3D" /> 283 <field id="qhcisf3d_par" long_name="Ice shelf heat content flux" unit="W/m2" grid_ref="grid_T_3D" /> 284 <field id="ttbl_cav" long_name="temperature in the tracer sample depth " unit="C" /> 285 <field id="ttbl_par" long_name="temperature in the tracer sample depth " unit="C" /> 286 <field id="isfthermald_cav" long_name="thermal driving of ice shelf melting " unit="C" /> 287 <field id="isfthermald_par" long_name="thermal driving of ice shelf melting " unit="C" /> 288 <field id="isfgammat" long_name="transfert coefficient for isf (temperature) " unit="m/s" /> 289 <field id="isfgammas" long_name="transfert coefficient for isf (salinity) " unit="m/s" /> 290 <field id="stbl" long_name="salinity in the Losh tbl " unit="PSU" /> 291 <field id="utbl" long_name="zonal current in the Losh tbl at T point " unit="m/s" /> 292 <field id="vtbl" long_name="merid current in the Losh tbl at T point " unit="m/s" /> 293 <field id="isfustar" long_name="ustar at T point used in ice shelf melting " unit="m/s" /> 294 <field id="qconisf" long_name="Conductive heat flux through the ice shelf" unit="W/m2" /> 282 295 283 296 <!-- *_oce variables available with ln_blk_clio or ln_blk_core --> -
NEMO/branches/2019/UKMO_MERGE_2019/cfgs/SHARED/namelist_ref
r11836 r12068 5 5 !! namelists 2 - Surface boundary (namsbc, namsbc_flx, namsbc_blk, namsbc_cpl, 6 6 !! namsbc_sas, namtra_qsr, namsbc_rnf, 7 !! nam sbc_isf, namsbc_iscpl, namsbc_apr,7 !! namisf, namsbc_apr, 8 8 !! namsbc_ssr, namsbc_wave, namberg) 9 9 !! 3 - lateral boundary (namlbc, namagrif, nambdy, nambdy_tide) … … 51 51 cn_ocerst_out = "restart" ! suffix of ocean restart name (output) 52 52 cn_ocerst_outdir = "." ! directory in which to write output ocean restarts 53 ln_iscpl = .false. ! cavity evolution forcing or coupling to ice sheet model54 53 nn_istate = 0 ! output the initial state (1) or not (0) 55 54 ln_rst_list = .false. ! output restarts at list of times using nn_stocklist (T) or at set frequency with nn_stock (F) … … 72 71 !----------------------------------------------------------------------- 73 72 ln_linssh = .false. ! =T linear free surface ==>> model level are fixed in time 74 rn_isfhmin = 1.00 ! treshold [m] to discriminate grounding ice from floating ice75 73 ! 76 74 rn_rdt = 5400. ! time step for the dynamics and tracer … … 79 77 ln_crs = .false. ! Logical switch for coarsening module (T => fill namcrs) 80 78 ! 81 ln_meshmask = . false. ! =T create a mesh file79 ln_meshmask = .true. ! =T create a mesh file 82 80 / 83 81 !----------------------------------------------------------------------- … … 184 182 !! namsbc_rnf river runoffs (ln_rnf =T) 185 183 !! namsbc_apr Atmospheric Pressure (ln_apr_dyn =T) 186 !! namsbc_isf ice shelf melting/freezing (ln_isfcav =T : read (ln_read_cfg=T) or set or usr_def_zgr )187 !! namsbc_iscpl coupling option between land ice model and ocean (ln_isfcav =T)188 184 !! namsbc_wave external fields from wave model (ln_wave =T) 189 185 !! namberg iceberg floats (ln_icebergs=T) … … 222 218 ln_rnf = .false. ! runoffs (T => fill namsbc_rnf) 223 219 ln_apr_dyn = .false. ! Patm gradient added in ocean & ice Eqs. (T => fill namsbc_apr ) 224 ln_isf = .false. ! ice shelf (T => fill namsbc_isf & namsbc_iscpl)225 220 ln_wave = .false. ! Activate coupling with wave (T => fill namsbc_wave) 226 221 ln_cdgw = .false. ! Neutral drag coefficient read from wave model (T => ln_wave=.true. & fill namsbc_wave) … … 439 434 / 440 435 !----------------------------------------------------------------------- 441 &namsbc_isf ! Top boundary layer (ISF) (ln_isfcav =T : read (ln_read_cfg=T) 442 !----------------------------------------------------------------------- or set or usr_def_zgr ) 443 ! ! type of top boundary layer 444 nn_isf = 1 ! ice shelf melting/freezing 445 ! 1 = presence of ISF ; 2 = bg03 parametrisation 446 ! 3 = rnf file for ISF ; 4 = ISF specified freshwater flux 447 ! options 1 and 4 need ln_isfcav = .true. (domzgr) 448 ! ! nn_isf = 1 or 2 cases: 449 rn_gammat0 = 1.e-4 ! gammat coefficient used in blk formula 450 rn_gammas0 = 1.e-4 ! gammas coefficient used in blk formula 451 ! ! nn_isf = 1 or 4 cases: 452 rn_hisf_tbl = 30. ! thickness of the top boundary layer (Losh et al. 2008) 453 ! ! 0 => thickness of the tbl = thickness of the first wet cell 454 ! ! nn_isf = 1 case 455 nn_isfblk = 1 ! 1 ISOMIP like: 2 equations formulation (Hunter et al., 2006) 456 ! ! 2 ISOMIP+ like: 3 equations formulation (Asay-Davis et al., 2015) 457 nn_gammablk = 1 ! 0 = cst Gammat (= gammat/s) 458 ! ! 1 = velocity dependend Gamma (u* * gammat/s) (Jenkins et al. 2010) 459 ! ! 2 = velocity and stability dependent Gamma (Holland et al. 1999) 460 461 !___________!_____________!___________________!___________!_____________!_________!___________!__________!__________!_______________! 462 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask ! 463 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename ! 464 !* nn_isf = 4 case 465 sn_fwfisf = 'rnfisf' , -12. ,'sowflisf' , .false. , .true. , 'yearly' , '' , '' , '' 466 !* nn_isf = 3 case 467 sn_rnfisf = 'rnfisf' , -12. ,'sofwfisf' , .false. , .true. , 'yearly' , '' , '' , '' 468 !* nn_isf = 2 and 3 cases 469 sn_depmax_isf ='rnfisf' , -12. ,'sozisfmax', .false. , .true. , 'yearly' , '' , '' , '' 470 sn_depmin_isf ='rnfisf' , -12. ,'sozisfmin', .false. , .true. , 'yearly' , '' , '' , '' 471 !* nn_isf = 2 case 472 sn_Leff_isf = 'rnfisf' , -12. ,'Leff' , .false. , .true. , 'yearly' , '' , '' , '' 473 / 474 !----------------------------------------------------------------------- 475 &namsbc_iscpl ! land ice / ocean coupling option (ln_isfcav =T : read (ln_read_cfg=T) 476 !----------------------------------------------------------------------- or set or usr_def_zgr ) 477 nn_drown = 10 ! number of iteration of the extrapolation loop (fill the new wet cells) 478 ln_hsb = .false. ! activate conservation module (conservation exact after a time of rn_fiscpl) 479 nn_fiscpl = 43800 ! (number of time step) conservation period (maybe should be fix to the coupling frequencey of restart frequency) 436 &namisf ! Top boundary layer (ISF) (default: OFF) 437 !----------------------------------------------------------------------- 438 ! 439 ! ---------------- ice shelf load ------------------------------- 440 ! 441 cn_isfload = 'isomip' ! scheme to compute ice shelf load (ln_isfcav = .true. in domain_cfg.nc) 442 ! 443 ! ---------------- ice shelf melt formulation ------------------------------- 444 ! 445 ln_isf = .false. ! activate ice shelf module 446 ln_isfdebug = .false. ! add debug print in ISF code (global min/max/sum of specific variable) 447 cn_isfdir = './' ! directory for all ice shelf input file 448 ! 449 ! ---------------- cavities opened ------------------------------- 450 ! 451 ln_isfcav_mlt = .false. ! ice shelf melting into the cavity (need ln_isfcav = .true. in domain_cfg.nc) 452 cn_isfcav_mlt = '3eq' ! ice shelf melting formulation (spe/2eq/3eq/oasis) 453 ! ! spe = fwfisf is read from a forcing field 454 ! ! 2eq = ISOMIP like: 2 equations formulation (Hunter et al., 2006) 455 ! ! 3eq = ISOMIP+ like: 3 equations formulation (Asay-Davis et al., 2015) 456 ! ! oasis = fwfisf is given by oasis and pattern by file sn_isfcav_fwf 457 ! ! cn_isfcav_mlt = 2eq or 3eq cases: 458 cn_gammablk = 'ad15' ! scheme to compute gammat/s (spe,ad15,hj99) 459 ! ! ad15 = velocity dependend Gamma (u* * gammat/s) (Jenkins et al. 2010) 460 ! ! hj99 = velocity and stability dependent Gamma (Holland et al. 1999) 461 rn_gammat0 = 1.4e-2 ! gammat coefficient used in blk formula 462 rn_gammas0 = 4.e-4 ! gammas coefficient used in blk formula 463 ! 464 rn_htbl = 30. ! thickness of the top boundary layer (Losh et al. 2008) 465 ! ! 0 => thickness of the tbl = thickness of the first wet cell 466 ! 467 !* 'spe' and 'oasis' case 468 !___________!_____________!___________________!___________!_____________!_________!___________!__________!__________!_______________! 469 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask ! 470 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename ! 471 sn_isfcav_fwf = 'isfmlt_cav', -12. , 'fwflisf' , .false. , .true. , 'yearly' , '' , '' , '' 472 ! 473 ! ---------------- cavities parametrised ------------------------------- 474 ! 475 ln_isfpar_mlt = .false. ! ice shelf melting parametrised 476 cn_isfpar_mlt = 'spe' ! ice shelf melting parametrisation (spe/bg03/oasis) 477 ! ! spe = fwfisf is read from a forcing field 478 ! ! bg03 = melt computed using Beckmann and Goosse parametrisation 479 ! ! oasis = fwfisf is given by oasis and pattern by file sn_isfpar_fwf 480 ! 481 !* all cases 482 !___________!_____________!___________________!___________!_____________!_________!___________!__________!__________!_______________! 483 ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask ! 484 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename ! 485 sn_isfpar_zmax = 'isfmlt_par', 0 ,'sozisfmax', .false. , .true. , 'yearly' , '' , '' , '' 486 sn_isfpar_zmin = 'isfmlt_par', 0 ,'sozisfmin', .false. , .true. , 'yearly' , '' , '' , '' 487 !* 'spe' and 'oasis' case 488 sn_isfpar_fwf = 'isfmlt_par' , -12. ,'sofwfisf' , .false. , .true. , 'yearly' , '' , '' , '' 489 !* 'bg03' case 490 sn_isfpar_Leff = 'isfmlt_par', 0. ,'Leff' , .false. , .true. , 'yearly' , '' , '' , '' 491 ! 492 ! ---------------- ice sheet coupling ------------------------------- 493 ! 494 ln_isfcpl = .false. 495 nn_drown = 10 ! number of iteration of the extrapolation loop (fill the new wet cells) 496 ln_isfcpl_cons = .false. 480 497 / 481 498 !----------------------------------------------------------------------- … … 1200 1217 &nam_diatmb ! Top Middle Bottom Output (default: OFF) 1201 1218 !----------------------------------------------------------------------- 1202 ln_diatmb = . false. ! Choose Top Middle and Bottom output or not1219 ln_diatmb = .true. ! Choose Top Middle and Bottom output or not 1203 1220 / 1204 1221 !----------------------------------------------------------------------- -
NEMO/branches/2019/UKMO_MERGE_2019/cfgs/ref_cfgs.txt
r9775 r12068 9 9 ORCA2_ICE_PISCES OCE TOP ICE NST 10 10 SPITZ12 OCE ICE 11 WED025 OCE ICE -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/BDY/bdyvol.F90
r11822 r12068 16 16 USE dom_oce ! ocean space and time domain 17 17 USE phycst ! physical constants 18 USE sbcisf! ice shelf18 USE isf ! ice shelf 19 19 ! 20 20 USE in_out_manager ! I/O manager … … 77 77 ! Calculate the cumulate surface Flux z_cflxemp (m3/s) over all the domain 78 78 ! ----------------------------------------------------------------------- 79 IF ( kc == 1 ) z_cflxemp = glob_sum( 'bdyvol', ( emp(:,:) - rnf(:,:) + fwfisf (:,:) ) * bdytmask(:,:) * e1e2t(:,:) ) / rau079 IF ( kc == 1 ) z_cflxemp = glob_sum( 'bdyvol', ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) ) * bdytmask(:,:) * e1e2t(:,:) ) / rau0 80 80 81 81 ! Compute bdy surface each cycle if non linear free surface -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DIA/diahsb.F90
r11822 r12068 18 18 USE sbc_oce ! surface thermohaline fluxes 19 19 USE sbcrnf ! river runoff 20 USE sbcisf! ice shelves20 USE isf ! ice shelves 21 21 USE domvvl ! vertical scale factors 22 22 USE traqsr ! penetrative solar radiation … … 48 48 REAL(wp), DIMENSION(:,:) , ALLOCATABLE :: ssh_hc_loc_ini, ssh_sc_loc_ini ! 49 49 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: hc_loc_ini, sc_loc_ini, e3t_ini ! 50 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmask_ini 50 51 51 52 !! * Substitutions … … 92 93 ! 1 - Trends due to forcing ! 93 94 ! ------------------------- ! 94 z_frc_trd_v = r1_rau0 * glob_sum( 'diahsb', - ( emp(:,:) - rnf(:,:) + fwfisf (:,:) ) * surf(:,:) ) ! volume fluxes95 z_frc_trd_v = r1_rau0 * glob_sum( 'diahsb', - ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) ) * surf(:,:) ) ! volume fluxes 95 96 z_frc_trd_t = glob_sum( 'diahsb', sbc_tsc(:,:,jp_tem) * surf(:,:) ) ! heat fluxes 96 97 z_frc_trd_s = glob_sum( 'diahsb', sbc_tsc(:,:,jp_sal) * surf(:,:) ) ! salt fluxes … … 99 100 IF( ln_rnf_sal) z_frc_trd_s = z_frc_trd_s + glob_sum( 'diahsb', rnf_tsc(:,:,jp_sal) * surf(:,:) ) 100 101 ! ! Add ice shelf heat & salt input 101 IF( ln_isf ) z_frc_trd_t = z_frc_trd_t + glob_sum( 'diahsb', risf_tsc(:,:,jp_tem) * surf(:,:) ) 102 IF( ln_isf ) z_frc_trd_t = z_frc_trd_t & 103 & + glob_sum( 'diahsb', ( risf_cav_tsc(:,:,jp_tem) + risf_par_tsc(:,:,jp_tem) ) * surf(:,:) ) 102 104 ! ! Add penetrative solar radiation 103 105 IF( ln_traqsr ) z_frc_trd_t = z_frc_trd_t + r1_rau0_rcp * glob_sum( 'diahsb', qsr (:,:) * surf(:,:) ) … … 156 158 ! 157 159 DO jk = 1, jpkm1 ! volume variation (calculated with scale factors) 158 zwrk(:,:,jk) = ( surf(:,:)*e3t(:,:,jk,Kmm) - surf_ini(:,:)*e3t_ini(:,:,jk) ) * tmask(:,:,jk)160 zwrk(:,:,jk) = surf(:,:)*e3t(:,:,jk,Kmm)*tmask(:,:,jk) - surf_ini(:,:)*e3t_ini(:,:,jk)*tmask_ini(:,:,jk) 159 161 END DO 160 zdiff_v2 = glob_sum_full( 'diahsb', zwrk(:,:,:) ) 162 zdiff_v2 = glob_sum_full( 'diahsb', zwrk(:,:,:) ) ! glob_sum_full needed as tmask and tmask_ini could be different 161 163 DO jk = 1, jpkm1 ! heat content variation 162 zwrk(:,:,jk) = ( surf(:,:)*e3t(:,:,jk,Kmm)*ts(:,:,jk,jp_tem,Kmm) - surf_ini(:,:)*hc_loc_ini(:,:,jk) ) * tmask(:,:,jk)164 zwrk(:,:,jk) = ( surf(:,:)*e3t(:,:,jk,Kmm)*ts(:,:,jk,jp_tem,Kmm) - surf_ini(:,:)*hc_loc_ini(:,:,jk) ) 163 165 END DO 164 166 zdiff_hc = glob_sum_full( 'diahsb', zwrk(:,:,:) ) 165 167 DO jk = 1, jpkm1 ! salt content variation 166 zwrk(:,:,jk) = ( surf(:,:)*e3t(:,:,jk,Kmm)*ts(:,:,jk,jp_sal,Kmm) - surf_ini(:,:)*sc_loc_ini(:,:,jk) ) * tmask(:,:,jk)168 zwrk(:,:,jk) = ( surf(:,:)*e3t(:,:,jk,Kmm)*ts(:,:,jk,jp_sal,Kmm) - surf_ini(:,:)*sc_loc_ini(:,:,jk) ) 167 169 END DO 168 170 zdiff_sc = glob_sum_full( 'diahsb', zwrk(:,:,:) ) … … 188 190 zwrk(:,:,jk) = surf(:,:) * e3t(:,:,jk,Kmm) * tmask(:,:,jk) 189 191 END DO 190 zvol_tot = glob_sum _full( 'diahsb', zwrk(:,:,:) )192 zvol_tot = glob_sum( 'diahsb', zwrk(:,:,:) ) 191 193 192 194 !!gm to be added ? … … 272 274 CALL iom_get( numror, jpdom_autoglo, 'ssh_ini' , ssh_ini , ldxios = lrxios ) 273 275 CALL iom_get( numror, jpdom_autoglo, 'e3t_ini' , e3t_ini , ldxios = lrxios ) 276 CALL iom_get( numror, jpdom_autoglo, 'tmask_ini' , tmask_ini , ldxios = lrxios ) 274 277 CALL iom_get( numror, jpdom_autoglo, 'hc_loc_ini', hc_loc_ini, ldxios = lrxios ) 275 278 CALL iom_get( numror, jpdom_autoglo, 'sc_loc_ini', sc_loc_ini, ldxios = lrxios ) … … 287 290 ! if ice sheet/oceqn coupling, need to mask ini variables here (mask could change at the next NEMO instance). 288 291 e3t_ini (:,:,jk) = e3t(:,:,jk,Kmm) * tmask(:,:,jk) ! initial vertical scale factors 292 tmask_ini (:,:,jk) = tmask(:,:,jk) ! initial mask 289 293 hc_loc_ini(:,:,jk) = ts(:,:,jk,jp_tem,Kmm) * e3t(:,:,jk,Kmm) * tmask(:,:,jk) ! initial heat content 290 294 sc_loc_ini(:,:,jk) = ts(:,:,jk,jp_sal,Kmm) * e3t(:,:,jk,Kmm) * tmask(:,:,jk) ! initial salt content … … 327 331 CALL iom_rstput( kt, nitrst, numrow, 'ssh_ini' , ssh_ini , ldxios = lwxios ) 328 332 CALL iom_rstput( kt, nitrst, numrow, 'e3t_ini' , e3t_ini , ldxios = lwxios ) 333 CALL iom_rstput( kt, nitrst, numrow, 'tmask_ini' , tmask_ini , ldxios = lwxios ) 329 334 CALL iom_rstput( kt, nitrst, numrow, 'hc_loc_ini', hc_loc_ini, ldxios = lwxios ) 330 335 CALL iom_rstput( kt, nitrst, numrow, 'sc_loc_ini', sc_loc_ini, ldxios = lwxios ) … … 400 405 ! ------------------- ! 401 406 ALLOCATE( hc_loc_ini(jpi,jpj,jpk), sc_loc_ini(jpi,jpj,jpk), surf_ini(jpi,jpj), & 402 & e3t_ini(jpi,jpj,jpk), surf(jpi,jpj), ssh_ini(jpi,jpj), STAT=ierror )407 & e3t_ini(jpi,jpj,jpk), surf(jpi,jpj), ssh_ini(jpi,jpj), tmask_ini(jpi,jpj,jpk),STAT=ierror ) 403 408 IF( ierror > 0 ) THEN 404 409 CALL ctl_stop( 'dia_hsb_init: unable to allocate hc_loc_ini' ) ; RETURN -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DIA/diawri.F90
r11822 r12068 26 26 !!---------------------------------------------------------------------- 27 27 USE oce ! ocean dynamics and tracers 28 USE isf 29 USE isfcpl 28 30 USE dom_oce ! ocean space and time domain 29 31 USE phycst ! physical constants … … 881 883 INTEGER , INTENT( in ) :: Kmm ! time level index 882 884 CHARACTER (len=* ), INTENT( in ) :: cdfile_name ! name of the file created 885 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zisfdebug 883 886 !! 884 INTEGER :: inum 887 INTEGER :: inum, jk 885 888 !!---------------------------------------------------------------------- 886 889 ! … … 906 909 CALL iom_rstput( 0, 0, inum, 'vovecrtz', ww ) ! now k-velocity 907 910 ENDIF 911 CALL iom_rstput( 0, 0, inum, 'risfdep', risfdep ) ! now k-velocity 912 CALL iom_rstput( 0, 0, inum, 'ht' , ht ) ! now water column height 913 IF ( ln_isf ) THEN 914 IF (ln_isfcav_mlt) THEN 915 CALL iom_rstput( 0, 0, inum, 'fwfisf_cav', fwfisf_cav ) ! now k-velocity 916 CALL iom_rstput( 0, 0, inum, 'rhisf_cav_tbl', rhisf_tbl_cav ) ! now k-velocity 917 CALL iom_rstput( 0, 0, inum, 'rfrac_cav_tbl', rfrac_tbl_cav ) ! now k-velocity 918 CALL iom_rstput( 0, 0, inum, 'misfkb_cav', REAL(misfkb_cav,8) ) ! now k-velocity 919 CALL iom_rstput( 0, 0, inum, 'misfkt_cav', REAL(misfkt_cav,8) ) ! now k-velocity 920 END IF 921 IF (ln_isfpar_mlt) THEN 922 CALL iom_rstput( 0, 0, inum, 'isfmsk_par', REAL(mskisf_par,8) ) ! now k-velocity 923 CALL iom_rstput( 0, 0, inum, 'fwfisf_par', fwfisf_par ) ! now k-velocity 924 CALL iom_rstput( 0, 0, inum, 'rhisf_par_tbl', rhisf_tbl_par ) ! now k-velocity 925 CALL iom_rstput( 0, 0, inum, 'rfrac_par_tbl', rfrac_tbl_par ) ! now k-velocity 926 CALL iom_rstput( 0, 0, inum, 'misfkb_par', REAL(misfkb_par,8) ) ! now k-velocity 927 CALL iom_rstput( 0, 0, inum, 'misfkt_par', REAL(misfkt_par,8) ) ! now k-velocity 928 END IF 929 END IF 930 931 IF ( ln_isf ) THEN 932 IF (ln_isfcav_mlt) CALL iom_rstput( 0, 0, inum, 'mskisf_cav', REAL(mskisf_cav,8), ktype = jp_i1 ) 933 IF (ln_isfpar_mlt) CALL iom_rstput( 0, 0, inum, 'mskisf_par', REAL(mskisf_par,8), ktype = jp_i1 ) 934 END IF 935 908 936 IF( ALLOCATED(ahtu) ) THEN 909 937 CALL iom_rstput( 0, 0, inum, 'ahtu', ahtu ) ! aht at u-point -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/dom_oce.F90
r11480 r12068 33 33 LOGICAL , PUBLIC :: ln_linssh !: =T linear free surface ==>> model level are fixed in time 34 34 LOGICAL , PUBLIC :: ln_meshmask !: =T create a mesh-mask file (mesh_mask.nc) 35 REAL(wp), PUBLIC :: rn_isfhmin !: threshold to discriminate grounded ice to floating ice36 35 REAL(wp), PUBLIC :: rn_rdt !: time step for the dynamics and tracer 37 36 REAL(wp), PUBLIC :: rn_atfp !: asselin time filter parameter 38 37 INTEGER , PUBLIC :: nn_euler !: =0 start with forward time step or not (=1) 39 LOGICAL , PUBLIC :: ln_iscpl !: coupling with ice sheet40 38 LOGICAL , PUBLIC :: ln_crs !: Apply grid coarsening to dynamical model output or online passive tracers 41 39 … … 166 164 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: e3t_1d , e3w_1d !: reference vertical scale factors at T- and W-pts (m) 167 165 166 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: risfdep, bathy 168 167 169 168 !!---------------------------------------------------------------------- … … 178 177 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tmask_h !: internal domain T-point mask (Figure 8.5 NEMO book) 179 178 180 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: misfdep !: top first ocean level (ISF) 181 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mikt, miku, mikv, mikf !: top first wet T-, U-, V-, F-level (ISF) 182 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: risfdep !: Iceshelf draft (ISF) 179 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mikt, miku, mikv, mikf !: top first wet T-, U-, V-, F-level (ISF) 183 180 184 181 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ssmask, ssumask, ssvmask !: surface mask at T-,U-, V- and F-pts … … 276 273 & STAT=ierr(6) ) 277 274 ! 278 ! 279 ALLOCATE( gdept_1d(jpk) , gdepw_1d(jpk) , e3t_1d(jpk) , e3w_1d(jpk) , STAT=ierr(7) ) 275 ALLOCATE( risfdep(jpi,jpj) , bathy(jpi,jpj) , STAT=ierr(7) ) 276 ! 277 ALLOCATE( gdept_1d(jpk) , gdepw_1d(jpk) , e3t_1d(jpk) , e3w_1d(jpk) , STAT=ierr(8) ) 280 278 ! 281 279 ALLOCATE( tmask_i(jpi,jpj) , tmask_h(jpi,jpj) , & … … 283 281 & mbkt (jpi,jpj) , mbku (jpi,jpj) , mbkv (jpi,jpj) , STAT=ierr(9) ) 284 282 ! 285 ALLOCATE( misfdep(jpi,jpj) , mikt(jpi,jpj) , miku(jpi,jpj) , & 286 & risfdep(jpi,jpj) , mikv(jpi,jpj) , mikf(jpi,jpj) , STAT=ierr(10) ) 283 ALLOCATE( mikt(jpi,jpj), miku(jpi,jpj), mikv(jpi,jpj), mikf(jpi,jpj), STAT=ierr(10) ) 287 284 ! 288 285 ALLOCATE( tmask(jpi,jpj,jpk) , umask(jpi,jpj,jpk) , & -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domain.F90
r11822 r12068 142 142 ! Read in masks to define closed seas and lakes 143 143 ! 144 DO jj = 1, jpj ! depth of the iceshelves145 DO ji = 1, jpi146 ik = mikt(ji,jj)147 risfdep(ji,jj) = gdepw_0(ji,jj,ik)148 END DO149 END DO150 !151 144 ht_0(:,:) = 0._wp ! Reference ocean thickness 152 145 hu_0(:,:) = 0._wp … … 194 187 IF( lk_c1d ) CALL cor_c1d ! 1D configuration: Coriolis set at T-point 195 188 ! 196 IF( ln_meshmask .AND. .NOT.ln_iscpl ) CALL dom_wri ! Create a domain file 197 IF( ln_meshmask .AND. ln_iscpl .AND. .NOT.ln_rstart ) CALL dom_wri ! Create a domain file 198 IF( .NOT.ln_rstart ) CALL dom_ctl ! Domain control 199 ! 200 IF( ln_write_cfg ) CALL cfg_write ! create the configuration file 189 IF( ln_meshmask ) CALL dom_wri ! Create a domain file 190 IF( .NOT.ln_rstart ) CALL dom_ctl ! Domain control 191 ! 192 IF( ln_write_cfg ) CALL cfg_write ! create the configuration file 201 193 ! 202 194 IF(lwp) THEN … … 294 286 & nn_it000, nn_itend , nn_date0 , nn_time0 , nn_leapy , nn_istate , & 295 287 & nn_stock, nn_write , ln_mskland , ln_clobber , nn_chunksz, nn_euler , & 296 & ln_cfmeta, ln_ iscpl, ln_xios_read, nn_wxios297 NAMELIST/namdom/ ln_linssh, rn_ isfhmin, rn_rdt, rn_atfp, ln_crs, ln_meshmask288 & ln_cfmeta, ln_xios_read, nn_wxios 289 NAMELIST/namdom/ ln_linssh, rn_rdt, rn_atfp, ln_crs, ln_meshmask 298 290 #if defined key_netcdf4 299 291 NAMELIST/namnc4/ nn_nchunks_i, nn_nchunks_j, nn_nchunks_k, ln_nc4zip … … 345 337 WRITE(numout,*) ' overwrite an existing file ln_clobber = ', ln_clobber 346 338 WRITE(numout,*) ' NetCDF chunksize (bytes) nn_chunksz = ', nn_chunksz 347 WRITE(numout,*) ' IS coupling at the restart step ln_iscpl = ', ln_iscpl348 339 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 349 340 WRITE(numout,*) ' READ restart for a single file using XIOS ln_xios_read =', ln_xios_read … … 419 410 WRITE(numout,*) ' linear free surface (=T) ln_linssh = ', ln_linssh 420 411 WRITE(numout,*) ' create mesh/mask file ln_meshmask = ', ln_meshmask 421 WRITE(numout,*) ' treshold to open the isf cavity rn_isfhmin = ', rn_isfhmin, ' [m]'422 412 WRITE(numout,*) ' ocean time step rn_rdt = ', rn_rdt 423 413 WRITE(numout,*) ' asselin time filter parameter rn_atfp = ', rn_atfp -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domvvl.F90
r11822 r12068 37 37 38 38 PUBLIC dom_vvl_init ! called by domain.F90 39 PUBLIC dom_vvl_zgr ! called by isfcpl.F90 39 40 PUBLIC dom_vvl_sf_nxt ! called by step.F90 40 41 PUBLIC dom_vvl_sf_update ! called by step.F90 … … 118 119 INTEGER, INTENT(in) :: Kbb, Kmm, Kaa 119 120 ! 121 IF(lwp) WRITE(numout,*) 122 IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated' 123 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 124 ! 125 CALL dom_vvl_ctl ! choose vertical coordinate (z_star, z_tilde or layer) 126 ! 127 ! ! Allocate module arrays 128 IF( dom_vvl_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' ) 129 ! 130 ! ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf 131 CALL dom_vvl_rst( nit000, Kbb, Kmm, 'READ' ) 132 e3t(:,:,jpk,Kaa) = e3t_0(:,:,jpk) ! last level always inside the sea floor set one for all 133 ! 134 CALL dom_vvl_zgr(Kbb, Kmm, Kaa) ! interpolation scale factor, depth and water column 135 ! 136 END SUBROUTINE dom_vvl_init 137 ! 138 SUBROUTINE dom_vvl_zgr(Kbb, Kmm, Kaa) 139 !!---------------------------------------------------------------------- 140 !! *** ROUTINE dom_vvl_init *** 141 !! 142 !! ** Purpose : Interpolation of all scale factors, 143 !! depths and water column heights 144 !! 145 !! ** Method : - interpolate scale factors 146 !! 147 !! ** Action : - e3t_(n/b) and tilde_e3t_(n/b) 148 !! - Regrid: e3(u/v)_n 149 !! e3(u/v)_b 150 !! e3w_n 151 !! e3(u/v)w_b 152 !! e3(u/v)w_n 153 !! gdept_n, gdepw_n and gde3w_n 154 !! - h(t/u/v)_0 155 !! - frq_rst_e3t and frq_rst_hdv 156 !! 157 !! Reference : Leclair, M., and G. Madec, 2011, Ocean Modelling. 158 !!---------------------------------------------------------------------- 159 INTEGER, INTENT(in) :: Kbb, Kmm, Kaa 160 !!---------------------------------------------------------------------- 120 161 INTEGER :: ji, jj, jk 121 162 INTEGER :: ii0, ii1, ij0, ij1 122 163 REAL(wp):: zcoef 123 164 !!---------------------------------------------------------------------- 124 !125 IF(lwp) WRITE(numout,*)126 IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated'127 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'128 !129 CALL dom_vvl_ctl ! choose vertical coordinate (z_star, z_tilde or layer)130 !131 ! ! Allocate module arrays132 IF( dom_vvl_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' )133 !134 ! ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf135 CALL dom_vvl_rst( nit000, Kbb, Kmm, 'READ' )136 e3t(:,:,jpk,Kaa) = e3t_0(:,:,jpk) ! last level always inside the sea floor set one for all137 165 ! 138 166 ! !== Set of all other vertical scale factors ==! (now and before) … … 266 294 ENDIF 267 295 ! 268 END SUBROUTINE dom_vvl_ init296 END SUBROUTINE dom_vvl_zgr 269 297 270 298 … … 811 839 id4 = iom_varid( numror, 'tilde_e3t_n', ldstop = .FALSE. ) 812 840 id5 = iom_varid( numror, 'hdiv_lf', ldstop = .FALSE. ) 841 ! 813 842 ! ! --------- ! 814 843 ! ! all cases ! 815 844 ! ! --------- ! 845 ! 816 846 IF( MIN( id1, id2 ) > 0 ) THEN ! all required arrays exist 817 847 CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) … … 1029 1059 ! 1030 1060 IF( ioptio /= 1 ) CALL ctl_stop( 'Choose ONE vertical coordinate in namelist nam_vvl' ) 1031 IF( .NOT. ln_vvl_zstar .AND. ln_isf ) CALL ctl_stop( 'Only vvl_zstar has been tested with ice shelf cavity' )1032 1061 ! 1033 1062 IF(lwp) THEN ! Print the choice -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domwri.F90
r11822 r12068 16 16 !! dom_stiff : diagnose maximum grid stiffness/hydrostatic consistency (s-coordinate) 17 17 !!---------------------------------------------------------------------- 18 USE isf ! ice shelf 18 19 USE dom_oce ! ocean space and time domain 19 20 USE phycst , ONLY : rsmall … … 155 156 156 157 ! note that mbkt is set to 1 over land ==> use surface tmask 157 zprt(:,:) = ssmask(:,:) *REAL( mbkt(:,:) , wp )158 zprt(:,:) = REAL( mbkt(:,:) , wp ) 158 159 CALL iom_rstput( 0, 0, inum, 'mbathy', zprt, ktype = jp_i4 ) ! ! nb of ocean T-points 159 zprt(:,:) = ssmask(:,:) *REAL( mikt(:,:) , wp )160 zprt(:,:) = REAL( mikt(:,:) , wp ) 160 161 CALL iom_rstput( 0, 0, inum, 'misf', zprt, ktype = jp_i4 ) ! ! nb of ocean T-points 161 zprt(:,:) = ssmask(:,:) * REAL( risfdep(:,:) , wp )162 CALL iom_rstput( 0, 0, inum, 'isfdraft', zprt, ktype = jp_r8 ) ! ! nb of ocean T-points163 162 ! ! vertical mesh 164 163 CALL iom_rstput( 0, 0, inum, 'e3t_1d', e3t_1d, ktype = jp_r8 ) ! ! scale factors -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domzgr.F90
r10425 r12068 71 71 INTEGER, DIMENSION(:,:), INTENT(out) :: k_top, k_bot ! ocean first and last level indices 72 72 ! 73 INTEGER :: jk ! dummy loop index 73 INTEGER :: ji,jj,jk ! dummy loop index 74 INTEGER :: ikt, ikb ! top/bot index 74 75 INTEGER :: ioptio, ibat, ios ! local integer 75 76 REAL(wp) :: zrefdep ! depth of the reference level (~10m) … … 138 139 ! ! top/bottom ocean level indices for t-, u- and v-points (f-point also for top) 139 140 CALL zgr_top_bot( k_top, k_bot ) ! with a minimum value set to 1 140 141 141 ! 142 ! ! ice shelf draft and bathymetry 143 DO jj = 1,jpj 144 DO ji = 1,jpi 145 ikt = mikt(ji,jj) 146 ikb = mbkt(ji,jj) 147 bathy (ji,jj) = gdepw_0(ji,jj,ikb+1) 148 risfdep(ji,jj) = gdepw_0(ji,jj,ikt ) 149 END DO 150 END DO 151 ! 142 152 ! ! deepest/shallowest W level Above/Below ~10m 143 153 !!gm BUG in s-coordinate this does not work! -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/istate.F90
r11480 r12068 28 28 USE dtauvd ! data: U & V current (dta_uvd routine) 29 29 USE domvvl ! varying vertical mesh 30 USE iscplrst ! ice sheet coupling31 30 USE wet_dry ! wetting and drying (needed for wad_istate) 32 31 USE usrdef_istate ! User defined initial state … … 88 87 ! ! ------------------- 89 88 CALL rst_read( Kbb, Kmm ) ! Read the restart file 90 IF (ln_iscpl) CALL iscpl_stp( Kbb, Kmm ) ! extrapolate restart to wet and dry91 89 CALL day_init ! model calendar (using both namelist and restart infos) 92 90 ! -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/divhor.F90
r10978 r12068 19 19 !!---------------------------------------------------------------------- 20 20 USE oce ! ocean dynamics and tracers 21 USE isf 22 USE isfutils 21 23 USE dom_oce ! ocean space and time domain 22 USE sbc_oce, ONLY : ln_rnf , ln_isf! surface boundary condition: ocean24 USE sbc_oce, ONLY : ln_rnf ! surface boundary condition: ocean 23 25 USE sbcrnf ! river runoff 24 USE sbcisf ! ice shelf 25 USE iscplhsb ! ice sheet / ocean coupling 26 USE iscplini ! ice sheet / ocean coupling 26 USE isfhdiv ! ice shelf 27 27 #if defined key_asminc 28 28 USE asminc ! Assimilation increment … … 65 65 INTEGER :: ji, jj, jk ! dummy loop indices 66 66 REAL(wp) :: zraur, zdep ! local scalars 67 REAL(wp), DIMENSION(jpi,jpj) :: ztmp 67 68 !!---------------------------------------------------------------------- 68 69 ! … … 86 87 END DO 87 88 END DO 89 ! 88 90 #if defined key_agrif 89 91 IF( .NOT. Agrif_Root() ) THEN … … 101 103 ! 102 104 #endif 103 IF( ln_isf ) CALL sbc_isf_div( hdiv, Kmm ) !== ice shelf ==! (update hdiv field)104 105 ! 105 IF( ln_is cpl .AND. ln_hsb ) CALL iscpl_div( Kmm, hdiv ) !== ice sheet==! (update hdiv field)106 IF( ln_isf ) CALL isf_hdiv( kt, Kmm, hdiv ) !== ice shelf ==! (update hdiv field) 106 107 ! 107 108 CALL lbc_lnk( 'divhor', hdiv, 'T', 1. ) ! (no sign change) -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/dynatf.F90
r11480 r12068 30 30 USE sbc_oce ! Surface boundary condition: ocean fields 31 31 USE sbcrnf ! river runoffs 32 USE sbcisf ! ice shelf33 32 USE phycst ! physical constants 34 33 USE dynadv ! dynamics: vector invariant versus flux form … … 42 41 USE trddyn ! trend manager: dynamics 43 42 USE trdken ! trend manager: kinetic energy 43 USE isf , ONLY: ln_isf ! ice shelf 44 USE isfdynatf , ONLY: isf_dynatf ! ice shelf 44 45 ! 45 46 USE in_out_manager ! I/O manager … … 145 146 # endif 146 147 ! 147 CALL lbc_lnk_multi( 'dyn nxt', puu(:,:,:,Kaa), 'U', -1., pvv(:,:,:,Kaa), 'V', -1. ) !* local domain boundaries148 CALL lbc_lnk_multi( 'dynatf', puu(:,:,:,Kaa), 'U', -1., pvv(:,:,:,Kaa), 'V', -1. ) !* local domain boundaries 148 149 ! 149 150 ! !* BDY open boundaries … … 218 219 ENDIF 219 220 END IF 220 221 IF ( ln_isf ) THEN ! if ice shelf melting 222 DO jk = 1, jpkm1 ! Deal with isf separetely, as can be through depth too 223 DO jj = 1, jpj 224 DO ji = 1, jpi 225 IF( misfkt(ji,jj) <=jk .and. jk < misfkb(ji,jj) ) THEN 226 ze3t_f(ji,jj,jk) = ze3t_f(ji,jj,jk) - zcoef * ( fwfisf_b(ji,jj) - fwfisf(ji,jj) ) & 227 & * ( pe3t(ji,jj,jk,Kmm) * r1_hisf_tbl(ji,jj) ) * tmask(ji,jj,jk) 228 ELSEIF ( jk==misfkb(ji,jj) ) THEN 229 ze3t_f(ji,jj,jk) = ze3t_f(ji,jj,jk) - zcoef * ( fwfisf_b(ji,jj) - fwfisf(ji,jj) ) & 230 & * ( pe3t(ji,jj,jk,Kmm) * r1_hisf_tbl(ji,jj) ) * ralpha(ji,jj) * tmask(ji,jj,jk) 231 ENDIF 232 END DO 233 END DO 234 END DO 235 END IF 221 ! 222 ! ice shelf melting (deal separately as it can be in depth) 223 ! PM: we could probably define a generic subroutine to do the in depth correction 224 ! to manage rnf, isf and possibly in the futur icb, tide water glacier (...) 225 IF ( ln_isf ) CALL isf_dynatf( kt, Kmm, ze3t_f, atfp * rdt ) 236 226 ! 237 227 pe3t(:,:,1:jpkm1,Kmm) = ze3t_f(:,:,1:jpkm1) ! filtered scale factor at T-points -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/dynhpg.F90
r11822 r12068 31 31 !!---------------------------------------------------------------------- 32 32 USE oce ! ocean dynamics and tracers 33 USE isf ! ice shelf (risfload variable) 34 USE isfload ! ice shelf (isf_load routine ) 33 35 USE sbc_oce ! surface variable (only for the flag with ice shelf) 34 36 USE dom_oce ! ocean space and time domain … … 218 220 ENDIF 219 221 ! 220 IF ( .NOT. ln_isfcav ) THEN !--- no ice shelf load221 riceload(:,:) = 0._wp222 !223 ELSE !--- set an ice shelf load224 !225 IF(lwp) WRITE(numout,*)226 IF(lwp) WRITE(numout,*) ' ice shelf case: set the ice-shelf load'227 ALLOCATE( zts_top(jpi,jpj,jpts) , zrhd(jpi,jpj,jpk) , zrhdtop_isf(jpi,jpj) , ziceload(jpi,jpj) )228 !229 znad = 1._wp !- To use density and not density anomaly230 !231 ! !- assume water displaced by the ice shelf is at T=-1.9 and S=34.4 (rude)232 zts_top(:,:,jp_tem) = -1.9_wp ; zts_top(:,:,jp_sal) = 34.4_wp233 !234 DO jk = 1, jpk !- compute density of the water displaced by the ice shelf235 CALL eos( zts_top(:,:,:), gdept(:,:,jk,Kmm), zrhd(:,:,jk) )236 END DO237 !238 ! !- compute rhd at the ice/oce interface (ice shelf side)239 CALL eos( zts_top , risfdep, zrhdtop_isf )240 !241 ! !- Surface value + ice shelf gradient242 ziceload = 0._wp ! compute pressure due to ice shelf load243 DO jj = 1, jpj ! (used to compute hpgi/j for all the level from 1 to miku/v)244 DO ji = 1, jpi ! divided by 2 later245 ikt = mikt(ji,jj)246 ziceload(ji,jj) = ziceload(ji,jj) + (znad + zrhd(ji,jj,1) ) * e3w(ji,jj,1,Kmm) * (1._wp - tmask(ji,jj,1))247 DO jk = 2, ikt-1248 ziceload(ji,jj) = ziceload(ji,jj) + (2._wp * znad + zrhd(ji,jj,jk-1) + zrhd(ji,jj,jk)) * e3w(ji,jj,jk,Kmm) &249 & * (1._wp - tmask(ji,jj,jk))250 END DO251 IF (ikt >= 2) ziceload(ji,jj) = ziceload(ji,jj) + (2._wp * znad + zrhdtop_isf(ji,jj) + zrhd(ji,jj,ikt-1)) &252 & * ( risfdep(ji,jj) - gdept(ji,jj,ikt-1,Kmm) )253 END DO254 END DO255 riceload(:,:) = ziceload(:,:) ! need to be saved for diaar5256 !257 DEALLOCATE( zts_top , zrhd , zrhdtop_isf , ziceload )258 ENDIF259 !260 222 END SUBROUTINE dyn_hpg_init 261 223 … … 583 545 !! puu(:,:,:,Krhs) = puu(:,:,:,Krhs) - 1/e1u * zhpi 584 546 !! pvv(:,:,:,Krhs) = pvv(:,:,:,Krhs) - 1/e2v * zhpj 585 !! iceload is added and partial cell case are added to the top and bottom547 !! iceload is added 586 548 !! 587 549 !! ** Action : - Update (puu(:,:,:,Krhs),pvv(:,:,:,Krhs)) with the now hydrastatic pressure trend … … 630 592 & - 0.5_wp * e3w(ji,jj,ikt,Kmm) & 631 593 & * ( 2._wp * znad + rhd(ji,jj,ikt) + zrhdtop_oce(ji,jj) ) & 632 & + ( ri ceload(ji+1,jj) - riceload(ji,jj)) )594 & + ( risfload(ji+1,jj) - risfload(ji,jj)) ) 633 595 zhpj(ji,jj,1) = zcoef0 / e2v(ji,jj) * ( 0.5_wp * e3w(ji,jj+1,iktp1j,Kmm) & 634 596 & * ( 2._wp * znad + rhd(ji,jj+1,iktp1j) + zrhdtop_oce(ji,jj+1) ) & 635 597 & - 0.5_wp * e3w(ji,jj,ikt,Kmm) & 636 598 & * ( 2._wp * znad + rhd(ji,jj,ikt) + zrhdtop_oce(ji,jj) ) & 637 & + ( ri ceload(ji,jj+1) - riceload(ji,jj)) )599 & + ( risfload(ji,jj+1) - risfload(ji,jj)) ) 638 600 ! s-coordinate pressure gradient correction (=0 if z coordinate) 639 601 zuap = -zcoef0 * ( rhd (ji+1,jj,1) + rhd (ji,jj,1) + 2._wp * znad ) & -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/dynspg_ts.F90
r11822 r12068 33 33 USE zdf_oce ! vertical physics: variables 34 34 USE zdfdrg ! vertical physics: top/bottom drag coef. 35 USE sbcisf ! ice shelf variable (fwfisf) 35 USE isf ! ice shelf variable (fwfisf) 36 USE isfutils 36 37 USE sbcapr ! surface boundary condition: atmospheric pressure 37 38 USE dynadv , ONLY: ln_dynadv_vec … … 337 338 ! ! --------------------------------------------------- ! 338 339 IF (ln_bt_fw) THEN ! FORWARD integration: use kt+1/2 fluxes (NOW+1/2) 339 zssh_frc(:,:) = r1_rau0 * ( emp(:,:) - rnf(:,:) + fwfisf(:,:))340 zssh_frc(:,:) = r1_rau0 * ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) ) 340 341 ELSE ! CENTRED integration: use kt-1/2 + kt+1/2 fluxes (NOW) 341 342 zztmp = r1_rau0 * r1_2 342 zssh_frc(:,:) = zztmp * ( emp(:,:) + emp_b(:,:) - rnf(:,:) - rnf_b(:,:) + fwfisf(:,:) + fwfisf_b(:,:) ) 343 zssh_frc(:,:) = zztmp * ( emp(:,:) + emp_b(:,:) & 344 & - rnf(:,:) - rnf_b(:,:) & 345 & + fwfisf_cav(:,:) + fwfisf_cav_b(:,:) & 346 & + fwfisf_par(:,:) + fwfisf_par_b(:,:) ) 343 347 ENDIF 344 348 ! != Add Stokes drift divergence =! (if exist) … … 346 350 zssh_frc(:,:) = zssh_frc(:,:) + div_sd(:,:) 347 351 ENDIF 352 ! 353 ! ! ice sheet coupling 354 IF ( ln_isf .AND. ln_isfcpl ) THEN 355 ! 356 ! ice sheet coupling 357 IF( ln_rstart .AND. kt == nit000 ) THEN 358 zssh_frc(:,:) = zssh_frc(:,:) + risfcpl_ssh(:,:) 359 END IF 360 ! 361 ! conservation option 362 IF( ln_isfcpl_cons ) THEN 363 zssh_frc(:,:) = zssh_frc(:,:) + risfcpl_cons_ssh(:,:) 364 END IF 365 ! 366 END IF 348 367 ! 349 368 #if defined key_asminc -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/dynzdf.F90
r11822 r12068 430 430 ikv = mikv(ji,jj) ! (first wet ocean u- and v-points) 431 431 ze3va = ( 1._wp - r_vvl ) * e3v(ji,jj,ikv,Kmm) + r_vvl * e3v(ji,jj,ikv,Kaa) ! after scale factor at T-point 432 zwd(ji,jj,ik u) = zwd(ji,jj,iku) - r2dt * 0.5*( rCdU_top(ji+1,jj)+rCdU_top(ji,jj) ) / ze3va432 zwd(ji,jj,ikv) = zwd(ji,jj,ikv) - r2dt * 0.5*( rCdU_top(ji,jj+1)+rCdU_top(ji,jj) ) / ze3va 433 433 END DO 434 434 END DO … … 448 448 ! m is decomposed in the product of an upper and lower triangular matrix 449 449 ! The 3 diagonal terms are in 2d arrays: zwd, zws, zwi 450 ! The solution (after velocity) is in 2d array pvv(:,:,:,Kaa)450 ! The solution (after velocity) is in 2d array va 451 451 !----------------------------------------------------------------------- 452 452 ! -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/sshwzv.F90
r11822 r12068 19 19 !!---------------------------------------------------------------------- 20 20 USE oce ! ocean dynamics and tracers variables 21 USE isf ! ice shelf 22 USE isfutils 21 23 USE dom_oce ! ocean space and time domain variables 22 24 USE sbc_oce ! surface boundary condition: ocean … … 256 258 zcoef = atfp * rdt * r1_rau0 257 259 pssh(:,:,Kmm) = pssh(:,:,Kmm) - zcoef * ( emp_b(:,:) - emp (:,:) & 258 & - rnf_b(:,:) + rnf (:,:) & 259 & + fwfisf_b(:,:) - fwfisf(:,:) ) * ssmask(:,:) 260 & - rnf_b(:,:) + rnf (:,:) & 261 & + fwfisf_cav_b(:,:) - fwfisf_cav(:,:) & 262 & + fwfisf_par_b(:,:) - fwfisf_par(:,:) ) * ssmask(:,:) 263 264 ! ice sheet coupling 265 IF ( ln_isf .AND. ln_isfcpl .AND. kt == nit000+1) pssh(:,:,Kbb) = pssh(:,:,Kbb) - atfp * rdt * ( risfcpl_ssh(:,:) - 0.0 ) * ssmask(:,:) 266 260 267 ENDIF 261 268 ENDIF … … 350 357 zCu = MAX( Cu_adv(ji,jj,jk) , Cu_adv(ji,jj,jk-1) ) 351 358 ! alt: 352 ! IF ( w n(ji,jj,jk) > 0._wp ) THEN359 ! IF ( ww(ji,jj,jk) > 0._wp ) THEN 353 360 ! zCu = Cu_adv(ji,jj,jk) 354 361 ! ELSE -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/IOM/iom.F90
r11822 r12068 374 374 CALL iom_set_rstw_var_active('sshn') 375 375 CALL iom_set_rstw_var_active('rhop') 376 ! extra variable needed for the ice sheet coupling377 IF ( ln_iscpl ) THEN378 CALL iom_set_rstw_var_active('tmask')379 CALL iom_set_rstw_var_active('umask')380 CALL iom_set_rstw_var_active('vmask')381 CALL iom_set_rstw_var_active('smask')382 CALL iom_set_rstw_var_active('e3t_n')383 CALL iom_set_rstw_var_active('e3u_n')384 CALL iom_set_rstw_var_active('e3v_n')385 CALL iom_set_rstw_var_active('gdepw_n')386 END IF387 376 ENDIF 388 377 IF(ln_diurnal) CALL iom_set_rstw_var_active('Dsst') -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/IOM/restart.F90
r11822 r12068 162 162 CALL iom_rstput( kt, nitrst, numrow, 'sshn' ,ssh(:,: ,Kmm), ldxios = lwxios ) 163 163 CALL iom_rstput( kt, nitrst, numrow, 'rhop' , rhop, ldxios = lwxios ) 164 ! extra variable needed for the ice sheet coupling165 IF ( ln_iscpl ) THEN166 CALL iom_rstput( kt, nitrst, numrow, 'tmask' , tmask, ldxios = lwxios ) ! need to extrapolate T/S167 CALL iom_rstput( kt, nitrst, numrow, 'umask' , umask, ldxios = lwxios ) ! need to correct barotropic velocity168 CALL iom_rstput( kt, nitrst, numrow, 'vmask' , vmask, ldxios = lwxios ) ! need to correct barotropic velocity169 CALL iom_rstput( kt, nitrst, numrow, 'smask' , ssmask, ldxios = lwxios) ! need to correct barotropic velocity170 CALL iom_rstput( kt, nitrst, numrow, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lwxios ) ! need to compute temperature correction171 CALL iom_rstput( kt, nitrst, numrow, 'e3u_n', e3u(:,:,:,Kmm), ldxios = lwxios ) ! need to compute bt conservation172 CALL iom_rstput( kt, nitrst, numrow, 'e3v_n', e3v(:,:,:,Kmm), ldxios = lwxios ) ! need to compute bt conservation173 CALL iom_rstput( kt, nitrst, numrow, 'gdepw_n', gdepw(:,:,:,Kmm), ldxios = lwxios ) ! need to compute extrapolation if vvl174 END IF175 164 ENDIF 176 165 -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfcav.F90
r11931 r12068 22 22 USE isfdiags , ONLY: isf_diags_flx ! ice shelf diags subroutine 23 23 ! 24 USE oce , ONLY: ts n! ocean tracers24 USE oce , ONLY: ts ! ocean tracers 25 25 USE par_oce , ONLY: jpi,jpj ! ocean space and time domain 26 26 USE phycst , ONLY: grav,rau0,r1_rau0_rcp ! physical constants … … 45 45 CONTAINS 46 46 47 SUBROUTINE isf_cav( kt, ptsc, pqfwf )47 SUBROUTINE isf_cav( kt, Kmm, ptsc, pqfwf ) 48 48 !!--------------------------------------------------------------------- 49 49 !! *** ROUTINE isf_cav *** … … 64 64 REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(inout) :: ptsc ! T & S ice shelf cavity contents 65 65 !!-------------------------- IN -------------------------------------- 66 INTEGER, INTENT(in) :: Kmm ! ocean time level index 66 67 INTEGER, INTENT(in) :: kt ! ocean time step 67 68 !!--------------------------------------------------------------------- … … 76 77 ! 77 78 ! compute T/S/U/V for the top boundary layer 78 CALL isf_tbl( tsn(:,:,:,jp_tem), zttbl(:,:),'T', misfkt_cav, rhisf_tbl_cav, misfkb_cav, rfrac_tbl_cav )79 CALL isf_tbl( tsn(:,:,:,jp_sal), zstbl(:,:),'T', misfkt_cav, rhisf_tbl_cav, misfkb_cav, rfrac_tbl_cav )79 CALL isf_tbl(Kmm, ts(:,:,:,jp_tem,Kmm), zttbl(:,:),'T', misfkt_cav, rhisf_tbl_cav, misfkb_cav, rfrac_tbl_cav ) 80 CALL isf_tbl(Kmm, ts(:,:,:,jp_sal,Kmm), zstbl(:,:),'T', misfkt_cav, rhisf_tbl_cav, misfkb_cav, rfrac_tbl_cav ) 80 81 ! 81 82 ! output T/S/U/V for the top boundary layer … … 93 94 ! useless if melt specified 94 95 IF ( TRIM(cn_isfcav_mlt) .NE. 'spe' ) THEN 95 CALL isfcav_gammats( zttbl, zstbl, zqoce , pqfwf, &96 & zgammat, zgammas )96 CALL isfcav_gammats( Kmm, zttbl, zstbl, zqoce , pqfwf, & 97 & zgammat, zgammas ) 97 98 END IF 98 99 ! … … 138 139 ! 139 140 ! output fluxes 140 CALL isf_diags_flx( misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, 'cav', pqfwf, zqoce, zqlat, zqhc)141 CALL isf_diags_flx( Kmm, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, 'cav', pqfwf, zqoce, zqlat, zqhc) 141 142 ! 142 143 ! set temperature content -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfcavgam.F90
r11931 r12068 14 14 USE isftbl , ONLY: isf_tbl 15 15 16 USE oce , ONLY: u n, vn, rn2 ! ocean dynamics and tracers16 USE oce , ONLY: uu, vv, rn2 ! ocean dynamics and tracers 17 17 USE phycst , ONLY: grav, vkarmn ! physical constant 18 18 USE eosbn2 , ONLY: eos_rab ! equation of state … … 41 41 !!----------------------------------------------------------------------------------------------------- 42 42 ! 43 SUBROUTINE isfcav_gammats( pttbl, pstbl, pqoce, pqfwf, pgt, pgs )43 SUBROUTINE isfcav_gammats( Kmm, pttbl, pstbl, pqoce, pqfwf, pgt, pgs ) 44 44 !!---------------------------------------------------------------------- 45 45 !! ** Purpose : compute the coefficient echange for heat and fwf flux … … 51 51 REAL(wp), DIMENSION(jpi,jpj), INTENT( out) :: pgt , pgs ! gamma t and gamma s 52 52 !!-------------------------- IN ------------------------------------- 53 INTEGER :: Kmm ! ocean time level index 53 54 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pqoce, pqfwf ! isf heat and fwf 54 55 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pttbl, pstbl ! top boundary layer tracer … … 67 68 CASE ('ad15', 'hj99') 68 69 ! compute velocity in tbl 69 CALL isf_tbl( un(:,:,:) ,zutbl(:,:),'U', miku, rhisf_tbl_cav)70 CALL isf_tbl( vn(:,:,:) ,zvtbl(:,:),'V', mikv, rhisf_tbl_cav)70 CALL isf_tbl(Kmm, uu(:,:,:,Kmm) ,zutbl(:,:),'U', miku, rhisf_tbl_cav) 71 CALL isf_tbl(Kmm, vv(:,:,:,Kmm) ,zvtbl(:,:),'V', mikv, rhisf_tbl_cav) 71 72 ! 72 73 ! mask velocity in tbl with ice shelf mask … … 90 91 pgs(:,:) = rn_gammas0 91 92 CASE ( 'ad15' ) ! gamma is proportional to u* 92 CALL gammats_AD15 ( zutbl, zvtbl, rCd0_top, r_ke0_top, pgt, pgs )93 CALL gammats_AD15 ( zutbl, zvtbl, rCd0_top, r_ke0_top, pgt, pgs ) 93 94 CASE ( 'hj99' ) ! gamma depends of stability of boundary layer and u* 94 CALL gammats_HJ99 ( pttbl, pstbl, zutbl, zvtbl, rCd0_top, r_ke0_top, pqoce, pqfwf, pgt, pgs )95 CALL gammats_HJ99 (Kmm, pttbl, pstbl, zutbl, zvtbl, rCd0_top, r_ke0_top, pqoce, pqfwf, pgt, pgs ) 95 96 CASE DEFAULT 96 97 CALL ctl_stop('STOP','method to compute gamma (cn_gammablk) is unknown (should not see this)') … … 147 148 END SUBROUTINE gammats_AD15 148 149 149 SUBROUTINE gammats_HJ99( pttbl, pstbl, putbl, pvtbl, pCd, pke2, pqoce, pqfwf, & ! <<== in150 & pgt , pgs ) ! ==>> out gammats [m/s]150 SUBROUTINE gammats_HJ99( Kmm, pttbl, pstbl, putbl, pvtbl, pCd, pke2, pqoce, pqfwf, & ! <<== in 151 & pgt , pgs ) ! ==>> out gammats [m/s] 151 152 !!---------------------------------------------------------------------- 152 153 !! ** Purpose : compute the coefficient echange coefficient … … 159 160 REAL(wp), DIMENSION(jpi,jpj), INTENT( out) :: pgt, pgs ! gammat and gammas 160 161 !!-------------------------- IN ------------------------------------- 162 INTEGER :: Kmm ! ocean time level index 161 163 REAL(wp), INTENT(in ) :: pke2 ! background velocity squared 162 164 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pqoce, pqfwf ! surface heat flux and fwf flux … … 208 210 ! compute Rc number (as done in zdfric.F90) 209 211 !!gm better to do it like in the new zdfric.F90 i.e. avm weighted Ri computation 210 zcoef = 0.5_wp / e3w _n(ji,jj,ikt+1)212 zcoef = 0.5_wp / e3w(ji,jj,ikt+1,Kmm) 211 213 ! ! shear of horizontal velocity 212 zdku = zcoef * ( u n(ji-1,jj ,ikt ) + un(ji,jj,ikt) &213 & -u n(ji-1,jj ,ikt+1) - un(ji,jj,ikt+1) )214 zdkv = zcoef * ( v n(ji ,jj-1,ikt ) + vn(ji,jj,ikt) &215 & -v n(ji ,jj-1,ikt+1) - vn(ji,jj,ikt+1) )214 zdku = zcoef * ( uu(ji-1,jj ,ikt ,Kmm) + uu(ji,jj,ikt ,Kmm) & 215 & -uu(ji-1,jj ,ikt+1,Kmm) - uu(ji,jj,ikt+1,Kmm) ) 216 zdkv = zcoef * ( vv(ji ,jj-1,ikt ,Kmm) + vv(ji,jj,ikt ,Kmm) & 217 & -vv(ji ,jj-1,ikt+1,Kmm) - vv(ji,jj,ikt+1,Kmm) ) 216 218 ! ! richardson number (minimum value set to zero) 217 219 zRc = MAX(rn2(ji,jj,ikt+1), 0._wp) / MAX( zdku*zdku + zdkv*zdkv, zeps ) … … 220 222 zts(jp_tem) = pttbl(ji,jj) 221 223 zts(jp_sal) = pstbl(ji,jj) 222 zdep = gdepw _n(ji,jj,ikt)223 ! 224 CALL eos_rab( zts, zdep, zab )224 zdep = gdepw(ji,jj,ikt,Kmm) 225 ! 226 CALL eos_rab( zts, zdep, zab, Kmm ) 225 227 ! 226 228 ! compute length scale (Eq ??) … … 229 231 ! compute Monin Obukov Length 230 232 ! Maximum boundary layer depth (Eq ??) 231 zhmax = gdept _n(ji,jj,mbkt(ji,jj)) - gdepw_n(ji,jj,mikt(ji,jj)) -0.001_wp233 zhmax = gdept(ji,jj,mbkt(ji,jj),Kmm) - gdepw(ji,jj,mikt(ji,jj),Kmm) -0.001_wp 232 234 ! 233 235 ! Compute Monin obukhov length scale at the surface and Ekman depth: (Eq ??) -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfcavmlt.F90
r11931 r12068 17 17 18 18 USE dom_oce ! ocean space and time domain 19 USE oce , ONLY: tsn ! ocean dynamics and tracers20 19 USE phycst , ONLY: rcp, rau0, rau0_rcp ! physical constants 21 20 USE eosbn2 , ONLY: eos_fzp ! equation of state -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfcpl.F90
r11931 r12068 46 46 !!---------------------------------------------------------------------- 47 47 CONTAINS 48 SUBROUTINE isfcpl_init( )48 SUBROUTINE isfcpl_init(Kbb, Kmm, Kaa) 49 49 !!--------------------------------------------------------------------- 50 50 !! 51 !!--------------------------------------------------------------------- 52 INTEGER, INTENT(in) :: Kbb, Kmm, Kaa ! ocean time level indices 51 53 !!--------------------------------------------------------------------- 52 54 INTEGER :: id … … 74 76 ELSE 75 77 ! extrapolation ssh 76 CALL isfcpl_ssh( )78 CALL isfcpl_ssh(Kbb, Kmm, Kaa) 77 79 ! 78 80 ! extrapolation tracer properties 79 CALL isfcpl_tra( )81 CALL isfcpl_tra(Kmm) 80 82 ! 81 83 ! correction of the horizontal divergence and associated temp. and salt content flux 82 84 ! Need to : - include in the cpl cons the risfcpl_vol/tsc contribution 83 85 ! - decide how to manage thickness level change in conservation 84 CALL isfcpl_vol( )86 CALL isfcpl_vol(Kmm) 85 87 ! 86 88 ! apply the 'conservation' method 87 IF ( ln_isfcpl_cons ) CALL isfcpl_cons( )89 IF ( ln_isfcpl_cons ) CALL isfcpl_cons(Kmm) 88 90 ! 89 91 END IF 90 92 ! 91 93 ! mask velocity properly (mask used in restart not compatible with new mask) 92 u n(:,:,:) = un(:,:,:) * umask(:,:,:)93 v n(:,:,:) = vn(:,:,:) * vmask(:,:,:)94 uu(:,:,:,Kmm) = uu(:,:,:,Kmm) * umask(:,:,:) 95 vv(:,:,:,Kmm) = vv(:,:,:,Kmm) * vmask(:,:,:) 94 96 ! 95 97 ! all before fields set to now values 96 ts b (:,:,:,:) = tsn (:,:,:,:)97 u b (:,:,:) = un (:,:,:)98 v b (:,:,:) = vn (:,:,:)99 ssh b (:,:) = sshn (:,:)100 e3t _b(:,:,:) = e3t_n(:,:,:)98 ts (:,:,:,:,Kbb) = ts (:,:,:,:,Kmm) 99 uu (:,:,:,Kbb) = uu (:,:,:,Kmm) 100 vv (:,:,:,Kbb) = vv (:,:,:,Kmm) 101 ssh (:,:,Kbb) = ssh (:,:,Kmm) 102 e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 101 103 102 104 ! prepare writing restart … … 111 113 END SUBROUTINE isfcpl_init 112 114 ! 113 SUBROUTINE isfcpl_rst_write(kt )115 SUBROUTINE isfcpl_rst_write(kt, Kmm) 114 116 !!--------------------------------------------------------------------- 115 117 !! *** ROUTINE iscpl_rst_write *** … … 119 121 !!-------------------------- IN -------------------------------------- 120 122 INTEGER, INTENT(in) :: kt 123 INTEGER, INTENT(in) :: Kmm ! ocean time level index 121 124 !!---------------------------------------------------------------------- 122 125 ! … … 124 127 CALL iom_rstput( kt, nitrst, numrow, 'tmask' , tmask , ldxios = lwxios ) 125 128 CALL iom_rstput( kt, nitrst, numrow, 'ssmask' , ssmask, ldxios = lwxios ) 126 CALL iom_rstput( kt, nitrst, numrow, 'e3t_n' , e3t _n, ldxios = lwxios )127 CALL iom_rstput( kt, nitrst, numrow, 'e3u_n' , e3u _n, ldxios = lwxios )128 CALL iom_rstput( kt, nitrst, numrow, 'e3v_n' , e3v _n, ldxios = lwxios )129 CALL iom_rstput( kt, nitrst, numrow, 'gdepw_n', gdepw _n, ldxios = lwxios )129 CALL iom_rstput( kt, nitrst, numrow, 'e3t_n' , e3t(:,:,:,Kmm) , ldxios = lwxios ) 130 CALL iom_rstput( kt, nitrst, numrow, 'e3u_n' , e3u(:,:,:,Kmm) , ldxios = lwxios ) 131 CALL iom_rstput( kt, nitrst, numrow, 'e3v_n' , e3v(:,:,:,Kmm) , ldxios = lwxios ) 132 CALL iom_rstput( kt, nitrst, numrow, 'gdepw_n', gdepw(:,:,:,Kmm) , ldxios = lwxios ) 130 133 IF( lwxios ) CALL iom_swap( cxios_context ) 131 134 ! 132 135 END SUBROUTINE isfcpl_rst_write 133 136 134 SUBROUTINE isfcpl_ssh( )137 SUBROUTINE isfcpl_ssh(Kbb, Kmm, Kaa) 135 138 !!---------------------------------------------------------------------- 136 139 !! *** ROUTINE iscpl_ssh *** … … 142 145 !!---------------------------------------------------------------------- 143 146 !! 147 INTEGER, INTENT(in) :: Kbb, Kmm, Kaa ! ocean time level indices 148 !!---------------------------------------------------------------------- 144 149 INTEGER :: ji, jj, jd, jk !! loop index 145 150 INTEGER :: jip1, jim1, jjp1, jjm1 … … 154 159 ! rude average of the closest neigbourgs (e1e2t not taking into account) 155 160 ! 156 zssh(:,:) = ssh n(:,:)161 zssh(:,:) = ssh(:,:,Kmm) 157 162 zssmask0(:,:) = zssmask_b(:,:) 158 163 ! … … 168 173 ! 169 174 IF (zdssmask(ji,jj) == 1._wp .AND. zsummsk /= 0._wp) THEN 170 ssh n(ji,jj)=( zssh(jip1,jj)*zssmask0(jip1,jj) &175 ssh(ji,jj,Kmm)=( zssh(jip1,jj)*zssmask0(jip1,jj) & 171 176 & + zssh(jim1,jj)*zssmask0(jim1,jj) & 172 177 & + zssh(ji,jjp1)*zssmask0(ji,jjp1) & … … 177 182 END DO 178 183 ! 179 zssh(:,:) = ssh n(:,:)184 zssh(:,:) = ssh(:,:,Kmm) 180 185 zssmask0(:,:) = zssmask_b(:,:) 181 186 ! … … 184 189 END DO 185 190 ! 186 ! update ssh n187 ssh n(:,:) = zssh(:,:) * ssmask(:,:)188 ! 189 ssh b(:,:) = sshn(:,:)190 ! 191 IF ( ln_isfdebug ) CALL debug('isfcpl_ssh: sshn',ssh n(:,:))191 ! update ssh(:,:,Kmm) 192 ssh(:,:,Kmm) = zssh(:,:) * ssmask(:,:) 193 ! 194 ssh(:,:,Kbb) = ssh(:,:,Kmm) 195 ! 196 IF ( ln_isfdebug ) CALL debug('isfcpl_ssh: sshn',ssh(:,:,Kmm)) 192 197 ! 193 198 ! recompute the vertical scale factor, depth and water thickness 194 IF(lwp) write(numout,*) 'isfcpl_ssh : recompute scale factor from ssh n (new wet cell)'199 IF(lwp) write(numout,*) 'isfcpl_ssh : recompute scale factor from ssh (new wet cell,Kmm)' 195 200 IF(lwp) write(numout,*) '~~~~~~~~~~~' 196 201 DO jk = 1, jpk 197 e3t _n(:,:,jk) = e3t_0(:,:,jk) * ( ht_0(:,:) + sshn(:,:) ) &202 e3t(:,:,jk,Kmm) = e3t_0(:,:,jk) * ( ht_0(:,:) + ssh(:,:,Kmm) ) & 198 203 & / ( ht_0(:,:) + 1._wp - ssmask(:,:) ) * tmask(:,:,jk) & 199 204 & + e3t_0(:,:,jk) * (1._wp -tmask(:,:,jk)) 200 205 END DO 201 e3t _b(:,:,:) = e3t_n(:,:,:)202 CALL dom_vvl_zgr( )206 e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 207 CALL dom_vvl_zgr(Kbb, Kmm, Kaa) 203 208 ! 204 209 END SUBROUTINE isfcpl_ssh 205 210 206 SUBROUTINE isfcpl_tra( )211 SUBROUTINE isfcpl_tra(Kmm) 207 212 !!---------------------------------------------------------------------- 208 213 !! *** ROUTINE iscpl_tra *** … … 213 218 !! 214 219 !!---------------------------------------------------------------------- 220 INTEGER, INTENT(in) :: Kmm ! ocean time level index 221 !!---------------------------------------------------------------------- 215 222 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ztmask_b 216 223 !REAL(wp), DIMENSION(:,:,: ), INTENT(in ) :: pdepw_b !! depth w before … … 237 244 !bugged : to be corrected (PM) 238 245 ! back up original t/s/mask 239 !tsb (:,:,:,:) = ts n(:,:,:,:)246 !tsb (:,:,:,:) = ts(:,:,:,:,Kmm) 240 247 ! 241 248 ! compute new T/S (interpolation) if vvl only for common wet cell in before and after wmask … … 248 255 ! 249 256 ! !compute weight 250 ! zdzp1 = MAX(0._wp,pdepw_b(ji,jj,jk+1) - gdepw _n(ji,jj,jk+1))251 ! zdzm1 = MAX(0._wp,gdepw _n(ji,jj,jk) - pdepw_b(ji,jj,jk ))252 ! zdz = e3t _n(ji,jj,jk) - zdzp1 - zdzm1 ! if isf : e3t = gdepw_n(ji,jj,jk+1)- gdepw_n(ji,jj,jk)257 ! zdzp1 = MAX(0._wp,pdepw_b(ji,jj,jk+1) - gdepw(ji,jj,jk+1,Kmm)) 258 ! zdzm1 = MAX(0._wp,gdepw(ji,jj,jk ,Kmm) - pdepw_b(ji,jj,jk )) 259 ! zdz = e3t(ji,jj,jk,Kmm) - zdzp1 - zdzm1 ! if isf : e3t = gdepw(ji,jj,jk+1,Kmm)- gdepw(ji,jj,jk,Kmm) 253 260 ! 254 261 ! IF (zdz .LT. 0._wp) THEN … … 256 263 ! END IF 257 264 ! 258 ! ts n(ji,jj,jk,jp_tem) = ( zdzp1*tsb(ji,jj,jk+1,jp_tem) &259 ! & + zdz *ts b(ji,jj,jk ,jp_tem) &260 ! & + zdzm1*ts b(ji,jj,jk-1,jp_tem) )/e3t_n(ji,jj,jk)265 ! ts(ji,jj,jk,jp_tem,Kmm) = ( zdzp1*ts(ji,jj,jk+1,jp_tem,Kbb) & 266 ! & + zdz *ts(ji,jj,jk ,jp_tem,Kbb) & 267 ! & + zdzm1*ts(ji,jj,jk-1,jp_tem,Kbb) )/e3t(ji,jj,jk,Kmm) 261 268 ! 262 ! ts n(ji,jj,jk,jp_sal) = ( zdzp1*tsb(ji,jj,jk+1,jp_sal) &263 ! & + zdz *ts b(ji,jj,jk ,jp_sal) &264 ! & + zdzm1*ts b(ji,jj,jk-1,jp_sal) )/e3t_n(ji,jj,jk)269 ! ts(ji,jj,jk,jp_sal,Kmm) = ( zdzp1*ts(ji,jj,jk+1,jp_sal,Kbb) & 270 ! & + zdz *ts(ji,jj,jk ,jp_sal,Kbb) & 271 ! & + zdzm1*ts(ji,jj,jk-1,jp_sal,Kbb) )/e3t(ji,jj,jk,Kmm) 265 272 ! 266 273 ! END IF … … 270 277 ! END IF 271 278 272 zts0(:,:,:,:) = ts n(:,:,:,:)279 zts0(:,:,:,:) = ts(:,:,:,:,Kmm) 273 280 ztmask0(:,:,:) = ztmask_b(:,:,:) 274 281 ztmask1(:,:,:) = ztmask_b(:,:,:) … … 294 301 ! 295 302 ! horizontal basic extrapolation 296 ts n(ji,jj,jk,1)=( zts0(jip1,jj ,jk,1) * ztmask0(jip1,jj ,jk) &303 ts(ji,jj,jk,1,Kmm)=( zts0(jip1,jj ,jk,1) * ztmask0(jip1,jj ,jk) & 297 304 & + zts0(jim1,jj ,jk,1) * ztmask0(jim1,jj ,jk) & 298 305 & + zts0(ji ,jjp1,jk,1) * ztmask0(ji ,jjp1,jk) & 299 306 & + zts0(ji ,jjm1,jk,1) * ztmask0(ji ,jjm1,jk) ) / zsummsk 300 ts n(ji,jj,jk,2)=( zts0(jip1,jj ,jk,2) * ztmask0(jip1,jj ,jk) &307 ts(ji,jj,jk,2,Kmm)=( zts0(jip1,jj ,jk,2) * ztmask0(jip1,jj ,jk) & 301 308 & + zts0(jim1,jj ,jk,2) * ztmask0(jim1,jj ,jk) & 302 309 & + zts0(ji ,jjp1,jk,2) * ztmask0(ji ,jjp1,jk) & … … 316 323 zsummsk = ztmask0(ji,jj,jkm1) + ztmask0(ji,jj,jkp1) 317 324 IF (zdmask(ji,jj) == 1._wp .AND. zsummsk /= 0._wp ) THEN 318 ts n(ji,jj,jk,1)=( zts0(ji,jj,jkp1,1)*ztmask0(ji,jj,jkp1) &325 ts(ji,jj,jk,1,Kmm)=( zts0(ji,jj,jkp1,1)*ztmask0(ji,jj,jkp1) & 319 326 & + zts0(ji,jj,jkm1,1)*ztmask0(ji,jj,jkm1)) / zsummsk 320 ts n(ji,jj,jk,2)=( zts0(ji,jj,jkp1,2)*ztmask0(ji,jj,jkp1) &327 ts(ji,jj,jk,2,Kmm)=( zts0(ji,jj,jkp1,2)*ztmask0(ji,jj,jkp1) & 321 328 & + zts0(ji,jj,jkm1,2)*ztmask0(ji,jj,jkm1)) / zsummsk 322 329 ! … … 330 337 ! 331 338 ! update temperature and salinity and mask 332 zts0(:,:,:,:) = ts n(:,:,:,:)339 zts0(:,:,:,:) = ts(:,:,:,:,Kmm) 333 340 ztmask0(:,:,:) = ztmask1(:,:,:) 334 341 ! … … 337 344 END DO ! nn_drown 338 345 ! 339 ! mask new ts nfield340 ts n(:,:,:,jp_tem) = zts0(:,:,:,jp_tem) * tmask(:,:,:)341 ts n(:,:,:,jp_sal) = zts0(:,:,:,jp_sal) * tmask(:,:,:)346 ! mask new ts(:,:,:,:,Kmm) field 347 ts(:,:,:,jp_tem,Kmm) = zts0(:,:,:,jp_tem) * tmask(:,:,:) 348 ts(:,:,:,jp_sal,Kmm) = zts0(:,:,:,jp_sal) * tmask(:,:,:) 342 349 ! 343 350 ! sanity check … … 347 354 DO jj = 1,jpj 348 355 DO ji = 1,jpi 349 IF (tmask(ji,jj,jk) == 1._wp .AND. ts n(ji,jj,jk,2) == 0._wp) &356 IF (tmask(ji,jj,jk) == 1._wp .AND. ts(ji,jj,jk,2,Kmm) == 0._wp) & 350 357 & CALL ctl_stop('STOP', 'failing to fill all new weet cell, & 351 358 & try increase nn_drown or activate XXXX & … … 357 364 END SUBROUTINE isfcpl_tra 358 365 359 SUBROUTINE isfcpl_vol( )366 SUBROUTINE isfcpl_vol(Kmm) 360 367 !!---------------------------------------------------------------------- 361 368 !! *** ROUTINE iscpl_vol *** … … 370 377 !!---------------------------------------------------------------------- 371 378 !! 379 INTEGER, INTENT(in) :: Kmm ! ocean time level index 380 !!---------------------------------------------------------------------- 372 381 INTEGER :: ji, jj, jk 373 382 INTEGER :: ikb, ikt … … 388 397 DO jj = 2, jpjm1 389 398 DO ji = 2, jpim1 390 zqvolb(ji,jj,jk) = ( e2u(ji,jj) * ze3u_b(ji,jj,jk) * u n(ji,jj,jk) - e2u(ji-1,jj ) * ze3u_b(ji-1,jj ,jk) * un(ji-1,jj ,jk) &391 & + e1v(ji,jj) * ze3v_b(ji,jj,jk) * v n(ji,jj,jk) - e1v(ji ,jj-1) * ze3v_b(ji ,jj-1,jk) * vn(ji ,jj-1,jk) ) &399 zqvolb(ji,jj,jk) = ( e2u(ji,jj) * ze3u_b(ji,jj,jk) * uu(ji,jj,jk,Kmm) - e2u(ji-1,jj ) * ze3u_b(ji-1,jj ,jk) * uu(ji-1,jj ,jk,Kmm) & 400 & + e1v(ji,jj) * ze3v_b(ji,jj,jk) * vv(ji,jj,jk,Kmm) - e1v(ji ,jj-1) * ze3v_b(ji ,jj-1,jk) * vv(ji ,jj-1,jk,Kmm) ) & 392 401 & * ztmask_b(ji,jj,jk) 393 402 END DO … … 397 406 ! properly mask velocity 398 407 ! (velocity are still mask with old mask at this stage) 399 u n(:,:,jk) = un(:,:,jk) * umask(:,:,jk)400 v n(:,:,jk) = vn(:,:,jk) * vmask(:,:,jk)408 uu(:,:,jk,Kmm) = uu(:,:,jk,Kmm) * umask(:,:,jk) 409 vv(:,:,jk,Kmm) = vv(:,:,jk,Kmm) * vmask(:,:,jk) 401 410 ! compute volume flux divergence after coupling 402 411 DO jj = 2, jpjm1 403 412 DO ji = 2, jpim1 404 zqvoln(ji,jj,jk) = ( e2u(ji,jj) * e3u _n(ji,jj,jk) * un(ji,jj,jk) - e2u(ji-1,jj ) * e3u_n(ji-1,jj ,jk) * un(ji-1,jj ,jk) &405 & + e1v(ji,jj) * e3v _n(ji,jj,jk) * vn(ji,jj,jk) - e1v(ji ,jj-1) * e3v_n(ji ,jj-1,jk) * vn(ji ,jj-1,jk) ) &413 zqvoln(ji,jj,jk) = ( e2u(ji,jj) * e3u(ji,jj,jk,Kmm) * uu(ji,jj,jk,Kmm) - e2u(ji-1,jj ) * e3u(ji-1,jj ,jk,Kmm) * uu(ji-1,jj ,jk,Kmm) & 414 & + e1v(ji,jj) * e3v(ji,jj,jk,Kmm) * vv(ji,jj,jk,Kmm) - e1v(ji ,jj-1) * e3v(ji ,jj-1,jk,Kmm) * vv(ji ,jj-1,jk,Kmm) ) & 406 415 & * tmask(ji,jj,jk) 407 416 END DO … … 428 437 CALL lbc_lnk( 'iscpl', risfcpl_vol, 'T', 1. ) 429 438 ! 430 ! 3.0: set total correction (div, tr a, ssh)439 ! 3.0: set total correction (div, tr(:,:,:,:,Krhs), ssh) 431 440 ! 432 441 ! 3.1: mask volume flux divergence correction 433 442 risfcpl_vol(:,:,:) = risfcpl_vol(:,:,:) * tmask(:,:,:) 434 443 ! 435 ! 3.2: get 3d tr aincrement to apply at the first time step436 ! temperature and salt content flux computed using local ts n444 ! 3.2: get 3d tr(:,:,:,:,Krhs) increment to apply at the first time step 445 ! temperature and salt content flux computed using local ts(:,:,:,:,Kmm) 437 446 ! (very simple advection scheme) 438 447 ! (>0 out) 439 risfcpl_tsc(:,:,:,jp_tem) = -risfcpl_vol(:,:,:) * ts n(:,:,:,jp_tem)440 risfcpl_tsc(:,:,:,jp_sal) = -risfcpl_vol(:,:,:) * ts n(:,:,:,jp_sal)448 risfcpl_tsc(:,:,:,jp_tem) = -risfcpl_vol(:,:,:) * ts(:,:,:,jp_tem,Kmm) 449 risfcpl_tsc(:,:,:,jp_sal) = -risfcpl_vol(:,:,:) * ts(:,:,:,jp_sal,Kmm) 441 450 ! 442 451 ! 3.3: ssh correction (for dynspg_ts) … … 448 457 END SUBROUTINE isfcpl_vol 449 458 450 SUBROUTINE isfcpl_cons( )459 SUBROUTINE isfcpl_cons(Kmm) 451 460 !!---------------------------------------------------------------------- 452 461 !! *** ROUTINE iscpl_cons *** … … 463 472 TYPE(isfcons), DIMENSION(:),ALLOCATABLE :: zisfpts ! list of point receiving a correction 464 473 ! 474 !!---------------------------------------------------------------------- 475 INTEGER, INTENT(in) :: Kmm ! ocean time level index 476 !!---------------------------------------------------------------------- 465 477 INTEGER :: ji , jj , jk , jproc ! loop index 466 478 INTEGER :: jip1 , jim1, jjp1, jjm1 ! dummy indices … … 513 525 514 526 ! volume diff 515 zdvol = e3t _n(ji,jj,jk) * tmask(ji,jj,jk) - ze3t_b(ji,jj,jk) * ztmask_b(ji,jj,jk)527 zdvol = e3t(ji,jj,jk,Kmm) * tmask(ji,jj,jk) - ze3t_b(ji,jj,jk) * ztmask_b(ji,jj,jk) 516 528 517 529 ! heat diff 518 zdtem = ts n (ji,jj,jk,jp_tem) * e3t_n(ji,jj,jk) * tmask (ji,jj,jk) &530 zdtem = ts (ji,jj,jk,jp_tem,Kmm) * e3t(ji,jj,jk,Kmm) * tmask (ji,jj,jk) & 519 531 - zt_b(ji,jj,jk) * ze3t_b(ji,jj,jk) * ztmask_b(ji,jj,jk) 520 532 521 533 ! salt diff 522 zdsal = ts n(ji,jj,jk,jp_sal) * e3t_n(ji,jj,jk) * tmask (ji,jj,jk) &534 zdsal = ts(ji,jj,jk,jp_sal,Kmm) * e3t(ji,jj,jk,Kmm) * tmask (ji,jj,jk) & 523 535 - zs_b(ji,jj,jk) * ze3t_b(ji,jj,jk) * ztmask_b(ji,jj,jk) 524 536 -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfdiags.F90
r11931 r12068 34 34 CONTAINS 35 35 36 SUBROUTINE isf_diags_flx( ktop, kbot, phtbl, pfrac, cdisf, pqfwf, pqoce, pqlat, pqhc)36 SUBROUTINE isf_diags_flx(Kmm, ktop, kbot, phtbl, pfrac, cdisf, pqfwf, pqoce, pqlat, pqhc) 37 37 !!--------------------------------------------------------------------- 38 !! *** ROUTINE isf_diags_ 2dto3d***38 !! *** ROUTINE isf_diags_flx *** 39 39 !! 40 40 !! ** Purpose : … … 43 43 !!-------------------------- OUT ------------------------------------- 44 44 !!-------------------------- IN ------------------------------------- 45 INTEGER, INTENT(in) :: Kmm ! ocean time level index 45 46 INTEGER , DIMENSION(jpi,jpj), INTENT(in) :: ktop , kbot ! top and bottom level of the tbl 46 47 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: phtbl, pfrac ! thickness of the tbl and fraction of last cell affected by the tbl … … 65 66 ! 66 67 ! output 3d Diagnostics 67 IF ( iom_use( TRIM(cvarqfwf3d) ) ) CALL isf_diags_2dto3d( ktop, kbot, phtbl, pfrac, TRIM(cvarqfwf3d) , pqfwf(:,:))68 IF ( iom_use( TRIM(cvarqoce3d) ) ) CALL isf_diags_2dto3d( ktop, kbot, phtbl, pfrac, TRIM(cvarqoce3d) , pqoce(:,:))69 IF ( iom_use( TRIM(cvarqlat3d) ) ) CALL isf_diags_2dto3d( ktop, kbot, phtbl, pfrac, TRIM(cvarqlat3d) , pqoce(:,:))70 IF ( iom_use( TRIM(cvarqhc3d) ) ) CALL isf_diags_2dto3d( ktop, kbot, phtbl, pfrac, TRIM(cvarqhc3d) , pqhc (:,:))68 IF ( iom_use( TRIM(cvarqfwf3d) ) ) CALL isf_diags_2dto3d( Kmm, ktop, kbot, phtbl, pfrac, TRIM(cvarqfwf3d) , pqfwf(:,:)) 69 IF ( iom_use( TRIM(cvarqoce3d) ) ) CALL isf_diags_2dto3d( Kmm, ktop, kbot, phtbl, pfrac, TRIM(cvarqoce3d) , pqoce(:,:)) 70 IF ( iom_use( TRIM(cvarqlat3d) ) ) CALL isf_diags_2dto3d( Kmm, ktop, kbot, phtbl, pfrac, TRIM(cvarqlat3d) , pqoce(:,:)) 71 IF ( iom_use( TRIM(cvarqhc3d) ) ) CALL isf_diags_2dto3d( Kmm, ktop, kbot, phtbl, pfrac, TRIM(cvarqhc3d) , pqhc (:,:)) 71 72 ! 72 73 END SUBROUTINE 73 74 74 SUBROUTINE isf_diags_2dto3d( ktop, kbot, phtbl, pfrac, cdvar, pvar2d)75 SUBROUTINE isf_diags_2dto3d(Kmm, ktop, kbot, phtbl, pfrac, cdvar, pvar2d) 75 76 !!--------------------------------------------------------------------- 76 77 !! *** ROUTINE isf_diags_2dto3d *** … … 81 82 !!-------------------------- OUT ------------------------------------- 82 83 !!-------------------------- IN ------------------------------------- 84 INTEGER, INTENT(in) :: Kmm ! ocean time level index 83 85 INTEGER , DIMENSION(jpi,jpj), INTENT(in) :: ktop , kbot ! top and bottom level of the tbl 84 86 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: phtbl, pfrac ! thickness of the tbl and fraction of last cell affected by the tbl … … 101 103 ikb = kbot(ji,jj) 102 104 DO jk = ikt, ikb - 1 103 zvar3d(ji,jj,jk) = zvar2d(ji,jj) * e3t _n(ji,jj,jk)105 zvar3d(ji,jj,jk) = zvar2d(ji,jj) * e3t(ji,jj,jk,Kmm) 104 106 END DO 105 zvar3d(ji,jj,ikb) = zvar2d(ji,jj) * e3t _n(ji,jj,ikb) * pfrac(ji,jj)107 zvar3d(ji,jj,ikb) = zvar2d(ji,jj) * e3t(ji,jj,ikb,Kmm) * pfrac(ji,jj) 106 108 END DO 107 109 END DO -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfdynatf.F90
r11970 r12068 1 MODULE isfdyn nxt1 MODULE isfdynatf 2 2 !!========================================================================= 3 3 !! *** MODULE isfnxt *** 4 !! Ice shelf update: compute the dyn nxtice shelf contribution4 !! Ice shelf update: compute the dynatf ice shelf contribution 5 5 !!========================================================================= 6 6 !! History : OPA ! 2019-09 (P. Mathiot) Original code … … 8 8 9 9 !!------------------------------------------------------------------------- 10 !! isfnxt : ap lly correction needed for the ice shelf to ensure conservation10 !! isfnxt : apply correction needed for the ice shelf to ensure conservation 11 11 !!------------------------------------------------------------------------- 12 12 13 13 USE isf 14 14 15 USE phycst , ONLY: r1_rau0 16 USE dom_oce, ONLY: e3t _b, e3t_n, r1_e1e2t! time and space domain15 USE phycst , ONLY: r1_rau0 ! physical constant 16 USE dom_oce, ONLY: e3t, r1_e1e2t ! time and space domain 17 17 18 18 USE in_out_manager … … 22 22 PRIVATE 23 23 24 PUBLIC isf_dyn nxt24 PUBLIC isf_dynatf 25 25 26 26 CONTAINS 27 27 28 SUBROUTINE isf_dyn nxt ( kt, pcoef )28 SUBROUTINE isf_dynatf ( kt, Kmm, pe3t_f, pcoef ) 29 29 !!-------------------------------------------------------------------- 30 !! *** ROUTINE isf_dyn nxt***30 !! *** ROUTINE isf_dynatf *** 31 31 !! 32 32 !! ** Purpose : compute the ice shelf volume filter correction for cavity, param, ice sheet coupling case 33 33 !! 34 34 !!-------------------------- OUT ------------------------------------- 35 INTEGER , INTENT(in ) :: kt 35 INTEGER , INTENT(in ) :: kt ! ocean time step 36 INTEGER , INTENT(in ) :: Kmm ! ocean time level index 37 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pe3t_f ! time filtered scale factor to be corrected 36 38 ! 37 REAL(wp) , INTENT(in ) :: pcoef! atfp * rdt * r1_rau039 REAL(wp) , INTENT(in ) :: pcoef ! atfp * rdt * r1_rau0 38 40 !!-------------------------------------------------------------------- 39 41 INTEGER :: jk ! loop index … … 41 43 ! 42 44 ! ice shelf cavity 43 IF ( ln_isfcav_mlt ) CALL isf_dyn nxt_mlt(misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, fwfisf_cav, fwfisf_cav_b, pcoef)45 IF ( ln_isfcav_mlt ) CALL isf_dynatf_mlt(Kmm, pe3t_f, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, fwfisf_cav, fwfisf_cav_b, pcoef) 44 46 ! 45 47 ! ice shelf parametrised 46 IF ( ln_isfpar_mlt ) CALL isf_dyn nxt_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, fwfisf_par, fwfisf_par_b, pcoef)48 IF ( ln_isfpar_mlt ) CALL isf_dynatf_mlt(Kmm, pe3t_f, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, fwfisf_par, fwfisf_par_b, pcoef) 47 49 ! 48 50 IF ( ln_isfcpl .AND. ln_rstart .AND. kt == nit000+1 ) THEN 49 51 DO jk = 1, jpkm1 50 e3t_b(:,:,jk) = e3t_b(:,:,jk) - pcoef * risfcpl_vol(:,:,jk) * r1_e1e2t(:,:)52 pe3t_f(:,:,jk) = pe3t_f(:,:,jk) - pcoef * risfcpl_vol(:,:,jk) * r1_e1e2t(:,:) 51 53 END DO 52 54 END IF 53 55 ! 54 END SUBROUTINE isf_dyn nxt56 END SUBROUTINE isf_dynatf 55 57 56 SUBROUTINE isf_dyn nxt_mlt (ktop, kbot, phtbl, pfrac, pfwf, pfwf_b, pcoef )58 SUBROUTINE isf_dynatf_mlt ( Kmm, pe3t_f, ktop, kbot, phtbl, pfrac, pfwf, pfwf_b, pcoef ) 57 59 !!-------------------------------------------------------------------- 58 !! *** ROUTINE isf_dyn nxt_mlt ***60 !! *** ROUTINE isf_dynatf_mlt *** 59 61 !! 60 62 !! ** Purpose : compute the ice shelf volume filter correction for cavity or param 61 63 !! 62 64 !!-------------------------- IN ------------------------------------- 63 INTEGER , DIMENSION(jpi,jpj), INTENT(in ) :: ktop , kbot ! top and bottom level of tbl 64 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pfrac, phtbl ! fraction of bottom cell included in tbl, tbl thickness 65 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pfwf , pfwf_b ! now/before fwf 66 REAL(wp), INTENT(in ) :: pcoef ! atfp * rdt * r1_rau0 65 INTEGER , INTENT(in ) :: Kmm ! ocean time level index 66 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pe3t_f ! time-filtered scale factor to be corrected 67 INTEGER , DIMENSION(jpi,jpj) , INTENT(in ) :: ktop , kbot ! top and bottom level of tbl 68 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: pfrac, phtbl ! fraction of bottom cell included in tbl, tbl thickness 69 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: pfwf , pfwf_b ! now/before fwf 70 REAL(wp), INTENT(in ) :: pcoef ! atfp * rdt * r1_rau0 67 71 !!---------------------------------------------------------------------- 68 72 INTEGER :: ji,jj,jk … … 78 82 DO ji = 1, jpi 79 83 IF( ktop(ji,jj) <= jk .AND. jk < kbot(ji,jj) ) THEN 80 e3t_b(ji,jj,jk) = e3t_b(ji,jj,jk) - zfwfinc(ji,jj) * e3t_n(ji,jj,jk)84 pe3t_f(ji,jj,jk) = pe3t_f(ji,jj,jk) - zfwfinc(ji,jj) * e3t(ji,jj,jk,Kmm) 81 85 ELSEIF ( jk == kbot(ji,jj) ) THEN 82 e3t_b(ji,jj,jk) = e3t_b(ji,jj,jk) - zfwfinc(ji,jj) * e3t_n(ji,jj,jk) * pfrac(ji,jj)86 pe3t_f(ji,jj,jk) = pe3t_f(ji,jj,jk) - zfwfinc(ji,jj) * e3t(ji,jj,jk,Kmm) * pfrac(ji,jj) 83 87 ENDIF 84 88 END DO … … 86 90 END DO 87 91 ! 88 END SUBROUTINE isf_dyn nxt_mlt92 END SUBROUTINE isf_dynatf_mlt 89 93 90 END MODULE isfdyn nxt94 END MODULE isfdynatf -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfhdiv.F90
r11931 r12068 15 15 CONTAINS 16 16 17 SUBROUTINE isf_hdiv( kt, phdiv )17 SUBROUTINE isf_hdiv( kt, Kmm, phdiv ) 18 18 !!---------------------------------------------------------------------- 19 19 !! *** SUBROUTINE isf_hdiv *** … … 27 27 !!---------------------------------------------------------------------- 28 28 INTEGER, INTENT(in) :: kt 29 INTEGER, INTENT(in) :: Kmm ! ocean time level index 29 30 ! 30 31 IF ( ln_isf ) THEN … … 40 41 ! 41 42 ! correct divergence only for the first time step 42 IF ( kt == nit000 ) CALL isf_hdiv_cpl( risfcpl_vol , phdiv)43 IF ( kt == nit000+1 ) CALL isf_hdiv_cpl( risfcpl_vol*0.5_wp, phdiv)43 IF ( kt == nit000 ) CALL isf_hdiv_cpl(Kmm, risfcpl_vol , phdiv) 44 IF ( kt == nit000+1 ) CALL isf_hdiv_cpl(Kmm, risfcpl_vol*0.5_wp, phdiv) 44 45 ! 45 46 ! correct divergence every time step to remove any trend due to coupling 46 47 ! conservation option 47 IF ( ln_isfcpl_cons ) CALL isf_hdiv_cpl( risfcpl_cons_vol, phdiv)48 IF ( ln_isfcpl_cons ) CALL isf_hdiv_cpl(Kmm, risfcpl_cons_vol, phdiv) 48 49 ! 49 50 END IF … … 96 97 END SUBROUTINE isf_hdiv_mlt 97 98 98 SUBROUTINE isf_hdiv_cpl( pqvol, phdiv)99 SUBROUTINE isf_hdiv_cpl(Kmm, pqvol, phdiv) 99 100 !!---------------------------------------------------------------------- 100 101 !! *** SUBROUTINE isf_hdiv_cpl *** … … 111 112 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: phdiv 112 113 !!---------------------------------------------------------------------- 114 INTEGER, INTENT(in) :: Kmm ! ocean time level index 113 115 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in ) :: pqvol 114 116 !!---------------------------------------------------------------------- … … 117 119 ! 118 120 DO jk=1,jpk 119 phdiv(:,:,jk) = phdiv(:,:,jk) + pqvol(:,:,jk) * r1_e1e2t(:,:) / e3t _n(:,:,jk)121 phdiv(:,:,jk) = phdiv(:,:,jk) + pqvol(:,:,jk) * r1_e1e2t(:,:) / e3t(:,:,jk,Kmm) 120 122 END DO 121 123 ! -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfload.F90
r11852 r12068 13 13 USE isf, ONLY: cn_isfload ! ice shelf variables 14 14 15 USE dom_oce, ONLY: e3w _n, gdept_n, risfdep, mikt! vertical scale factor15 USE dom_oce, ONLY: e3w, gdept, risfdep, mikt ! vertical scale factor 16 16 USE eosbn2 , ONLY: eos ! eos routine 17 17 … … 27 27 CONTAINS 28 28 29 SUBROUTINE isf_load ( pisfload )29 SUBROUTINE isf_load ( Kmm, pisfload ) 30 30 !!-------------------------------------------------------------------- 31 31 !! *** SUBROUTINE isf_load *** … … 37 37 REAL(wp), DIMENSION(jpi,jpj), INTENT( out) :: pisfload 38 38 !!-------------------------- IN ------------------------------------- 39 INTEGER, INTENT(in) :: Kmm ! ocean time level index 39 40 !!---------------------------------------------------------------------- 40 41 ! … … 45 46 SELECT CASE ( cn_isfload ) 46 47 CASE ( 'isomip' ) 47 CALL isf_load_isomip ( pisfload )48 CALL isf_load_isomip ( Kmm, pisfload ) 48 49 CASE DEFAULT 49 50 CALL ctl_stop('STOP','method cn_isfload to compute ice shelf load does not exist (isomip), check your namelist') … … 52 53 END SUBROUTINE isf_load 53 54 54 SUBROUTINE isf_load_isomip( pisfload )55 SUBROUTINE isf_load_isomip( Kmm, pisfload ) 55 56 !!-------------------------------------------------------------------- 56 57 !! *** SUBROUTINE isf_load *** … … 66 67 REAL(wp), DIMENSION(jpi,jpj), INTENT( out) :: pisfload 67 68 !!-------------------------- IN ------------------------------------- 69 INTEGER, INTENT(in) :: Kmm ! ocean time level index 68 70 !!-------------------------------------------------------------------- 69 71 INTEGER :: ji, jj, jk … … 81 83 ! 82 84 DO jk = 1, jpk !- compute density of the water displaced by the ice shelf 83 CALL eos( zts_top(:,:,:), gdept _n(:,:,jk), zrhd(:,:,jk) )85 CALL eos( zts_top(:,:,:), gdept(:,:,jk,Kmm), zrhd(:,:,jk) ) 84 86 END DO 85 87 ! … … 96 98 ! 97 99 ! top layer of the ice shelf 98 pisfload(ji,jj) = pisfload(ji,jj) + (znad + zrhd(ji,jj,1) ) * e3w _n(ji,jj,1)100 pisfload(ji,jj) = pisfload(ji,jj) + (znad + zrhd(ji,jj,1) ) * e3w(ji,jj,1,Kmm) 99 101 ! 100 102 ! core layers of the ice shelf 101 103 DO jk = 2, ikt-1 102 pisfload(ji,jj) = pisfload(ji,jj) + (2._wp * znad + zrhd(ji,jj,jk-1) + zrhd(ji,jj,jk)) * e3w _n(ji,jj,jk)104 pisfload(ji,jj) = pisfload(ji,jj) + (2._wp * znad + zrhd(ji,jj,jk-1) + zrhd(ji,jj,jk)) * e3w(ji,jj,jk,Kmm) 103 105 END DO 104 106 ! 105 107 ! deepest part of the ice shelf (between deepest T point and ice/ocean interface 106 108 pisfload(ji,jj) = pisfload(ji,jj) + (2._wp * znad + zrhdtop_isf(ji,jj) + zrhd(ji,jj,ikt-1)) & 107 & * ( risfdep(ji,jj) - gdept _n(ji,jj,ikt-1) )109 & * ( risfdep(ji,jj) - gdept(ji,jj,ikt-1,Kmm) ) 108 110 ! 109 111 END IF -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfpar.F90
r11931 r12068 43 43 CONTAINS 44 44 45 SUBROUTINE isf_par( kt, ptsc, pqfwf )45 SUBROUTINE isf_par( kt, Kmm, ptsc, pqfwf ) 46 46 !!--------------------------------------------------------------------- 47 47 !! *** ROUTINE isf_par *** … … 54 54 REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(inout) :: ptsc 55 55 !!-------------------------- IN -------------------------------------- 56 INTEGER, INTENT(in) :: kt ! ocean time step 56 INTEGER, INTENT(in) :: kt ! ocean time step 57 INTEGER, INTENT(in) :: Kmm ! ocean time level index 57 58 !!--------------------------------------------------------------------- 58 59 REAL(wp), DIMENSION(jpi,jpj) :: zqoce, zqhc, zqlat, zqh … … 60 61 ! 61 62 ! compute heat content, latent heat and melt fluxes (2d) 62 CALL isfpar_mlt( kt, zqhc, zqoce, pqfwf )63 CALL isfpar_mlt( kt, Kmm, zqhc, zqoce, pqfwf ) 63 64 ! 64 65 ! compute heat and water flux ( > 0 out ) … … 77 78 ! 78 79 ! output fluxes 79 CALL isf_diags_flx( misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, 'par', pqfwf, zqoce, zqlat, zqhc)80 CALL isf_diags_flx( Kmm, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, 'par', pqfwf, zqoce, zqlat, zqhc) 80 81 ! 81 82 ! set temperature content -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfparmlt.F90
r11931 r12068 12 12 13 13 USE dom_oce ! ocean space and time domain 14 USE oce , ONLY: ts n! ocean dynamics and tracers14 USE oce , ONLY: ts ! ocean dynamics and tracers 15 15 USE phycst , ONLY: rcp, rau0 ! physical constants 16 16 USE eosbn2 , ONLY: eos_fzp ! equation of state … … 39 39 ! ------------------------------------------------------------------------------------------------------- 40 40 41 SUBROUTINE isfpar_mlt( kt, pqhc, pqoce, pqfwf )41 SUBROUTINE isfpar_mlt( kt, Kmm, pqhc, pqoce, pqfwf ) 42 42 !!--------------------------------------------------------------------- 43 43 !! *** ROUTINE isfpar_mlt *** … … 54 54 !!-------------------------- IN ------------------------------------- 55 55 INTEGER, INTENT(in) :: kt ! ocean time step 56 INTEGER, INTENT(in) :: Kmm ! ocean time level index 56 57 !!--------------------------------------------------------------------- 57 58 ! … … 59 60 SELECT CASE ( cn_isfpar_mlt ) 60 61 CASE ( 'spe' ) ! specified runoff in depth (Mathiot et al., 2017 in preparation) 61 CALL isfpar_mlt_spe(kt, pqhc, pqoce, pqfwf)62 CALL isfpar_mlt_spe(kt, Kmm, pqhc, pqoce, pqfwf) 62 63 CASE ( 'bg03' ) ! Beckmann and Goosse parametrisation 63 CALL isfpar_mlt_bg03(kt, pqhc, pqoce, pqfwf)64 CALL isfpar_mlt_bg03(kt, Kmm, pqhc, pqoce, pqfwf) 64 65 CASE ( 'oasis' ) 65 CALL isfpar_mlt_oasis( kt, pqhc, pqoce, pqfwf)66 CALL isfpar_mlt_oasis( kt, Kmm, pqhc, pqoce, pqfwf) 66 67 CASE DEFAULT 67 68 CALL ctl_stop('STOP', 'unknown isf melt formulation : cn_isfpar (should not see this)') … … 74 75 ! ------------------------------------------------------------------------------------------------------- 75 76 76 SUBROUTINE isfpar_mlt_spe(kt, pqhc, pqoce, pqfwf)77 SUBROUTINE isfpar_mlt_spe(kt, Kmm, pqhc, pqoce, pqfwf) 77 78 !!--------------------------------------------------------------------- 78 79 !! *** ROUTINE isfpar_mlt_spe *** … … 85 86 !!-------------------------- IN ------------------------------------- 86 87 INTEGER, INTENT(in) :: kt 88 INTEGER, INTENT(in) :: Kmm ! ocean time level index 87 89 !!-------------------------------------------------------------------- 88 90 INTEGER :: jk … … 97 99 ! 1. ------------Mean freezing point 98 100 DO jk = 1,jpk 99 CALL eos_fzp(ts n(:,:,jk,jp_sal), ztfrz3d(:,:,jk), gdept_n(:,:,jk))101 CALL eos_fzp(ts(:,:,jk,jp_sal,Kmm), ztfrz3d(:,:,jk), gdept(:,:,jk,Kmm)) 100 102 END DO 101 CALL isf_tbl( ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par )103 CALL isf_tbl(Kmm, ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par ) 102 104 ! 103 105 pqfwf(:,:) = - sf_isfpar_fwf(1)%fnow(:,:,1) ! fresh water flux from the isf (fwfisf <0 mean melting) … … 109 111 END SUBROUTINE isfpar_mlt_spe 110 112 111 SUBROUTINE isfpar_mlt_bg03(kt, pqhc, pqoce, pqfwf)113 SUBROUTINE isfpar_mlt_bg03(kt, Kmm, pqhc, pqoce, pqfwf) 112 114 !!--------------------------------------------------------------------- 113 115 !! *** ROUTINE isfpar_mlt_bg03 *** … … 128 130 !!-------------------------- IN ------------------------------------- 129 131 INTEGER, INTENT(in) :: kt 132 INTEGER, INTENT(in) :: Kmm ! ocean time level index 130 133 !!-------------------------------------------------------------------- 131 134 INTEGER :: jk … … 137 140 ! 0. ------------Mean freezing point 138 141 DO jk = 1,jpk 139 CALL eos_fzp(ts n(:,:,jk,jp_sal), ztfrz3d(:,:,jk), gdept_n(:,:,jk))142 CALL eos_fzp(ts(:,:,jk,jp_sal,Kmm), ztfrz3d(:,:,jk), gdept(:,:,jk,Kmm)) 140 143 END DO 141 CALL isf_tbl( ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par )144 CALL isf_tbl(Kmm, ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par ) 142 145 ! 143 146 ! 1. ------------Mean temperature 144 CALL isf_tbl( tsn(:,:,jk,jp_tem), ztavg, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par )147 CALL isf_tbl(Kmm, ts(:,:,jk,jp_tem,Kmm), ztavg, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par ) 145 148 ! 146 149 ! 2. ------------Net heat flux and fresh water flux due to the ice shelf … … 161 164 END SUBROUTINE isfpar_mlt_bg03 162 165 163 SUBROUTINE isfpar_mlt_oasis(kt, pqhc , pqoce, pqfwf )166 SUBROUTINE isfpar_mlt_oasis(kt, Kmm, pqhc , pqoce, pqfwf ) 164 167 !!---------------------------------------------------------------------- 165 168 !! *** ROUTINE isfpar_mlt_oasis *** … … 176 179 !!-------------------------- IN ------------------------------------- 177 180 INTEGER , INTENT(in ) :: kt ! current time step 181 INTEGER , INTENT(in ) :: Kmm ! ocean time level index 178 182 !!-------------------------------------------------------------------- 179 183 INTEGER :: jk ! loop index … … 189 193 ! 1. ------------Mean freezing point (needed for heat content flux) 190 194 DO jk = 1,jpk 191 CALL eos_fzp(ts n(:,:,jk,jp_sal), ztfrz3d(:,:,jk), gdept_n(:,:,jk))195 CALL eos_fzp(ts(:,:,jk,jp_sal,Kmm), ztfrz3d(:,:,jk), gdept(:,:,jk,Kmm)) 192 196 END DO 193 CALL isf_tbl( ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par )197 CALL isf_tbl(Kmm, ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par ) 194 198 ! 195 199 ! 2. ------------Scale isf melt pattern with total amount from oasis -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfstp.F90
r11931 r12068 21 21 USE isfcpl , ONLY: isfcpl_rst_write, isfcpl_init ! isf variables 22 22 23 USE dom_oce, ONLY: ht _n, e3t_n, ln_isfcav, ln_linssh! ocean space and time domain23 USE dom_oce, ONLY: ht, e3t, ln_isfcav, ln_linssh ! ocean space and time domain 24 24 USE domvvl, ONLY: ln_vvl_zstar ! zstar logical 25 25 USE zdfdrg, ONLY: r_Cdmin_top, r_ke0_top ! vertical physics: top/bottom drag coef. … … 43 43 CONTAINS 44 44 45 SUBROUTINE isf_stp( kt )45 SUBROUTINE isf_stp( kt, Kmm ) 46 46 !!--------------------------------------------------------------------- 47 47 !! *** ROUTINE isf_stp *** … … 59 59 !!---------------------------------------------------------------------- 60 60 INTEGER, INTENT(in) :: kt ! ocean time step 61 INTEGER, INTENT(in) :: Kmm ! ocean time level index 61 62 !!--------------------------------------------------------------------- 62 63 ! … … 77 78 ! 1.2: compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl) 78 79 rhisf_tbl_cav(:,:) = rn_htbl * mskisf_cav(:,:) 79 CALL isf_tbl_lvl(ht _n, e3t_n, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav)80 CALL isf_tbl_lvl(ht, e3t(:,:,:,Kmm), misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav) 80 81 ! 81 82 ! 1.3: compute ice shelf melt 82 CALL isf_cav( kt, risf_cav_tsc, fwfisf_cav)83 CALL isf_cav( kt, Kmm, risf_cav_tsc, fwfisf_cav) 83 84 ! 84 85 END IF … … 99 100 ! by simplicity, we assume the top level where param applied do not change with time (done in init part) 100 101 rhisf_tbl_par(:,:) = rhisf0_tbl_par(:,:) 101 CALL isf_tbl_lvl(ht _n, e3t_n, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par)102 CALL isf_tbl_lvl(ht, e3t(:,:,:,Kmm), misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par) 102 103 ! 103 104 ! 2.3: compute ice shelf melt 104 CALL isf_par( kt, risf_par_tsc, fwfisf_par)105 CALL isf_par( kt, Kmm, risf_par_tsc, fwfisf_par) 105 106 ! 106 107 END IF … … 110 111 !================================================================================== 111 112 ! 112 IF ( ln_isfcpl .AND. lrst_oce ) CALL isfcpl_rst_write(kt )113 IF ( ln_isfcpl .AND. lrst_oce ) CALL isfcpl_rst_write(kt, Kmm) 113 114 ! 114 115 IF( ln_timing ) CALL timing_stop('isf') … … 116 117 END SUBROUTINE isf_stp 117 118 118 SUBROUTINE isf_init 119 SUBROUTINE isf_init(Kbb, Kmm, Kaa) 119 120 !!--------------------------------------------------------------------- 120 121 !! *** ROUTINE isfstp_init *** … … 130 131 !! - call cav/param/isfcpl init routine 131 132 !!---------------------------------------------------------------------- 133 INTEGER, INTENT(in) :: Kbb, Kmm, Kaa ! ocean time level indices 132 134 ! 133 135 ! constrain: l_isfoasis need to be known … … 143 145 ! 144 146 ! compute ice shelf load 145 IF ( ln_isfcav ) CALL isf_load( risfload )147 IF ( ln_isfcav ) CALL isf_load( Kmm, risfload ) 146 148 ! 147 149 ! terminate routine now if no ice shelf melt formulation specify … … 158 160 !--------------------------------------------------------------------------------------------------------------------- 159 161 ! initialisation ice sheet coupling 160 IF( ln_isfcpl ) CALL isfcpl_init( )162 IF( ln_isfcpl ) CALL isfcpl_init(Kbb, Kmm, Kaa) 161 163 ! 162 164 END IF … … 284 286 REWIND( numnam_ref ) ! Namelist namsbc_rnf in reference namelist : Runoffs 285 287 READ ( numnam_ref, namisf, IOSTAT = ios, ERR = 901) 286 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namisf in reference namelist' , lwp)288 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namisf in reference namelist' ) 287 289 ! 288 290 REWIND( numnam_cfg ) ! Namelist namsbc_rnf in configuration namelist : Runoffs 289 291 READ ( numnam_cfg, namisf, IOSTAT = ios, ERR = 902 ) 290 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namisf in configuration namelist' , lwp)292 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namisf in configuration namelist' ) 291 293 IF(lwm) WRITE ( numond, namisf ) 292 294 -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isftbl.F90
r11931 r12068 26 26 CONTAINS 27 27 28 SUBROUTINE isf_tbl( pvarin, pvarout, cd_ptin, ktop, phtbl, kbot, pfrac )28 SUBROUTINE isf_tbl( Kmm, pvarin, pvarout, cd_ptin, ktop, phtbl, kbot, pfrac ) 29 29 !!-------------------------------------------------------------------- 30 30 !! *** SUBROUTINE isf_tbl *** … … 40 40 REAL(wp), DIMENSION(jpi,jpj) , INTENT( out) :: pvarout ! 2d average of pvarin 41 41 !!-------------------------- IN ------------------------------------- 42 INTEGER , INTENT(in ) :: Kmm ! ocean time level index 42 43 CHARACTER(len=1) , INTENT(in ) :: cd_ptin ! point of variable in/out 43 44 REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT(in ) :: pvarin ! 3d variable to average over the tbl … … 62 63 ! 63 64 ! compute tbl lvl and thickness 64 CALL isf_tbl_lvl( hu _n, e3u_n, ktop, ikbot, zhtbl, zfrac )65 CALL isf_tbl_lvl( hu(:,:,Kmm), e3u(:,:,:,Kmm), ktop, ikbot, zhtbl, zfrac ) 65 66 ! 66 67 ! compute tbl property at U point 67 CALL isf_tbl_avg( miku, ikbot, zhtbl, zfrac, e3u _n, pvarin, zvarout )68 CALL isf_tbl_avg( miku, ikbot, zhtbl, zfrac, e3u(:,:,:,Kmm), pvarin, zvarout ) 68 69 ! 69 70 ! compute tbl property at T point … … 82 83 ! 83 84 ! compute tbl lvl and thickness 84 CALL isf_tbl_lvl( hv _n, e3v_n, ktop, ikbot, zhtbl, zfrac )85 CALL isf_tbl_lvl( hv(:,:,Kmm), e3v(:,:,:,Kmm), ktop, ikbot, zhtbl, zfrac ) 85 86 ! 86 87 ! compute tbl property at V point 87 CALL isf_tbl_avg( mikv, ikbot, zhtbl, zfrac, e3v _n, pvarin, zvarout )88 CALL isf_tbl_avg( mikv, ikbot, zhtbl, zfrac, e3v(:,:,:,Kmm), pvarin, zvarout ) 88 89 ! 89 90 ! pvarout is an averaging of wet point … … 99 100 ! 100 101 ! compute tbl property at T point 101 CALL isf_tbl_avg( ktop, kbot, phtbl, pfrac, e3t _n, pvarin, pvarout )102 CALL isf_tbl_avg( ktop, kbot, phtbl, pfrac, e3t(:,:,:,Kmm), pvarin, pvarout ) 102 103 ! 103 104 END SELECT … … 252 253 ! 253 254 ! if we need to recompute the top level at every time stepcompute top level (z*, z~) 254 ! in case of weak ht _nvariation we can assume the top level of htbl to be constant255 ! in case of weak ht variation we can assume the top level of htbl to be constant 255 256 ! => only done using gdepw_0 256 257 ! be sure pdep is already correctly bounded -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/LDF/ldfslp.F90
r10922 r12068 21 21 !!---------------------------------------------------------------------- 22 22 USE oce ! ocean dynamics and tracers 23 USE isf ! ice shelf 23 24 USE dom_oce ! ocean space and time domain 24 25 ! USE ldfdyn ! lateral diffusion: eddy viscosity coef. -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/SBC/sbc_oce.F90
r11822 r12068 43 43 LOGICAL , PUBLIC :: ln_dm2dc !: Daily mean to Diurnal Cycle short wave (qsr) 44 44 LOGICAL , PUBLIC :: ln_rnf !: runoffs / runoff mouths 45 LOGICAL , PUBLIC :: ln_isf !: ice shelf melting46 45 LOGICAL , PUBLIC :: ln_ssr !: Sea Surface restoring on SST and/or SSS 47 46 LOGICAL , PUBLIC :: ln_apr_dyn !: Atmospheric pressure forcing used on dynamics (ocean & ice) … … 122 121 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_tot !: total E-P over ocean and ice [Kg/m2/s] 123 122 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fmmflx !: freshwater budget: freezing/melting [Kg/m2/s] 124 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rnf , rnf_b !: river runoff [Kg/m2/s] 125 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fwfisf , fwfisf_b !: ice shelf melting [Kg/m2/s] 126 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fwficb , fwficb_b !: iceberg melting [Kg/m2/s] 127 123 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rnf , rnf_b !: river runoff [Kg/m2/s] 124 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fwficb , fwficb_b !: iceberg melting [Kg/m2/s] 128 125 !! 129 126 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sbc_tsc, sbc_tsc_b !: sbc content trend [K.m/s] jpi,jpj,jpts … … 174 171 & sfx (jpi,jpj) , sfx_b(jpi,jpj) , emp_tot(jpi,jpj), fmmflx(jpi,jpj), STAT=ierr(2) ) 175 172 ! 176 ALLOCATE( fwfisf (jpi,jpj),rnf (jpi,jpj) , sbc_tsc (jpi,jpj,jpts) , qsr_hc (jpi,jpj,jpk) , &177 & fwfisf_b(jpi,jpj),rnf_b(jpi,jpj) , sbc_tsc_b(jpi,jpj,jpts) , qsr_hc_b(jpi,jpj,jpk) , &173 ALLOCATE( rnf (jpi,jpj) , sbc_tsc (jpi,jpj,jpts) , qsr_hc (jpi,jpj,jpk) , & 174 & rnf_b(jpi,jpj) , sbc_tsc_b(jpi,jpj,jpts) , qsr_hc_b(jpi,jpj,jpk) , & 178 175 & fwficb (jpi,jpj), fwficb_b(jpi,jpj), STAT=ierr(3) ) 179 176 ! -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/SBC/sbccpl.F90
r11822 r12068 36 36 USE eosbn2 ! 37 37 USE sbcrnf , ONLY : l_rnfcpl 38 USE sbcisf , ONLY : l_isfcpl38 USE isf , ONLY : ln_isf, l_isfoasis, fwfisf_oasis 39 39 #if defined key_cice 40 40 USE ice_domain_size, only: ncat … … 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) THEN477 l_isf cpl = .TRUE. ! -> no need to read isf in sbcisf476 IF( srcv(jpr_isf)%laction ) THEN 477 l_isfoasis = .TRUE. ! -> isf fwf comes from oasis 478 478 IF(lwp) WRITE(numout,*) 479 479 IF(lwp) WRITE(numout,*) ' iceshelf received from oasis ' 480 CALL ctl_stop('STOP','not coded') 480 481 ENDIF 481 482 ! … … 1406 1407 rnf(:,:) = rnf(:,:) + fwficb(:,:) ! iceberg added to runfofs 1407 1408 ENDIF 1408 IF( srcv(jpr_isf)%laction ) fwfisf(:,:) = - frcv(jpr_isf)%z3(:,:,1) ! fresh water flux from the isf (fwfisf <0 mean melting) 1409 ! 1410 ! ice shelf fwf 1411 IF( srcv(jpr_isf)%laction ) THEN 1412 fwfisf_oasis(:,:) = - frcv(jpr_isf)%z3(:,:,1) ! fresh water flux from the isf (fwfisf <0 mean melting) 1413 END IF 1409 1414 1410 1415 IF( ln_mixcpl ) THEN ; emp(:,:) = emp(:,:) * xcplmask(:,:,0) + zemp(:,:) * zmsk(:,:) … … 1709 1714 ENDIF 1710 1715 IF( srcv(jpr_isf)%laction ) THEN ! iceshelf (fwfisf <0 mean melting) 1711 fwfisf (:,:) = - frcv(jpr_isf)%z3(:,:,1)1716 fwfisf_oasis(:,:) = - frcv(jpr_isf)%z3(:,:,1) 1712 1717 ENDIF 1713 1718 … … 1748 1753 ENDIF 1749 1754 IF( srcv(jpr_isf)%laction ) THEN ! iceshelf (fwfisf <0 mean melting) 1750 fwfisf (:,:) = - frcv(jpr_isf)%z3(:,:,1)1755 fwfisf_oasis(:,:) = - frcv(jpr_isf)%z3(:,:,1) 1751 1756 ENDIF 1752 1757 ! -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/SBC/sbcfwb.F90
r11027 r12068 20 20 USE phycst ! physical constants 21 21 USE sbcrnf ! ocean runoffs 22 USE sbcisf! ice shelf melting contribution22 USE isf ! ice shelf melting contribution 23 23 USE sbcssr ! Sea-Surface damping terms 24 24 ! … … 105 105 ! 106 106 IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 107 y_fwfnow(1) = local_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf (:,:) - snwice_fmass(:,:) ) )107 y_fwfnow(1) = local_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) - snwice_fmass(:,:) ) ) 108 108 CALL mpp_delay_sum( 'sbcfwb', 'fwb', y_fwfnow(:), z_fwfprv(:), kt == nitend - nn_fsbc + 1 ) 109 109 z_fwfprv(1) = z_fwfprv(1) / area … … 160 160 ztmsk_neg(:,:) = tmask_i(:,:) - ztmsk_pos(:,:) 161 161 ! ! fwf global mean (excluding ocean to ice/snow exchanges) 162 z_fwf = glob_sum( 'sbcfwb', e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf (:,:) - snwice_fmass(:,:) ) ) / area162 z_fwf = glob_sum( 'sbcfwb', e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) - snwice_fmass(:,:) ) ) / area 163 163 ! 164 164 IF( z_fwf < 0._wp ) THEN ! spread out over >0 erp area to increase evaporation -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/SBC/sbcmod.F90
r11822 r12068 37 37 #endif 38 38 USE sbcice_cice ! surface boundary condition: CICE sea-ice model 39 USE sbcisf ! surface boundary condition: ice-shelf40 39 USE sbccpl ! surface boundary condition: coupled formulation 41 40 USE cpl_oasis3 ! OASIS routines for coupling … … 43 42 USE sbcrnf ! surface boundary condition: runoffs 44 43 USE sbcapr ! surface boundary condition: atmo pressure 45 USE sbcisf ! surface boundary condition: ice shelf46 44 USE sbcfwb ! surface boundary condition: freshwater budget 47 45 USE icbstp ! Icebergs … … 92 90 LOGICAL :: ll_purecpl, ll_opa, ll_not_nemo ! local logical 93 91 !! 94 NAMELIST/namsbc/ nn_fsbc , 95 & ln_usr , ln_flx , ln_blk ,&96 & ln_cpl , ln_mixcpl , nn_components,&97 & nn_ice , ln_ice_embd, 98 & ln_traqsr, ln_dm2dc ,&99 & ln_rnf , nn_fwb , ln_ssr , ln_isf , ln_apr_dyn ,&100 & ln_wave , ln_cdgw , ln_sdw , ln_tauwoc , ln_stcor ,&101 & ln_tauw , nn_lsm , nn_sdrift92 NAMELIST/namsbc/ nn_fsbc , & 93 & ln_usr , ln_flx , ln_blk , & 94 & ln_cpl , ln_mixcpl , nn_components, & 95 & nn_ice , ln_ice_embd, & 96 & ln_traqsr, ln_dm2dc , & 97 & ln_rnf , nn_fwb , ln_ssr , ln_apr_dyn, & 98 & ln_wave , ln_cdgw , ln_sdw , ln_tauwoc , ln_stcor, & 99 & ln_tauw , nn_lsm , nn_sdrift 102 100 !!---------------------------------------------------------------------- 103 101 ! … … 154 152 WRITE(numout,*) ' Patm gradient added in ocean & ice Eqs. ln_apr_dyn = ', ln_apr_dyn 155 153 WRITE(numout,*) ' runoff / runoff mouths ln_rnf = ', ln_rnf 156 WRITE(numout,*) ' iceshelf formulation ln_isf = ', ln_isf157 154 WRITE(numout,*) ' nb of iterations if land-sea-mask applied nn_lsm = ', nn_lsm 158 155 WRITE(numout,*) ' surface wave ln_wave = ', ln_wave … … 241 238 #endif 242 239 ! 243 IF( .NOT.ln_isf ) THEN !* No ice-shelf in the domain : allocate and set to zero244 IF( sbc_isf_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_isf arrays' )245 fwfisf (:,:) = 0._wp ; risf_tsc (:,:,:) = 0._wp246 fwfisf_b(:,:) = 0._wp ; risf_tsc_b(:,:,:) = 0._wp247 END IF248 240 IF( nn_ice == 0 ) THEN !* No sea-ice in the domain : ice fraction is always zero 249 241 IF( nn_components /= jp_iam_opa ) fr_i(:,:) = 0._wp ! except for OPA in SAS-OPA coupled case … … 335 327 IF( ln_ssr ) CALL sbc_ssr_init ! Sea-Surface Restoring initialization 336 328 ! 337 IF( ln_isf ) CALL sbc_isf_init( Kmm ) ! Compute iceshelves338 329 ! 339 330 CALL sbc_rnf_init( Kmm ) ! Runof initialization … … 404 395 rnf_b (:,: ) = rnf (:,: ) 405 396 rnf_tsc_b(:,:,:) = rnf_tsc(:,:,:) 406 ENDIF407 IF( ln_isf ) THEN408 fwfisf_b (:,: ) = fwfisf (:,: )409 risf_tsc_b(:,:,:) = risf_tsc(:,:,:)410 397 ENDIF 411 398 ! … … 458 445 ENDIF 459 446 460 IF( ln_isf ) CALL sbc_isf( kt, Kmm ) ! compute iceshelves 461 462 IF( ln_rnf ) CALL sbc_rnf( kt ) ! add runoffs to fresh water fluxes 447 IF( ln_rnf ) CALL sbc_rnf( kt ) ! add runoffs to fresh water fluxes 463 448 464 449 IF( ln_ssr ) CALL sbc_ssr( kt ) ! add SST/SSS damping term … … 561 546 ! 562 547 IF(ln_ctl) THEN ! print mean trends (used for debugging) 563 CALL prt_ctl(tab2d_1=fr_i , clinfo1=' fr_i - : ', mask1=tmask )564 CALL prt_ctl(tab2d_1=(emp-rnf + fwfisf) , clinfo1=' emp-rnf - : ', mask1=tmask )565 CALL prt_ctl(tab2d_1=(sfx-rnf + fwfisf) , clinfo1=' sfx-rnf - : ', mask1=tmask )566 CALL prt_ctl(tab2d_1=qns 567 CALL prt_ctl(tab2d_1=qsr 568 CALL prt_ctl(tab3d_1=tmask 548 CALL prt_ctl(tab2d_1=fr_i , clinfo1=' fr_i - : ', mask1=tmask ) 549 CALL prt_ctl(tab2d_1=(emp-rnf) , clinfo1=' emp-rnf - : ', mask1=tmask ) 550 CALL prt_ctl(tab2d_1=(sfx-rnf) , clinfo1=' sfx-rnf - : ', mask1=tmask ) 551 CALL prt_ctl(tab2d_1=qns , clinfo1=' qns - : ', mask1=tmask ) 552 CALL prt_ctl(tab2d_1=qsr , clinfo1=' qsr - : ', mask1=tmask ) 553 CALL prt_ctl(tab3d_1=tmask , clinfo1=' tmask - : ', mask1=tmask, kdim=jpk ) 569 554 CALL prt_ctl(tab3d_1=ts(:,:,:,jp_tem,Kmm), clinfo1=' sst - : ', mask1=tmask, kdim=1 ) 570 555 CALL prt_ctl(tab3d_1=ts(:,:,:,jp_sal,Kmm), clinfo1=' sss - : ', mask1=tmask, kdim=1 ) -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/SBC/sbcrnf.F90
r11822 r12068 19 19 USE phycst ! physical constants 20 20 USE sbc_oce ! surface boundary condition variables 21 USE sbcisf ! PM we could remove it I think21 USE isf ! ice shelf 22 22 USE eosbn2 ! Equation Of State 23 23 USE closea ! closed seas -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/TRA/traatf.F90
r11480 r12068 29 29 USE sbc_oce ! surface boundary condition: ocean 30 30 USE sbcrnf ! river runoffs 31 USE sbcisf! ice shelf melting31 USE isf ! ice shelf melting 32 32 USE zdf_oce ! ocean vertical mixing 33 33 USE domvvl ! variable volume … … 302 302 ! 303 303 IF( jk == mikt(ji,jj) ) THEN ! first level 304 ze3t_f = ze3t_f - zfact2 * ( (emp_b(ji,jj) - emp(ji,jj) ) & 305 & + (fwfisf_b(ji,jj) - fwfisf(ji,jj)) ) 304 ze3t_f = ze3t_f - zfact2 * ( emp_b(ji,jj) - emp(ji,jj) ) 306 305 ztc_f = ztc_f - zfact1 * ( psbc_tc(ji,jj,jn) - psbc_tc_b(ji,jj,jn) ) 307 306 ENDIF 308 307 IF( ln_rnf_depth ) THEN 309 308 ! Rivers are not just at the surface must go down to nk_rnf(ji,jj) 310 IF( mikt(ji,jj) <=jk .and.jk <= nk_rnf(ji,jj) ) THEN309 IF( jk <= nk_rnf(ji,jj) ) THEN 311 310 ze3t_f = ze3t_f - zfact2 * ( - (rnf_b(ji,jj) - rnf(ji,jj) ) ) & 312 311 & * ( e3t(ji,jj,jk,Kmm) / h_rnf(ji,jj) ) 313 312 ENDIF 314 313 ELSE 315 IF( jk == mikt(ji,jj)) THEN ! first level314 IF( jk == 1 ) THEN ! first level 316 315 ze3t_f = ze3t_f - zfact2 * ( - (rnf_b(ji,jj) - rnf(ji,jj) ) ) 317 316 ENDIF 318 317 ENDIF 318 ! 319 IF( ll_rnf .AND. jk <= nk_rnf(ji,jj) ) & 320 & ztc_f = ztc_f - zfact1 * ( rnf_tsc(ji,jj,jn) - rnf_tsc_b(ji,jj,jn) ) & 321 & * e3t(ji,jj,jk,Kmm) / h_rnf(ji,jj) 319 322 320 323 ! … … 323 326 & ztc_f = ztc_f - zfact1 * ( qsr_hc(ji,jj,jk) - qsr_hc_b(ji,jj,jk) ) 324 327 ! 325 ! river runoff 326 IF( ll_rnf .AND. jk <= nk_rnf(ji,jj) ) & 327 & ztc_f = ztc_f - zfact1 * ( rnf_tsc(ji,jj,jn) - rnf_tsc_b(ji,jj,jn) ) & 328 & * e3t(ji,jj,jk,Kmm) / h_rnf(ji,jj) 329 ! 328 ! 330 329 ! ice shelf 331 330 IF( ll_isf ) THEN 332 ! level fully include in the Losch_2008 ice shelf boundary layer 333 IF ( jk >= misfkt(ji,jj) .AND. jk < misfkb(ji,jj) ) & 334 ztc_f = ztc_f - zfact1 * ( risf_tsc(ji,jj,jn) - risf_tsc_b(ji,jj,jn) ) & 335 & * e3t(ji,jj,jk,Kmm) * r1_hisf_tbl (ji,jj) 336 ! level partially include in Losch_2008 ice shelf boundary layer 337 IF ( jk == misfkb(ji,jj) ) & 338 ztc_f = ztc_f - zfact1 * ( risf_tsc(ji,jj,jn) - risf_tsc_b(ji,jj,jn) ) & 339 & * e3t(ji,jj,jk,Kmm) * r1_hisf_tbl (ji,jj) * ralpha(ji,jj) 331 ! 332 ! melt in the cavity 333 IF ( ln_isfcav_mlt ) THEN 334 ! level fully include in the Losch_2008 ice shelf boundary layer 335 IF ( jk >= misfkt_cav(ji,jj) .AND. jk < misfkb_cav(ji,jj) ) THEN 336 ztc_f = ztc_f - zfact1 * ( risf_cav_tsc(ji,jj,jn) - risf_cav_tsc_b(ji,jj,jn) ) & 337 & * e3t(ji,jj,jk,Kmm) / rhisf_tbl_cav(ji,jj) 338 ze3t_f = ze3t_f - zfact2 * ( fwfisf_cav_b(ji,jj) - fwfisf_cav(ji,jj) ) & 339 & * e3t(ji,jj,jk,Kmm) / rhisf_tbl_cav(ji,jj) 340 END IF 341 ! level partially include in Losch_2008 ice shelf boundary layer 342 IF ( jk == misfkb_cav(ji,jj) ) THEN 343 ztc_f = ztc_f - zfact1 * ( risf_cav_tsc(ji,jj,jn) - risf_cav_tsc_b(ji,jj,jn) ) & 344 & * e3t(ji,jj,jk,Kmm) / rhisf_tbl_cav(ji,jj) * rfrac_tbl_cav(ji,jj) 345 ze3t_f = ze3t_f - zfact2 * ( fwfisf_cav_b(ji,jj) - fwfisf_cav(ji,jj) ) & 346 & * e3t(ji,jj,jk,Kmm) / rhisf_tbl_cav(ji,jj) * rfrac_tbl_cav(ji,jj) 347 END IF 348 END IF 349 ! 350 ! parametrised melt (cavity closed) 351 IF ( ln_isfpar_mlt ) THEN 352 ! level fully include in the Losch_2008 ice shelf boundary layer 353 IF ( jk >= misfkt_par(ji,jj) .AND. jk < misfkb_par(ji,jj) ) THEN 354 ztc_f = ztc_f - zfact1 * ( risf_par_tsc(ji,jj,jn) - risf_par_tsc_b(ji,jj,jn) ) & 355 & * e3t(ji,jj,jk,Kmm) / rhisf_tbl_par(ji,jj) 356 ze3t_f = ze3t_f - zfact2 * ( fwfisf_par_b(ji,jj) - fwfisf_par(ji,jj) ) & 357 & * e3t(ji,jj,jk,Kmm) / rhisf_tbl_par(ji,jj) 358 END IF 359 ! level partially include in Losch_2008 ice shelf boundary layer 360 IF ( jk == misfkb_par(ji,jj) ) THEN 361 ztc_f = ztc_f - zfact1 * ( risf_par_tsc(ji,jj,jn) - risf_par_tsc_b(ji,jj,jn) ) & 362 & * e3t(ji,jj,jk,Kmm) / rhisf_tbl_par(ji,jj) * rfrac_tbl_par(ji,jj) 363 ze3t_f = ze3t_f - zfact2 * ( fwfisf_par_b(ji,jj) - fwfisf_par(ji,jj) ) & 364 & * e3t(ji,jj,jk,Kmm) / rhisf_tbl_par(ji,jj) * rfrac_tbl_par(ji,jj) 365 END IF 366 END IF 367 ! 368 ! ice sheet coupling correction 369 IF ( ln_isfcpl ) THEN 370 ! 371 ! at kt = nit000, risfcpl_vol_n = 0 and risfcpl_vol_b = risfcpl_vol so contribution nul 372 IF ( ln_rstart .AND. kt == nit000+1 ) THEN 373 ztc_f = ztc_f + zfact1 * risfcpl_tsc(ji,jj,jk,jn) * r1_e1e2t(ji,jj) 374 ze3t_f = ze3t_f - zfact1 * risfcpl_vol(ji,jj,jk ) * r1_e1e2t(ji,jj) 375 END IF 376 ! 377 END IF 378 ! 340 379 END IF 341 380 ! -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/TRA/traisf.F90
r11970 r12068 35 35 CONTAINS 36 36 37 SUBROUTINE tra_isf ( kt )37 SUBROUTINE tra_isf ( kt, Kmm, pts, Krhs ) 38 38 !!---------------------------------------------------------------------- 39 39 !! *** ROUTINE tra_isf *** … … 41 41 !! ** Purpose : Compute the temperature trend due to the ice shelf melting (qhoce + qhc) 42 42 !! 43 !! ** Action : - update tsafor cav, par and cpl case43 !! ** Action : - update pts(:,:,:,:,Krhs) for cav, par and cpl case 44 44 !!---------------------------------------------------------------------- 45 INTEGER, INTENT(in) :: kt ! ocean time-step index 45 INTEGER , INTENT(in ) :: kt ! ocean time step 46 INTEGER , INTENT(in ) :: Kmm, Krhs ! ocean time level indices 47 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts ! active tracers and RHS of tracer equation 46 48 !!---------------------------------------------------------------------- 47 49 ! … … 55 57 ! 56 58 ! cavity case 57 IF ( ln_isfcav_mlt ) CALL tra_isf_mlt(misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, risf_cav_tsc, risf_cav_tsc_b, tsa)59 IF ( ln_isfcav_mlt ) CALL tra_isf_mlt(misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, risf_cav_tsc, risf_cav_tsc_b, pts(:,:,:,:,Krhs)) 58 60 ! 59 61 ! parametrisation case 60 IF ( ln_isfpar_mlt ) CALL tra_isf_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, risf_par_tsc, risf_par_tsc_b, tsa)62 IF ( ln_isfpar_mlt ) CALL tra_isf_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, risf_par_tsc, risf_par_tsc_b, pts(:,:,:,:,Krhs)) 61 63 ! 62 64 ! ice sheet coupling case 63 65 IF ( ln_isfcpl ) THEN 64 66 ! 65 IF ( kt == nit000 ) CALL tra_isf_cpl( risfcpl_tsc , tsa)66 IF ( kt == nit000+1) CALL tra_isf_cpl( risfcpl_tsc*0.5_wp, tsa)67 IF ( kt == nit000 ) CALL tra_isf_cpl(Kmm, risfcpl_tsc , pts(:,:,:,:,Krhs)) 68 IF ( kt == nit000+1) CALL tra_isf_cpl(Kmm, risfcpl_tsc*0.5_wp, pts(:,:,:,:,Krhs)) 67 69 ! 68 70 ! ensure 0 trend due to unconservation of the ice shelf coupling 69 IF ( ln_isfcpl_cons ) CALL tra_isf_cpl( risfcpl_cons_tsc, tsa)71 IF ( ln_isfcpl_cons ) CALL tra_isf_cpl(Kmm, risfcpl_cons_tsc, pts(:,:,:,:,Krhs)) 70 72 ! 71 73 END IF 72 74 ! 73 75 IF ( ln_isfdebug ) THEN 74 CALL debug('tra_isf: tsa T', tsa(:,:,:,1))75 CALL debug('tra_isf: tsa S', tsa(:,:,:,2))76 CALL debug('tra_isf: pts(:,:,:,:,Krhs) T', pts(:,:,:,1,Krhs)) 77 CALL debug('tra_isf: pts(:,:,:,:,Krhs) S', pts(:,:,:,2,Krhs)) 76 78 END IF 77 79 ! … … 86 88 !! *** Purpose : Compute the temperature trend due to the ice shelf melting (qhoce + qhc) for cav or par case 87 89 !! 88 !! *** Action :: Update tsawith the surface boundary condition trend90 !! *** Action :: Update pts(:,:,:,:,Krhs) with the surface boundary condition trend 89 91 !! 90 92 !!---------------------------------------------------------------------- … … 103 105 ztc(:,:) = 0.5_wp * ( ptsc(:,:,jp_tem) + ptsc_b(:,:,jp_tem) ) / phtbl(:,:) 104 106 ! 105 ! update tsa107 ! update pts(:,:,:,:,Krhs) 106 108 DO jj = 1,jpj 107 109 DO ji = 1,jpi … … 123 125 END SUBROUTINE tra_isf_mlt 124 126 ! 125 SUBROUTINE tra_isf_cpl( ptsc, ptsa )127 SUBROUTINE tra_isf_cpl( Kmm, ptsc, ptsa ) 126 128 !!---------------------------------------------------------------------- 127 129 !! *** ROUTINE tra_isf_cpl *** 128 130 !! 129 !! *** Action :: Update tsawith the ice shelf coupling trend131 !! *** Action :: Update pts(:,:,:,:,Krhs) with the ice shelf coupling trend 130 132 !! 131 133 !!---------------------------------------------------------------------- 132 134 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(inout) :: ptsa 133 135 !!---------------------------------------------------------------------- 136 INTEGER , INTENT(in ) :: Kmm ! ocean time level index 134 137 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in ) :: ptsc 135 138 !!---------------------------------------------------------------------- … … 138 141 ! 139 142 DO jk = 1,jpk 140 ptsa(:,:,jk,jp_tem) = ptsa(:,:,jk,jp_tem) + ptsc(:,:,jk,jp_tem) * r1_e1e2t(:,:) / e3t _n(:,:,jk)141 ptsa(:,:,jk,jp_sal) = ptsa(:,:,jk,jp_sal) + ptsc(:,:,jk,jp_sal) * r1_e1e2t(:,:) / e3t _n(:,:,jk)143 ptsa(:,:,jk,jp_tem) = ptsa(:,:,jk,jp_tem) + ptsc(:,:,jk,jp_tem) * r1_e1e2t(:,:) / e3t(:,:,jk,Kmm) 144 ptsa(:,:,jk,jp_sal) = ptsa(:,:,jk,jp_sal) + ptsc(:,:,jk,jp_sal) * r1_e1e2t(:,:) / e3t(:,:,jk,Kmm) 142 145 END DO 143 146 ! -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/TRA/trasbc.F90
r11480 r12068 10 10 !! - ! 2010-09 (C. Ethe, G. Madec) Merge TRA-TRC 11 11 !! 3.6 ! 2014-11 (P. Mathiot) isf melting forcing 12 !! 4.1 ! 2019-09 (P. Mathiot) isf moved in traisf 12 13 !!---------------------------------------------------------------------- 13 14 … … 22 23 USE sbcmod ! ln_rnf 23 24 USE sbcrnf ! River runoff 24 USE sbcisf ! Ice shelf25 USE iscplini ! Ice sheet coupling26 25 USE traqsr ! solar radiation penetration 27 26 USE trd_oce ! trends: ocean variables … … 62 61 !! (1) Fext, external forcing (i.e. flux through the (air+ice)-sea interface); 63 62 !! (2) Fwe , tracer carried with the water that is exchanged with air+ice. 64 !! The input forcing fields (emp, rnf, sfx , isf) contain Fext+Fwe,63 !! The input forcing fields (emp, rnf, sfx) contain Fext+Fwe, 65 64 !! they are simply added to the tracer trend (ts(Krhs)). 66 65 !! In linear free surface case (ln_linssh=T), the volume of the … … 155 154 IF( lwxios ) CALL iom_swap( cxios_context ) 156 155 ENDIF 157 !158 !----------------------------------------159 ! Ice Shelf effects (ISF)160 ! tbl treated as in Losh (2008) JGR161 !----------------------------------------162 !163 !!gm BUG ? Why no differences between non-linear and linear free surface ?164 !!gm probably taken into account in r1_hisf_tbl : to be verified165 IF( ln_isf ) THEN166 zfact = 0.5_wp167 DO jj = 2, jpj168 DO ji = fs_2, fs_jpim1169 !170 ikt = misfkt(ji,jj)171 ikb = misfkb(ji,jj)172 !173 ! level fully include in the ice shelf boundary layer174 ! sign - because fwf sign of evapo (rnf sign of precip)175 DO jk = ikt, ikb - 1176 ! compute trend177 pts(ji,jj,jk,jp_tem,Krhs) = pts(ji,jj,jk,jp_tem,Krhs) &178 & + zfact * ( risf_tsc_b(ji,jj,jp_tem) + risf_tsc(ji,jj,jp_tem) ) &179 & * r1_hisf_tbl(ji,jj)180 END DO181 182 ! level partially include in ice shelf boundary layer183 ! compute trend184 pts(ji,jj,ikb,jp_tem,Krhs) = pts(ji,jj,ikb,jp_tem,Krhs) &185 & + zfact * ( risf_tsc_b(ji,jj,jp_tem) + risf_tsc(ji,jj,jp_tem) ) &186 & * r1_hisf_tbl(ji,jj) * ralpha(ji,jj)187 188 END DO189 END DO190 END IF191 156 ! 192 157 !---------------------------------------- … … 244 209 #endif 245 210 ! 246 !----------------------------------------247 ! Ice Sheet coupling imbalance correction to have conservation248 !----------------------------------------249 !250 IF( ln_iscpl .AND. ln_hsb) THEN ! input of heat and salt due to river runoff251 DO jk = 1,jpk252 DO jj = 2, jpj253 DO ji = fs_2, fs_jpim1254 zdep = 1._wp / e3t(ji,jj,jk,Kmm)255 pts(ji,jj,jk,jp_tem,Krhs) = pts(ji,jj,jk,jp_tem,Krhs) - htsc_iscpl(ji,jj,jk,jp_tem) * zdep256 pts(ji,jj,jk,jp_sal,Krhs) = pts(ji,jj,jk,jp_sal,Krhs) - htsc_iscpl(ji,jj,jk,jp_sal) * zdep257 END DO258 END DO259 END DO260 ENDIF261 262 211 IF( l_trdtra ) THEN ! save the horizontal diffusive trends for further diagnostics 263 212 ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:) -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ZDF/zdfmxl.F90
r10955 r12068 12 12 !!---------------------------------------------------------------------- 13 13 USE oce ! ocean dynamics and tracers variables 14 USE isf ! ice shelf 14 15 USE dom_oce ! ocean space and time domain variables 15 16 USE trc_oce , ONLY: l_offline ! ocean space and time domain variables -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/nemogcm.F90
r11822 r12068 61 61 USE diaharm ! tidal harmonics diagnostics (dia_harm_init routine) 62 62 USE step ! NEMO time-stepping (stp routine) 63 USE isfstp ! ice shelf (isf_stp_init routine) 63 64 USE icbini ! handle bergs, initialisation 64 65 USE icbstp ! handle bergs, calving, themodynamics and transport … … 436 437 RETURN ! end of initialization 437 438 ENDIF 439 ! 438 440 439 441 CALL istate_init( Nbb, Nnn, Naa ) ! ocean initial state (Dynamics and tracers) … … 476 478 ! ! Icebergs 477 479 CALL icb_init( rdt, nit000) ! initialise icebergs instance 480 481 ! ice shelf 482 CALL isf_init( Nbb, Nnn, Naa ) 478 483 479 484 ! ! Misc. options -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/step.F90
r11822 r12068 117 117 ! Update external forcing (tides, open boundaries, and surface boundary condition (including sea-ice) 118 118 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 119 IF( ln_isf ) CALL isf_stp ( kstp, Nnn ) 119 120 IF( ln_tide ) CALL sbc_tide( kstp ) ! update tide potential 120 121 IF( ln_apr_dyn ) CALL sbc_apr ( kstp ) ! atmospheric pressure (NB: call before bdy_dta which needs ssh_ib) … … 237 238 CALL tra_sbc ( kstp, Nnn, ts, Nrhs ) ! surface boundary condition 238 239 IF( ln_traqsr ) CALL tra_qsr ( kstp, Nnn, ts, Nrhs ) ! penetrative solar radiation qsr 240 IF( ln_isf ) CALL tra_isf ( kstp, Nnn, ts, Nrhs ) ! ice shelf heat flux 239 241 IF( ln_trabbc ) CALL tra_bbc ( kstp, Nnn, ts, Nrhs ) ! bottom heat flux 240 242 IF( ln_trabbl ) CALL tra_bbl ( kstp, Nbb, Nnn, ts, Nrhs ) ! advective (and/or diffusive) bottom boundary layer scheme -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/step_oce.F90
r11480 r12068 22 22 USE sbcwave ! Wave intialisation 23 23 24 USE isf 25 USE isfstp ! ice shelf boundary condition (isf_stp routine) 26 24 27 USE traqsr ! solar radiation penetration (tra_qsr routine) 28 USE traisf ! ice shelf (tra_isf routine) 25 29 USE trasbc ! surface boundary condition (tra_sbc routine) 26 30 USE trabbc ! bottom boundary condition (tra_bbc routine) -
NEMO/branches/2019/UKMO_MERGE_2019/tests/ISOMIP/EXPREF/file_def_nemo-oce.xml
r9572 r12068 27 27 <field field_ref="ssh" name="sossheig" /> 28 28 <!-- variable for ice shelf --> 29 <field field_ref="qlatisf" name="sohflisf" /> 30 <field field_ref="fwfisf" name="sowflisf" /> 29 <field field_ref="fwfisf_cav" name="sowflisf" /> 31 30 <field field_ref="isfgammat" name="sogammat" /> 32 31 <field field_ref="isfgammas" name="sogammas" /> -
NEMO/branches/2019/UKMO_MERGE_2019/tests/ISOMIP/EXPREF/namelist_cfg
r11822 r12068 46 46 rn_rdt = 1800. ! time step for the dynamics (and tracer if nn_acc=0) 47 47 / 48 !----------------------------------------------------------------------- 49 &namcfg ! parameters of the configuration (default: use namusr_def in namelist_cfg) 50 !----------------------------------------------------------------------- 51 / 52 !----------------------------------------------------------------------- 53 &namtsd ! Temperature & Salinity Data (init/dmp) (default: OFF) 54 !----------------------------------------------------------------------- 55 56 / 57 !----------------------------------------------------------------------- 58 &namwad ! Wetting and Drying (WaD) (default: OFF) 59 !----------------------------------------------------------------------- 60 / 61 !----------------------------------------------------------------------- 62 &namcrs ! coarsened grid (for outputs and/or TOP) (ln_crs =T) 63 !----------------------------------------------------------------------- 64 / 65 !----------------------------------------------------------------------- 66 &namc1d ! 1D configuration options ("key_c1d" default: PAPA station) 67 !----------------------------------------------------------------------- 68 / 69 !----------------------------------------------------------------------- 70 &namc1d_dyndmp ! U & V newtonian damping ("key_c1d" default: OFF) 71 !----------------------------------------------------------------------- 72 / 73 !----------------------------------------------------------------------- 74 &namc1d_uvd ! data: U & V currents ("key_c1d" default: OFF) 75 !----------------------------------------------------------------------- 76 77 / 78 48 79 !!====================================================================== 49 80 !! *** Surface Boundary Condition namelists *** !! … … 59 90 !! namsbc_rnf river runoffs (ln_rnf =T) 60 91 !! namsbc_apr Atmospheric Pressure (ln_apr_dyn =T) 61 !! namsbc_isf ice shelf melting/freezing (ln_isfcav =T : read (ln_read_cfg=T) or set or usr_def_zgr )62 !! namsbc_iscpl coupling option between land ice model and ocean (ln_isfcav =T)63 92 !! namsbc_wave external fields from wave model (ln_wave =T) 64 93 !! namberg iceberg floats (ln_icebergs=T) … … 66 95 ! 67 96 !----------------------------------------------------------------------- 68 &namsbc ! Surface Boundary Condition (surface module) 69 !----------------------------------------------------------------------- 70 nn_fsbc = 1 ! frequency of surface boundary condition computation 97 &namsbc ! Surface Boundary Condition manager (default: NO selection) 98 !----------------------------------------------------------------------- 99 nn_fsbc = 1 ! frequency of SBC module call 100 ! ! (control sea-ice & iceberg model call) 71 101 ln_usr = .true. ! user defined formulation (T => check usrdef_sbc) 72 ln_isf = .true. ! ice shelf melting/freezing (T => fill namsbc_isf) 73 / 74 !----------------------------------------------------------------------- 75 &namsbc_isf ! Top boundary layer (ISF) (ln_isfcav =T : read (ln_read_cfg=T) 76 !----------------------------------------------------------------------- or set or usr_def_zgr ) 77 ! ! file name ! frequency (hours) ! variable ! time interpol. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask ! 78 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename ! 79 ! nn_isf == 4 80 sn_fwfisf = 'rnfisf' , -12. ,'sowflisf', .false. , .true. , 'yearly' , '' , '' , '' 81 ! nn_isf == 3 82 sn_rnfisf = 'rnfisf' , -12. ,'sofwfisf', .false. , .true. , 'yearly' , '' , '' , '' 83 ! nn_isf == 2 and 3 84 sn_depmax_isf = 'rnfisf' , -12. ,'sozisfmax' , .false. , .true. , 'yearly' , '' , '' , '' 85 sn_depmin_isf = 'rnfisf' , -12. ,'sozisfmin' , .false. , .true. , 'yearly' , '' , '' , '' 86 ! nn_isf == 2 87 sn_Leff_isf = 'rnfisf' , -12. ,'Leff' , .false. , .true. , 'yearly' , '' , '' , '' 88 ! for all case 89 nn_isf = 1 ! ice shelf melting/freezing 90 ! 1 = presence of ISF 2 = bg03 parametrisation 91 ! 3 = rnf file for isf 4 = ISF fwf specified 92 ! option 1 and 4 need ln_isfcav = .true. (domzgr) 93 ! only for nn_isf = 1 or 2 94 rn_gammat0 = 1.0e-4 ! gammat coefficient used in blk formula 95 rn_gammas0 = 1.0e-4 ! gammas coefficient used in blk formula 96 ! only for nn_isf = 1 or 4 97 rn_hisf_tbl = 30. ! thickness of the top boundary layer (Losh et al. 2008) 98 ! 0 => thickness of the tbl = thickness of the first wet cell 99 ! only for nn_isf = 1 100 nn_isfblk = 1 ! 1 ISOMIP like: 2 equations formulation (Hunter et al., 2006) 101 ! 2 ISOMIP+ like: 3 equations formulation (Asay-Davis et al., 2015) 102 nn_gammablk = 0 ! 0 = cst Gammat (= gammat/s) 103 ! 1 = velocity dependend Gamma (u* * gammat/s) (Jenkins et al. 2010) 104 ! 2 = velocity and stability dependent Gamma (Holland et al. 1999) 105 / 106 !----------------------------------------------------------------------- 107 &namsbc_iscpl ! land ice / ocean coupling option 108 !----------------------------------------------------------------------- 109 / 102 / 103 !----------------------------------------------------------------------- 104 &namsbc_flx ! surface boundary condition : flux formulation (ln_flx =T) 105 !----------------------------------------------------------------------- 106 / 107 !----------------------------------------------------------------------- 108 &namsbc_blk ! namsbc_blk generic Bulk formula (ln_blk =T) 109 !----------------------------------------------------------------------- 110 111 / 112 !----------------------------------------------------------------------- 113 &namsbc_cpl ! coupled ocean/atmosphere model ("key_oasis3") 114 !----------------------------------------------------------------------- 115 116 / 117 !----------------------------------------------------------------------- 118 &namsbc_sas ! Stand-Alone Surface module: ocean data (SAS_SRC only) 119 !----------------------------------------------------------------------- 120 121 / 122 !----------------------------------------------------------------------- 123 &namsbc_iif ! Ice-IF : use observed ice cover (nn_ice = 1) 124 !----------------------------------------------------------------------- 125 / 126 !----------------------------------------------------------------------- 127 &namtra_qsr ! penetrative solar radiation (ln_traqsr =T) 128 !----------------------------------------------------------------------- 129 130 / 131 !----------------------------------------------------------------------- 132 &namsbc_ssr ! surface boundary condition : sea surface restoring (ln_ssr =T) 133 !----------------------------------------------------------------------- 134 135 / 136 !----------------------------------------------------------------------- 137 &namsbc_rnf ! runoffs (ln_rnf =T) 138 !----------------------------------------------------------------------- 139 140 / 141 !----------------------------------------------------------------------- 142 &namsbc_apr ! Atmospheric pressure used as ocean forcing (ln_apr_dyn =T) 143 !----------------------------------------------------------------------- 144 145 / 146 !----------------------------------------------------------------------- 147 &namisf ! Top boundary layer (ISF) (default: OFF) 148 !----------------------------------------------------------------------- 149 ! 150 ! ---------------- ice shelf load ------------------------------- 151 ! 152 cn_isfload = 'isomip' ! scheme to compute ice shelf load (ln_isfcav = .true. in domain_cfg.nc) 153 ! 154 ! ---------------- ice shelf melt formulation ------------------------------- 155 ! 156 ln_isf = .true. ! activate ice shelf module 157 cn_isfdir = './' ! directory for all ice shelf input file 158 ! 159 ! ---------------- cavities opened ------------------------------- 160 ! 161 ln_isfcav_mlt = .true. ! ice shelf melting into the cavity (need ln_isfcav = .true. in domain_cfg.nc) 162 cn_isfcav_mlt = '2eq' ! ice shelf melting formulation (spe/2eq/3eq/oasis) 163 ! ! spe = fwfisf is read from a forcing field 164 ! ! 2eq = ISOMIP like: 2 equations formulation (Hunter et al., 2006) 165 ! ! 3eq = ISOMIP+ like: 3 equations formulation (Asay-Davis et al., 2015) 166 ! ! oasis = fwfisf is given by oasis and pattern by file sn_isfcav_fwf 167 ! ! cn_isfcav_mlt = 2eq or 3eq cases: 168 cn_gammablk = 'spe' ! scheme to compute gammat/s (spe,ad15,hj99) 169 ! ! ad15 = velocity dependend Gamma (u* * gammat/s) (Jenkins et al. 2010) 170 ! ! hj99 = velocity and stability dependent Gamma (Holland et al. 1999) 171 rn_gammat0 = 1.e-4 ! gammat coefficient used in blk formula 172 rn_gammas0 = 1.e-4 ! gammas coefficient used in blk formula 173 ! 174 rn_htbl = 30. ! thickness of the top boundary layer (Losh et al. 2008) 175 ! ! 0 => thickness of the tbl = thickness of the first wet cell 176 ! 177 / 178 !----------------------------------------------------------------------- 179 &namsbc_wave ! External fields from wave model (ln_wave=T) 180 !----------------------------------------------------------------------- 181 / 182 !----------------------------------------------------------------------- 183 &namberg ! iceberg parameters (default: OFF) 184 !----------------------------------------------------------------------- 185 186 / 187 110 188 !!====================================================================== 111 189 !! *** Lateral boundary condition *** !! … … 124 202 rn_shlat = 0. ! free slip 125 203 / 204 !----------------------------------------------------------------------- 205 &namagrif ! AGRIF zoom ("key_agrif") 206 !----------------------------------------------------------------------- 207 / 208 !----------------------------------------------------------------------- 209 &nam_tide ! tide parameters (default: OFF) 210 !----------------------------------------------------------------------- 211 / 212 !----------------------------------------------------------------------- 213 &nambdy ! unstructured open boundaries (default: OFF) 214 !----------------------------------------------------------------------- 215 / 216 !----------------------------------------------------------------------- 217 &nambdy_dta ! open boundaries - external data (see nam_bdy) 218 !----------------------------------------------------------------------- 219 220 / 221 !----------------------------------------------------------------------- 222 &nambdy_tide ! tidal forcing at open boundaries (default: OFF) 223 !----------------------------------------------------------------------- 224 / 225 126 226 !!====================================================================== 127 227 !! *** Top/Bottom boundary condition *** !! … … 145 245 / 146 246 !----------------------------------------------------------------------- 147 &namdrg_top ! TOP friction (ln_ isfcav=T)247 &namdrg_top ! TOP friction (ln_OFF =F & ln_isfcav=T) 148 248 !----------------------------------------------------------------------- 149 249 rn_Cd0 = 2.5e-3 ! drag coefficient [-] … … 156 256 / 157 257 !----------------------------------------------------------------------- 158 &namdrg_bot ! BOTTOM friction 258 &namdrg_bot ! BOTTOM friction (ln_OFF =F) 159 259 !----------------------------------------------------------------------- 160 260 rn_Cd0 = 1.e-3 ! drag coefficient [-] … … 166 266 rn_boost = 50. ! local boost factor [-] 167 267 / 268 !----------------------------------------------------------------------- 269 &nambbc ! bottom temperature boundary condition (default: OFF) 270 !----------------------------------------------------------------------- 271 272 / 273 !----------------------------------------------------------------------- 274 &nambbl ! bottom boundary layer scheme (default: OFF) 275 !----------------------------------------------------------------------- 276 / 277 168 278 !!====================================================================== 169 279 !! Tracer (T-S) namelists !! … … 178 288 ! 179 289 !----------------------------------------------------------------------- 180 &nameos ! ocean Equation Of Seawater (default: OFF)290 &nameos ! ocean Equation Of Seawater (default: NO selection) 181 291 !----------------------------------------------------------------------- 182 292 ln_eos80 = .true. ! = Use EOS80 equation of state … … 199 309 rn_Ld = 10.e+3 ! lateral diffusive length [m] 200 310 / 311 !----------------------------------------------------------------------- 312 &namtra_mle ! mixed layer eddy parametrisation (Fox-Kemper) (default: OFF) 313 !----------------------------------------------------------------------- 314 / 315 !----------------------------------------------------------------------- 316 &namtra_eiv ! eddy induced velocity param. (default: OFF) 317 !----------------------------------------------------------------------- 318 / 319 !----------------------------------------------------------------------- 320 &namtra_dmp ! tracer: T & S newtonian damping (default: OFF) 321 !----------------------------------------------------------------------- 322 / 323 201 324 !!====================================================================== 202 325 !! *** Dynamics namelists *** !! … … 212 335 ! 213 336 !----------------------------------------------------------------------- 337 &nam_vvl ! vertical coordinate options (default: z-star) 338 !----------------------------------------------------------------------- 339 / 340 !----------------------------------------------------------------------- 214 341 &namdyn_adv ! formulation of the momentum advection (default: NO selection) 215 342 !----------------------------------------------------------------------- … … 218 345 / 219 346 !----------------------------------------------------------------------- 220 &namdyn_vor ! Vorticity / Coriolis scheme (default: OFF)347 &namdyn_vor ! Vorticity / Coriolis scheme (default: NO selection) 221 348 !----------------------------------------------------------------------- 222 349 ln_dynvor_ene = .true. ! energy conserving scheme … … 241 368 rn_Lv = 10.e+3 ! lateral viscous length [m] 242 369 / 370 !----------------------------------------------------------------------- 371 &namdta_dyn ! offline ocean input files (OFF_SRC only) 372 !----------------------------------------------------------------------- 373 374 / 375 243 376 !!====================================================================== 244 377 !! vertical physics namelists !! … … 253 386 ! 254 387 !----------------------------------------------------------------------- 255 &namzdf ! vertical physics 256 !----------------------------------------------------------------------- 257 ! ! type of vertical closure 388 &namzdf ! vertical physics manager (default: NO selection) 389 !----------------------------------------------------------------------- 390 ! ! type of vertical closure (required) 258 391 ln_zdfcst = .true. ! constant mixing 392 ! 393 ! ! convection 259 394 ln_zdfevd = .true. ! enhanced vertical diffusion 260 nn_evdm = 1 ! apply on tracer (=0) or on tracer and momentum (=1)261 rn_evd = 0.1 ! mixing coefficient [m2/s]395 rn_evd = 0.1 ! mixing coefficient [m2/s] 396 ! 262 397 ! ! coefficients 263 rn_avm0 = 1.e-3 ! vertical eddy viscosity [m2/s] 264 rn_avt0 = 5.e-5 ! vertical eddy diffusivity [m2/s] 265 / 398 rn_avm0 = 1.e-3 ! vertical eddy viscosity [m2/s] (background Kz if ln_zdfcst) 399 rn_avt0 = 5.e-5 ! vertical eddy diffusivity [m2/s] (background Kz if ln_zdfcst) 400 / 401 !----------------------------------------------------------------------- 402 &namzdf_ric ! richardson number dependent vertical diffusion (ln_zdfric =T) 403 !----------------------------------------------------------------------- 404 / 405 !----------------------------------------------------------------------- 406 &namzdf_tke ! turbulent eddy kinetic dependent vertical diffusion (ln_zdftke =T) 407 !----------------------------------------------------------------------- 408 / 409 !----------------------------------------------------------------------- 410 &namzdf_gls ! GLS vertical diffusion (ln_zdfgls =T) 411 !----------------------------------------------------------------------- 412 / 413 !----------------------------------------------------------------------- 414 &namzdf_osm ! OSM vertical diffusion (ln_zdfosm =T) 415 !----------------------------------------------------------------------- 416 / 417 !----------------------------------------------------------------------- 418 &namzdf_iwm ! internal wave-driven mixing parameterization (ln_zdfiwm =T) 419 !----------------------------------------------------------------------- 420 / 421 266 422 !!====================================================================== 267 423 !! *** Diagnostics namelists *** !! … … 280 436 !!====================================================================== 281 437 ! 438 !----------------------------------------------------------------------- 439 &namtrd ! trend diagnostics (default: OFF) 440 !----------------------------------------------------------------------- 441 / 442 !----------------------------------------------------------------------- 443 &namptr ! Poleward Transport Diagnostic (default: OFF) 444 !----------------------------------------------------------------------- 445 / 446 !----------------------------------------------------------------------- 447 &namhsb ! Heat and salt budgets (default: OFF) 448 !----------------------------------------------------------------------- 449 / 450 !----------------------------------------------------------------------- 451 &namdiu ! Cool skin and warm layer models (default: OFF) 452 !----------------------------------------------------------------------- 453 / 454 !----------------------------------------------------------------------- 455 &namflo ! float parameters ("key_float") 456 !----------------------------------------------------------------------- 457 / 458 !----------------------------------------------------------------------- 459 &nam_diaharm ! Harmonic analysis of tidal constituents ("key_diaharm") 460 !----------------------------------------------------------------------- 461 / 462 !----------------------------------------------------------------------- 463 &namdct ! transports through some sections ("key_diadct") 464 !----------------------------------------------------------------------- 465 / 466 !----------------------------------------------------------------------- 467 &nam_diatmb ! Top Middle Bottom Output (default: OFF) 468 !----------------------------------------------------------------------- 469 / 470 !----------------------------------------------------------------------- 471 &nam_dia25h ! 25h Mean Output (default: OFF) 472 !----------------------------------------------------------------------- 473 / 474 !----------------------------------------------------------------------- 475 &namnc4 ! netcdf4 chunking and compression settings ("key_netcdf4") 476 !----------------------------------------------------------------------- 477 / 478 282 479 !!====================================================================== 283 480 !! *** Observation & Assimilation *** !! … … 287 484 !!====================================================================== 288 485 ! 486 !----------------------------------------------------------------------- 487 &namobs ! observation usage switch (default: OFF) 488 !----------------------------------------------------------------------- 489 / 490 !----------------------------------------------------------------------- 491 &nam_asminc ! assimilation increments ('key_asminc') 492 !----------------------------------------------------------------------- 493 / 494 289 495 !!====================================================================== 290 496 !! *** Miscellaneous namelists *** !! -
NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_flux_cen2_cfg
r10075 r12068 32 32 !----------------------------------------------------------------------- 33 33 ln_linssh = .false. ! =T linear free surface ==>> model level are fixed in time 34 !35 rn_isfhmin = 0.00 ! treshold (m) to discriminate grounding ice to floating ice36 34 ! 37 35 rn_rdt = 1. ! time step for the dynamics (and tracer if nn_acc=0) -
NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_flux_ubs_cfg
r11822 r12068 46 46 !----------------------------------------------------------------------- 47 47 ln_linssh = .false. ! =T linear free surface ==>> model level are fixed in time 48 !49 rn_isfhmin = 0.00 ! treshold (m) to discriminate grounding ice to floating ice50 48 ! 51 49 rn_rdt = 1. ! time step for the dynamics (and tracer if nn_acc=0) -
NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_eenH_cfg
r10075 r12068 32 32 !----------------------------------------------------------------------- 33 33 ln_linssh = .false. ! =T linear free surface ==>> model level are fixed in time 34 !35 rn_isfhmin = 0.00 ! treshold (m) to discriminate grounding ice to floating ice36 34 ! 37 35 rn_rdt = 1. ! time step for the dynamics (and tracer if nn_acc=0) -
NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_een_cfg
r10075 r12068 32 32 !----------------------------------------------------------------------- 33 33 ln_linssh = .false. ! =T linear free surface ==>> model level are fixed in time 34 !35 rn_isfhmin = 0.00 ! treshold (m) to discriminate grounding ice to floating ice36 34 ! 37 35 rn_rdt = 1. ! time step for the dynamics (and tracer if nn_acc=0) -
NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_ene_cfg
r10075 r12068 32 32 !----------------------------------------------------------------------- 33 33 ln_linssh = .false. ! =T linear free surface ==>> model level are fixed in time 34 !35 rn_isfhmin = 0.00 ! treshold (m) to discriminate grounding ice to floating ice36 34 ! 37 35 rn_rdt = 1. ! time step for the dynamics (and tracer if nn_acc=0) -
NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_ens_cfg
r10075 r12068 32 32 !----------------------------------------------------------------------- 33 33 ln_linssh = .false. ! =T linear free surface ==>> model level are fixed in time 34 !35 rn_isfhmin = 0.00 ! treshold (m) to discriminate grounding ice to floating ice36 34 ! 37 35 rn_rdt = 1. ! time step for the dynamics (and tracer if nn_acc=0) -
NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_flux_cen2_cfg
r10075 r12068 32 32 !----------------------------------------------------------------------- 33 33 ln_linssh = .false. ! =T linear free surface ==>> model level are fixed in time 34 !35 rn_isfhmin = 0.00 ! treshold (m) to discriminate grounding ice to floating ice36 34 ! 37 35 rn_rdt = 1. ! time step for the dynamics (and tracer if nn_acc=0) -
NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_flux_ubs_cfg
r10075 r12068 32 32 !----------------------------------------------------------------------- 33 33 ln_linssh = .false. ! =T linear free surface ==>> model level are fixed in time 34 !35 rn_isfhmin = 0.00 ! treshold (m) to discriminate grounding ice to floating ice36 34 ! 37 35 rn_rdt = 1. ! time step for the dynamics (and tracer if nn_acc=0) -
NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_eenH_cfg
r10075 r12068 32 32 !----------------------------------------------------------------------- 33 33 ln_linssh = .false. ! =T linear free surface ==>> model level are fixed in time 34 !35 rn_isfhmin = 0.00 ! treshold (m) to discriminate grounding ice to floating ice36 34 ! 37 35 rn_rdt = 1. ! time step for the dynamics (and tracer if nn_acc=0) -
NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_een_cfg
r10075 r12068 32 32 !----------------------------------------------------------------------- 33 33 ln_linssh = .false. ! =T linear free surface ==>> model level are fixed in time 34 !35 rn_isfhmin = 0.00 ! treshold (m) to discriminate grounding ice to floating ice36 34 ! 37 35 rn_rdt = 1. ! time step for the dynamics (and tracer if nn_acc=0) -
NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_ene_cfg
r10075 r12068 32 32 !----------------------------------------------------------------------- 33 33 ln_linssh = .false. ! =T linear free surface ==>> model level are fixed in time 34 !35 rn_isfhmin = 0.00 ! treshold (m) to discriminate grounding ice to floating ice36 34 ! 37 35 rn_rdt = 1. ! time step for the dynamics (and tracer if nn_acc=0) -
NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_ens_cfg
r10075 r12068 32 32 !----------------------------------------------------------------------- 33 33 ln_linssh = .false. ! =T linear free surface ==>> model level are fixed in time 34 !35 rn_isfhmin = 0.00 ! treshold (m) to discriminate grounding ice to floating ice36 34 ! 37 35 rn_rdt = 1. ! time step for the dynamics (and tracer if nn_acc=0) -
NEMO/branches/2019/UKMO_MERGE_2019/tests/VORTEX/MY_SRC/domvvl.F90
r11822 r12068 37 37 38 38 PUBLIC dom_vvl_init ! called by domain.F90 39 PUBLIC dom_vvl_zgr ! called by isfcpl.F90 39 40 PUBLIC dom_vvl_sf_nxt ! called by step.F90 40 41 PUBLIC dom_vvl_sf_update ! called by step.F90 … … 118 119 INTEGER, INTENT(in) :: Kbb, Kmm, Kaa 119 120 ! 121 IF(lwp) WRITE(numout,*) 122 IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated' 123 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 124 ! 125 CALL dom_vvl_ctl ! choose vertical coordinate (z_star, z_tilde or layer) 126 ! 127 ! ! Allocate module arrays 128 IF( dom_vvl_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' ) 129 ! 130 ! ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf 131 CALL dom_vvl_rst( nit000, Kbb, Kmm, 'READ' ) 132 e3t(:,:,jpk,Kaa) = e3t_0(:,:,jpk) ! last level always inside the sea floor set one for all 133 ! 134 CALL dom_vvl_zgr(Kbb, Kmm, Kaa) ! interpolation scale factor, depth and water column 135 ! 136 END SUBROUTINE dom_vvl_init 137 ! 138 SUBROUTINE dom_vvl_zgr(Kbb, Kmm, Kaa) 139 !!---------------------------------------------------------------------- 140 !! *** ROUTINE dom_vvl_init *** 141 !! 142 !! ** Purpose : Interpolation of all scale factors, 143 !! depths and water column heights 144 !! 145 !! ** Method : - interpolate scale factors 146 !! 147 !! ** Action : - e3t_(n/b) and tilde_e3t_(n/b) 148 !! - Regrid: e3(u/v)_n 149 !! e3(u/v)_b 150 !! e3w_n 151 !! e3(u/v)w_b 152 !! e3(u/v)w_n 153 !! gdept_n, gdepw_n and gde3w_n 154 !! - h(t/u/v)_0 155 !! - frq_rst_e3t and frq_rst_hdv 156 !! 157 !! Reference : Leclair, M., and G. Madec, 2011, Ocean Modelling. 158 !!---------------------------------------------------------------------- 159 INTEGER, INTENT(in) :: Kbb, Kmm, Kaa 160 !!---------------------------------------------------------------------- 120 161 INTEGER :: ji, jj, jk 121 162 INTEGER :: ii0, ii1, ij0, ij1 122 163 REAL(wp):: zcoef 123 164 !!---------------------------------------------------------------------- 124 !125 IF(lwp) WRITE(numout,*)126 IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated'127 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'128 !129 CALL dom_vvl_ctl ! choose vertical coordinate (z_star, z_tilde or layer)130 !131 ! ! Allocate module arrays132 IF( dom_vvl_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' )133 !134 ! ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf135 CALL dom_vvl_rst( nit000, Kbb, Kmm, 'READ' )136 e3t(:,:,jpk,Kaa) = e3t_0(:,:,jpk) ! last level always inside the sea floor set one for all137 165 ! 138 166 ! !== Set of all other vertical scale factors ==! (now and before) … … 266 294 ENDIF 267 295 ! 268 END SUBROUTINE dom_vvl_ init296 END SUBROUTINE dom_vvl_zgr 269 297 270 298 … … 1030 1058 ! 1031 1059 IF( ioptio /= 1 ) CALL ctl_stop( 'Choose ONE vertical coordinate in namelist nam_vvl' ) 1032 IF( .NOT. ln_vvl_zstar .AND. ln_isf ) CALL ctl_stop( 'Only vvl_zstar has been tested with ice shelf cavity' )1033 1060 ! 1034 1061 IF(lwp) THEN ! Print the choice
Note: See TracChangeset
for help on using the changeset viewer.