Changeset 12077 for NEMO/branches
- Timestamp:
- 2019-12-05T18:41:39+01:00 (4 years ago)
- Location:
- NEMO/branches/2019/UKMO_MERGE_2019
- Files:
-
- 2 deleted
- 48 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/UKMO_MERGE_2019/cfgs/SHARED/field_def_nemo-oce.xml
r12068 r12077 264 264 265 265 <!-- * variable related to ice shelf forcing * --> 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 melt ing"unit="kg/m2/s" />269 <field id="fwfisf_par" long_name="Ice shelf melt ing"unit="kg/m2/s" />266 <field id="isftfrz_cav" long_name="freezing point temperature at ocean/isf interface" unit="degC" /> 267 <field id="isftfrz_par" long_name="freezing point temperature in the parametrization boundary layer" unit="degC" /> 268 <field id="fwfisf_cav" long_name="Ice shelf melt rate" unit="kg/m2/s" /> 269 <field id="fwfisf_par" long_name="Ice shelf melt rate" unit="kg/m2/s" /> 270 270 <field id="qoceisf_cav" long_name="Ice shelf ocean heat flux" unit="W/m2" /> 271 271 <field id="qoceisf_par" long_name="Ice shelf ocean heat flux" unit="W/m2" /> 272 272 <field id="qlatisf_cav" long_name="Ice shelf latent heat flux" unit="W/m2" /> 273 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 melt ing"unit="kg/m2/s" grid_ref="grid_T_3D" />277 <field id="fwfisf3d_par" long_name="Ice shelf melt ing"unit="kg/m2/s" grid_ref="grid_T_3D" />274 <field id="qhcisf_cav" long_name="Ice shelf heat content flux of injected water" unit="W/m2" /> 275 <field id="qhcisf_par" long_name="Ice shelf heat content flux of injected water" unit="W/m2" /> 276 <field id="fwfisf3d_cav" long_name="Ice shelf melt rate" unit="kg/m2/s" grid_ref="grid_T_3D" /> 277 <field id="fwfisf3d_par" long_name="Ice shelf melt rate" unit="kg/m2/s" grid_ref="grid_T_3D" /> 278 278 <field id="qoceisf3d_cav" long_name="Ice shelf ocean heat flux" unit="W/m2" grid_ref="grid_T_3D" /> 279 279 <field id="qoceisf3d_par" long_name="Ice shelf ocean heat flux" unit="W/m2" grid_ref="grid_T_3D" /> 280 280 <field id="qlatisf3d_cav" long_name="Ice shelf latent heat flux" unit="W/m2" grid_ref="grid_T_3D" /> 281 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" />282 <field id="qhcisf3d_cav" long_name="Ice shelf heat content flux of injected water" unit="W/m2" grid_ref="grid_T_3D" /> 283 <field id="qhcisf3d_par" long_name="Ice shelf heat content flux of injected water" unit="W/m2" grid_ref="grid_T_3D" /> 284 <field id="ttbl_cav" long_name="temperature in Losch tbl" unit="degC" /> 285 <field id="ttbl_par" long_name="temperature in the parametrisation boundary layer" unit="degC" /> 286 <field id="isfthermald_cav" long_name="thermal driving of ice shelf melting" unit="degC" /> 287 <field id="isfthermald_par" long_name="thermal driving of ice shelf melting" unit="degC" /> 288 <field id="isfgammat" long_name="Ice shelf heat-transfert velocity" unit="m/s" /> 289 <field id="isfgammas" long_name="Ice shelf salt-transfert velocity" unit="m/s" /> 290 <field id="stbl" long_name="salinity in the Losh tbl" unit="1e-3" /> 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 294 <field id="qconisf" long_name="Conductive heat flux through the ice shelf" unit="W/m2" /> 295 295 -
NEMO/branches/2019/UKMO_MERGE_2019/cfgs/SHARED/namelist_ref
r12068 r12077 439 439 ! ---------------- ice shelf load ------------------------------- 440 440 ! 441 cn_isfload = 'isomip' ! scheme to compute ice shelf load (ln_isfcav = .true. in domain_cfg.nc) 441 cn_isfload = 'uniform' ! scheme to compute ice shelf load (ln_isfcav = .true. in domain_cfg.nc) 442 rn_isfload_T = -1.9 443 rn_isfload_S = 34.4 442 444 ! 443 445 ! ---------------- ice shelf melt formulation ------------------------------- … … 452 454 cn_isfcav_mlt = '3eq' ! ice shelf melting formulation (spe/2eq/3eq/oasis) 453 455 ! ! 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., 201 5)456 ! ! 2eq = ISOMIP like: 2 equations formulation (Hunter et al., 2006 for a short description) 457 ! ! 3eq = ISOMIP+ like: 3 equations formulation (Asay-Davis et al., 2016 for a short description) 456 458 ! ! oasis = fwfisf is given by oasis and pattern by file sn_isfcav_fwf 457 459 ! ! 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 460 cn_gammablk = 'vel' ! scheme to compute gammat/s (spe,ad15,hj99) 461 ! ! spe = constant transfert velocity (rn_gammat0, rn_gammas0) 462 ! ! vel = velocity dependent transfert velocity (u* * gammat/s) (Asay-Davis et al. 2016 for a short description) 463 ! ! vel_stab = velocity and stability dependent transfert coeficient (Holland et al. 1999 for a complete description) 464 rn_gammat0 = 1.4e-2 ! gammat coefficient used in spe, vel and vel_stab gamma computation method 465 rn_gammas0 = 4.0e-4 ! gammas coefficient used in spe, vel and vel_stab gamma computation method 463 466 ! 464 467 rn_htbl = 30. ! thickness of the top boundary layer (Losh et al. 2008) -
NEMO/branches/2019/UKMO_MERGE_2019/cfgs/WED025/EXPREF/namelist_cfg
r11844 r12077 211 211 !----------------------------------------------------------------------- 212 212 ! 213 ! ---------------- ice shelf load -------------------------------214 !215 cn_isfload = 'isomip' ! scheme to compute ice shelf load (ln_isfcav = .true. in domain_cfg.nc)216 !217 213 ! ---------------- ice shelf melt formulation ------------------------------- 218 214 ! … … 229 225 ! ! oasis = fwfisf is given by oasis and pattern by file sn_isfcav_fwf 230 226 ! ! cn_isfcav_mlt = 2eq or 3eq cases: 231 cn_gammablk = ' ad15'! scheme to compute gammat/s (spe,ad15,hj99)227 cn_gammablk = 'vel' ! scheme to compute gammat/s (spe,ad15,hj99) 232 228 ! ! ad15 = velocity dependend Gamma (u* * gammat/s) (Jenkins et al. 2010) 233 229 ! ! hj99 = velocity and stability dependent Gamma (Holland et al. 1999) -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/BDY/bdyvol.F90
r12068 r12077 14 14 USE bdy_oce ! ocean open boundary conditions 15 15 USE sbc_oce ! ocean surface boundary conditions 16 USE isf_oce, ONLY : fwfisf_cav, fwfisf_par ! ice shelf 16 17 USE dom_oce ! ocean space and time domain 17 18 USE phycst ! physical constants 18 USE isf ! ice shelf19 19 ! 20 20 USE in_out_manager ! I/O manager -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DIA/diahsb.F90
r12068 r12077 17 17 USE phycst ! physical constants 18 18 USE sbc_oce ! surface thermohaline fluxes 19 USE isf_oce ! ice shelf fluxes 19 20 USE sbcrnf ! river runoff 20 USE isf ! ice shelves21 21 USE domvvl ! vertical scale factors 22 22 USE traqsr ! penetrative solar radiation -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DIA/diawri.F90
r12068 r12077 26 26 !!---------------------------------------------------------------------- 27 27 USE oce ! ocean dynamics and tracers 28 USE isf 28 USE isf_oce 29 29 USE isfcpl 30 30 USE dom_oce ! ocean space and time domain … … 911 911 CALL iom_rstput( 0, 0, inum, 'risfdep', risfdep ) ! now k-velocity 912 912 CALL iom_rstput( 0, 0, inum, 'ht' , ht ) ! now water column height 913 913 914 IF ( ln_isf ) THEN 914 915 IF (ln_isfcav_mlt) THEN … … 918 919 CALL iom_rstput( 0, 0, inum, 'misfkb_cav', REAL(misfkb_cav,8) ) ! now k-velocity 919 920 CALL iom_rstput( 0, 0, inum, 'misfkt_cav', REAL(misfkt_cav,8) ) ! now k-velocity 921 CALL iom_rstput( 0, 0, inum, 'mskisf_cav', REAL(mskisf_cav,8), ktype = jp_i1 ) 920 922 END IF 921 923 IF (ln_isfpar_mlt) THEN … … 926 928 CALL iom_rstput( 0, 0, inum, 'misfkb_par', REAL(misfkb_par,8) ) ! now k-velocity 927 929 CALL iom_rstput( 0, 0, inum, 'misfkt_par', REAL(misfkt_par,8) ) ! now k-velocity 930 CALL iom_rstput( 0, 0, inum, 'mskisf_par', REAL(mskisf_par,8), ktype = jp_i1 ) 928 931 END IF 929 932 END IF 930 933 931 IF ( ln_isf ) THEN932 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 IF935 936 934 IF( ALLOCATED(ahtu) ) THEN 937 935 CALL iom_rstput( 0, 0, inum, 'ahtu', ahtu ) ! aht at u-point -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domwri.F90
r12068 r12077 16 16 !! dom_stiff : diagnose maximum grid stiffness/hydrostatic consistency (s-coordinate) 17 17 !!---------------------------------------------------------------------- 18 USE isf ! ice shelf18 ! 19 19 USE dom_oce ! ocean space and time domain 20 20 USE phycst , ONLY : rsmall -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/divhor.F90
r12068 r12077 19 19 !!---------------------------------------------------------------------- 20 20 USE oce ! ocean dynamics and tracers 21 USE isf22 USE isfutils23 21 USE dom_oce ! ocean space and time domain 24 USE sbc_oce, ONLY : ln_rnf ! surface boundary condition: ocean 25 USE sbcrnf ! river runoff 26 USE isfhdiv ! ice shelf 22 USE sbc_oce, ONLY : ln_rnf ! river runoff 23 USE sbcrnf , ONLY : sbc_rnf_div ! river runoff 24 USE isf_oce, ONLY : ln_isf ! ice shelf 25 USE isfhdiv, ONLY : isf_hdiv ! ice shelf 27 26 #if defined key_asminc 28 27 USE asminc ! Assimilation increment -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/dynatf.F90
r12068 r12077 41 41 USE trddyn ! trend manager: dynamics 42 42 USE trdken ! trend manager: kinetic energy 43 USE isf 44 USE isfdynatf , ONLY: isf_dynatf ! ice shelf 43 USE isf_oce , ONLY: ln_isf ! ice shelf 44 USE isfdynatf , ONLY: isf_dynatf ! ice shelf volume filter correction subroutine 45 45 ! 46 46 USE in_out_manager ! I/O manager … … 223 223 ! PM: we could probably define a generic subroutine to do the in depth correction 224 224 ! to manage rnf, isf and possibly in the futur icb, tide water glacier (...) 225 ! ...(kt, coef, ktop, kbot, hz, fwf_b, fwf) 225 226 IF ( ln_isf ) CALL isf_dynatf( kt, Kmm, ze3t_f, atfp * rdt ) 226 227 ! -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/dynhpg.F90
r12068 r12077 31 31 !!---------------------------------------------------------------------- 32 32 USE oce ! ocean dynamics and tracers 33 USE isf 34 USE isfload 33 USE isf_oce , ONLY : risfload ! ice shelf (risfload variable) 34 USE isfload , ONLY : isf_load ! ice shelf (isf_load routine ) 35 35 USE sbc_oce ! surface variable (only for the flag with ice shelf) 36 36 USE dom_oce ! ocean space and time domain -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/dynspg_ts.F90
r12068 r12077 31 31 USE dom_oce ! ocean space and time domain 32 32 USE sbc_oce ! surface boundary condition: ocean 33 USE isf_oce ! ice shelf variable (fwfisf) 33 34 USE zdf_oce ! vertical physics: variables 34 35 USE zdfdrg ! vertical physics: top/bottom drag coef. 35 USE isf ! ice shelf variable (fwfisf)36 USE isfutils37 36 USE sbcapr ! surface boundary condition: atmospheric pressure 38 37 USE dynadv , ONLY: ln_dynadv_vec -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/sshwzv.F90
r12068 r12077 19 19 !!---------------------------------------------------------------------- 20 20 USE oce ! ocean dynamics and tracers variables 21 USE isf ! ice shelf 22 USE isfutils 21 USE isf_oce ! ice shelf 23 22 USE dom_oce ! ocean space and time domain variables 24 23 USE sbc_oce ! surface boundary condition: ocean -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfcav.F90
r12068 r12077 13 13 !! isf_cav : update ice shelf melting under ice shelf 14 14 !!---------------------------------------------------------------------- 15 USE isf 15 USE isf_oce ! ice shelf public variables 16 16 ! 17 17 USE isfrst , ONLY: isfrst_write, isfrst_read ! ice shelf restart read/write subroutine … … 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 27 USE eosbn2 , ONLY: l _useCT ! l_useCT27 USE eosbn2 , ONLY: ln_teos10 ! use ln_teos10 or not 28 28 ! 29 29 USE in_out_manager ! I/O manager … … 85 85 ! 86 86 ! initialisation 87 IF (TRIM(cn_gammablk) == ' HJ99' ) zqoce_b (:,:) = ptsc(:,:,jp_tem) * rau0_rcp ! last time step total heat fluxes (to speed up convergence)87 IF (TRIM(cn_gammablk) == 'vel_stab' ) zqoce_b (:,:) = ptsc(:,:,jp_tem) * rau0_rcp ! last time step total heat fluxes (to speed up convergence) 88 88 ! 89 89 ! compute ice shelf melting … … 104 104 ! define if we need to iterate 105 105 SELECT CASE ( cn_gammablk ) 106 CASE ( 'spe',' ad15' )106 CASE ( 'spe','vel' ) 107 107 ! no convergence needed 108 108 lit = .FALSE. 109 CASE ( ' hj99' )109 CASE ( 'vel_stab' ) 110 110 ! compute error between 2 iterations 111 111 zerr = MAXVAL(ABS(zqoce(:,:) - zqoce_b(:,:))) … … 113 113 ! define if iteration needed 114 114 IF (nit >= 100) THEN ! too much iteration 115 CALL ctl_stop( 'STOP', 'isf_cav: HJ99gamma formulation had too many iterations ...' )115 CALL ctl_stop( 'STOP', 'isf_cav: vel_stab gamma formulation had too many iterations ...' ) 116 116 ELSE IF ( zerr <= 0.01_wp ) THEN ! convergence is achieve 117 117 lit = .FALSE. … … 212 212 ! coeficient for linearisation of potential tfreez 213 213 ! Crude approximation for pressure (but commonly used) 214 IF ( l _useCT) THEN ! linearisation from Jourdain et al. (2017)214 IF ( ln_teos10 ) THEN ! linearisation from Jourdain et al. (2017) 215 215 risf_lamb1 =-0.0564_wp 216 216 risf_lamb2 = 0.0773_wp -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfcavgam.F90
r12068 r12077 10 10 !! isfcav_gammats : compute exchange coeficient gamma 11 11 !!---------------------------------------------------------------------- 12 USE isf 12 USE isf_oce 13 13 USE isfutils, ONLY: debug 14 14 USE isftbl , ONLY: isf_tbl … … 46 46 !! 47 47 !! ** Method : select the gamma formulation 48 !! 3 method available (cst, AD15 and HJ99)48 !! 3 method available (cst, vel and vel_stab) 49 49 !!--------------------------------------------------------------------- 50 50 !!-------------------------- OUT ------------------------------------- … … 66 66 ! gamma is constant (specified in namelist) 67 67 ! nothing to do 68 CASE (' ad15', 'hj99')68 CASE ('vel', 'vel_stab') 69 69 ! compute velocity in tbl 70 70 CALL isf_tbl(Kmm, uu(:,:,:,Kmm) ,zutbl(:,:),'U', miku, rhisf_tbl_cav) … … 90 90 pgt(:,:) = rn_gammat0 91 91 pgs(:,:) = rn_gammas0 92 CASE ( ' ad15' ) ! gamma is proportional to u*93 CALL gammats_ AD15( zutbl, zvtbl, rCd0_top, r_ke0_top, pgt, pgs )94 CASE ( ' hj99' ) ! gamma depends of stability of boundary layer and u*95 CALL gammats_ HJ99(Kmm, pttbl, pstbl, zutbl, zvtbl, rCd0_top, r_ke0_top, pqoce, pqfwf, pgt, pgs )92 CASE ( 'vel' ) ! gamma is proportional to u* 93 CALL gammats_vel ( zutbl, zvtbl, rCd0_top, r_ke0_top, pgt, pgs ) 94 CASE ( 'vel_stab' ) ! gamma depends of stability of boundary layer and u* 95 CALL gammats_vel_stab (Kmm, pttbl, pstbl, zutbl, zvtbl, rCd0_top, r_ke0_top, pqoce, pqfwf, pgt, pgs ) 96 96 CASE DEFAULT 97 97 CALL ctl_stop('STOP','method to compute gamma (cn_gammablk) is unknown (should not see this)') … … 116 116 !!----------------------------------------------------------------------------------------------------- 117 117 ! 118 SUBROUTINE gammats_ AD15(putbl, pvtbl, pCd, pke2, & ! <<== in118 SUBROUTINE gammats_vel( putbl, pvtbl, pCd, pke2, & ! <<== in 119 119 & pgt, pgs ) ! ==>> out gammats [m/s] 120 120 !!---------------------------------------------------------------------- … … 123 123 !! ** Method : gamma is velocity dependent ( gt= gt0 * Ustar ) 124 124 !! 125 !! ** Reference : Jenkins et al., 2010, JPO, p2298-2312 126 !! Asay-Davis et al., Geosci. Model Dev., 9, 2471-2497, 2016 125 !! ** Reference : Asay-Davis et al., Geosci. Model Dev., 9, 2471-2497, 2016 127 126 !!--------------------------------------------------------------------- 128 127 !!-------------------------- OUT ------------------------------------- … … 146 145 CALL iom_put('isfustar',zustar(:,:)) 147 146 ! 148 END SUBROUTINE gammats_ AD15149 150 SUBROUTINE gammats_ HJ99( Kmm, pttbl, pstbl, putbl, pvtbl, pCd, pke2, pqoce, pqfwf, & ! <<== in151 & pgt , pgs ) ! ==>> out gammats [m/s]147 END SUBROUTINE gammats_vel 148 149 SUBROUTINE gammats_vel_stab( Kmm, pttbl, pstbl, putbl, pvtbl, pCd, pke2, pqoce, pqfwf, & ! <<== in 150 & pgt , pgs ) ! ==>> out gammats [m/s] 152 151 !!---------------------------------------------------------------------- 153 152 !! ** Purpose : compute the coefficient echange coefficient … … 186 185 ! 187 186 ! compute ustar 188 zustar(:,:) = SQRT( pCd * ( putbl(:,:) * putbl(:,:) + pvtbl(:,:) * pvtbl(:,:) + r_ke0_top) )187 zustar(:,:) = SQRT( pCd * ( putbl(:,:) * putbl(:,:) + pvtbl(:,:) * pvtbl(:,:) + pke2 ) ) 189 188 ! 190 189 ! output ustar … … 254 253 END DO 255 254 256 END SUBROUTINE gammats_ HJ99255 END SUBROUTINE gammats_vel_stab 257 256 258 257 END MODULE isfcavgam -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfcavmlt.F90
r12068 r12077 12 12 !!---------------------------------------------------------------------- 13 13 14 USE isf 14 USE isf_oce ! ice shelf 15 15 USE isftbl , ONLY: isf_tbl ! ice shelf depth average 16 16 USE isfutils,ONLY: debug ! debug subroutine … … 77 77 ! 78 78 IF (ln_isfdebug) THEN 79 CALL debug( 'isfcav_mlt :', pqhc (:,:) )80 CALL debug( 'isfcav_mlt :', pqoce(:,:) )81 CALL debug( 'isfcav_mlt :', pqfwf(:,:) )79 CALL debug( 'isfcav_mlt qhc :', pqhc (:,:) ) 80 CALL debug( 'isfcav_mlt qoce :', pqoce(:,:) ) 81 CALL debug( 'isfcav_mlt qfwf :', pqfwf(:,:) ) 82 82 END IF 83 83 ! -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfcpl.F90
r12068 r12077 12 12 !! isfrst : read/write iceshelf variables in/from restart 13 13 !!---------------------------------------------------------------------- 14 USE isf 14 USE isf_oce ! ice shelf variable 15 15 USE isfutils, ONLY : debug 16 16 USE lib_mpp , ONLY: mpp_sum, mpp_max ! mpp routine … … 25 25 PRIVATE 26 26 27 PUBLIC isfcpl_rst_write, isfcpl_init ! iceshelf restart read and write28 PUBLIC isfcpl_ssh, isfcpl_tra, isfcpl_vol, isfcpl_cons 27 PUBLIC isfcpl_rst_write, isfcpl_init ! iceshelf restart read and write 28 PUBLIC isfcpl_ssh, isfcpl_tra, isfcpl_vol, isfcpl_cons ! iceshelf correction for ssh, tra, dyn and conservation 29 29 30 30 TYPE isfcons … … 48 48 SUBROUTINE isfcpl_init(Kbb, Kmm, Kaa) 49 49 !!--------------------------------------------------------------------- 50 !! *** ROUTINE iscpl_init *** 51 !! 52 !! ** Purpose : correct ocean state for new wet cell and horizontal divergence 53 !! correction for the dynamical adjustement 54 !! 55 !! ** Action : - compute ssh on new wet cell 56 !! - compute T/S on new wet cell 57 !! - compute horizontal divergence correction as a volume flux 58 !! - compute the T/S/vol correction increment to keep trend to 0 50 59 !! 51 60 !!--------------------------------------------------------------------- … … 480 489 INTEGER :: jisf ! start, end and current position in the increment array 481 490 INTEGER :: ingb, ifind ! 0/1 target found or need to be found 482 INTEGER :: ingb, ifind, nisfl_area! global number of cell concerned by the wet->dry case491 INTEGER :: nisfl_area ! global number of cell concerned by the wet->dry case 483 492 INTEGER, DIMENSION(jpnij) :: nisfl ! local number of cell concerned by the wet->dry case 484 493 ! -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfdiags.F90
r12068 r12077 1 1 MODULE isfdiags 2 2 !!====================================================================== 3 !! *** MODULE sbcisf *** 4 !! Surface module : update surface ocean boundary condition under ice 5 !! shelf 3 !! *** MODULE isfdiags *** 4 !! ice shelf diagnostics module : manage the 2d and 3d flux outputs from the ice shelf module 6 5 !!====================================================================== 7 6 !! History : 3.2 ! 2011-02 (C.Harris ) Original code isf cav … … 16 15 USE in_out_manager ! I/O manager 17 16 USE dom_oce 18 USE isf ! ice shelf variable 19 USE isfutils 17 USE isf_oce ! ice shelf variable 20 18 USE iom ! 21 19 … … 38 36 !! *** ROUTINE isf_diags_flx *** 39 37 !! 40 !! ** Purpose : 38 !! ** Purpose : manage the 2d and 3d flux outputs of the ice shelf module 39 !! fwf, latent heat flux, heat content flux, oce->ice heat flux 41 40 !! 42 41 !!---------------------------------------------------------------------- … … 59 58 cvarqhc = 'qhcisf_'//cdisf ; cvarqhc3d = 'qhcisf3d_'//cdisf 60 59 ! 61 ! output 2d melt rate, latent heat and heat content flux 62 CALL iom_put( TRIM(cvarqfwf), pqfwf(:,:) ) ! isf mass flux (opposite sign)63 CALL iom_put( TRIM(cvarqoce), pqoce(:,:) ) ! isf oce to ice flux (cpo*gt*dt)64 CALL iom_put( TRIM(cvarqlat), pqlat(:,:) ) ! isf oce to ice flux (cpo*gt*dt)65 CALL iom_put( TRIM(cvarqhc) , pqhc (:,:) ) ! isf heat content flux (cpo*fwf*Tfrz)60 ! output 2d melt rate, latent heat and heat content flux from the injected water 61 CALL iom_put( TRIM(cvarqfwf), pqfwf(:,:) ) ! mass flux ( >0 out ) 62 CALL iom_put( TRIM(cvarqoce), pqoce(:,:) ) ! oce to ice flux ( >0 out ) 63 CALL iom_put( TRIM(cvarqlat), pqlat(:,:) ) ! latent heat flux ( >0 out ) 64 CALL iom_put( TRIM(cvarqhc) , pqhc (:,:) ) ! heat content flux ( >0 out ) 66 65 ! 67 66 ! output 3d Diagnostics … … 77 76 !! *** ROUTINE isf_diags_2dto3d *** 78 77 !! 79 !! ** Purpose : 78 !! ** Purpose : compute the 3d flux outputs as they are injected into NEMO 79 !! (ie uniformaly spread into the top boundary layer or parametrisation layer) 80 80 !! 81 81 !!---------------------------------------------------------------------- -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfdynatf.F90
r12068 r12077 11 11 !!------------------------------------------------------------------------- 12 12 13 USE isf 13 USE isf_oce 14 14 15 15 USE phycst , ONLY: r1_rau0 ! physical constant -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfhdiv.F90
r12068 r12077 1 1 MODULE isfhdiv 2 !!====================================================================== 3 !! *** MODULE isfhdiv *** 4 !! ice shelf horizontal divergence module : update the horizontal divergence 5 !! with the ice shelf melt and coupling correction 6 !!====================================================================== 7 !! History : 4.0 ! 2019-09 (P. Mathiot) Original code 8 !!---------------------------------------------------------------------- 2 9 3 USE isf ! ice shelf 4 USE isfutils 10 !!---------------------------------------------------------------------- 11 !! isf_hdiv : update the horizontal divergence with the ice shelf 12 !! melt and coupling correction 13 !!---------------------------------------------------------------------- 14 15 USE isf_oce ! ice shelf 16 5 17 USE dom_oce ! time and space domain 6 18 USE phycst , ONLY: r1_rau0 ! physical constant … … 40 52 IF ( ln_isfcpl .AND. kt /= 0 ) THEN 41 53 ! 42 ! correct divergence only for the first time step 54 ! Dynamical stability at start up after change in under ice shelf cavity geometry is achieve by correcting the divergence. 55 ! This is achieved by applying a volume flux in order to keep the horizontal divergence after remapping 56 ! the same as at the end of the latest time step. So correction need to be apply at nit000 (euler time step) and 57 ! half of it at nit000+1 (leap frog time step). 43 58 IF ( kt == nit000 ) CALL isf_hdiv_cpl(Kmm, risfcpl_vol , phdiv) 44 59 IF ( kt == nit000+1 ) CALL isf_hdiv_cpl(Kmm, risfcpl_vol*0.5_wp, phdiv) -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfload.F90
r12068 r12077 11 11 !!---------------------------------------------------------------------- 12 12 13 USE isf , ONLY: cn_isfload! ice shelf variables13 USE isf_oce, ONLY: cn_isfload, rn_isfload_T, rn_isfload_S ! ice shelf variables 14 14 15 15 USE dom_oce, ONLY: e3w, gdept, risfdep, mikt ! vertical scale factor 16 16 USE eosbn2 , ONLY: eos ! eos routine 17 17 18 USE lib_mpp, ONLY: ctl_stop ! ctl_stop routine19 USE in_out_manager !18 USE lib_mpp, ONLY: ctl_stop ! ctl_stop routine 19 USE in_out_manager ! 20 20 21 21 IMPLICIT NONE … … 45 45 ! ice shelf cavity 46 46 SELECT CASE ( cn_isfload ) 47 CASE ( ' isomip' )48 CALL isf_load_ isomip( Kmm, pisfload )47 CASE ( 'uniform' ) 48 CALL isf_load_uniform ( Kmm, pisfload ) 49 49 CASE DEFAULT 50 50 CALL ctl_stop('STOP','method cn_isfload to compute ice shelf load does not exist (isomip), check your namelist') … … 53 53 END SUBROUTINE isf_load 54 54 55 SUBROUTINE isf_load_ isomip( Kmm, pisfload )55 SUBROUTINE isf_load_uniform( Kmm, pisfload ) 56 56 !!-------------------------------------------------------------------- 57 57 !! *** SUBROUTINE isf_load *** … … 79 79 znad = 1._wp !- To use density and not density anomaly 80 80 ! 81 ! !- assume water displaced by the ice shelf is at T= -1.9 and S=34.4(rude)82 zts_top(:,:,jp_tem) = -1.9_wp ; zts_top(:,:,jp_sal) = 34.4_wp81 ! !- assume water displaced by the ice shelf is at T=rn_isfload_T and S=rn_isfload_S (rude) 82 zts_top(:,:,jp_tem) = rn_isfload_T ; zts_top(:,:,jp_sal) = rn_isfload_S 83 83 ! 84 84 DO jk = 1, jpk !- compute density of the water displaced by the ice shelf … … 113 113 END DO 114 114 ! 115 END SUBROUTINE isf_load_ isomip115 END SUBROUTINE isf_load_uniform 116 116 117 117 END MODULE isfload -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfpar.F90
r12068 r12077 14 14 !! isfpar : compute ice shelf melt using a prametrisation of ice shelf cavities 15 15 !!---------------------------------------------------------------------- 16 USE isf 16 USE isf_oce ! ice shelf 17 17 ! 18 18 USE isfrst , ONLY: isfrst_write, isfrst_read ! ice shelf restart read/write subroutine 19 19 USE isftbl , ONLY: isf_tbl_ktop, isf_tbl_lvl ! ice shelf top boundary layer properties subroutine 20 USE isfparmlt, ONLY: isfpar_mlt ! ice shelf melt formulation subroutine 21 USE isfdiags , ONLY: isf_diags_flx ! ice shelf diags subroutine 20 22 USE isfutils , ONLY: debug, read_2dcstdta ! ice shelf debug subroutine 21 USE isfparmlt, ONLY: isfpar_mlt ! ice shelf melt formulation subroutine22 USE isfdiags , ONLY: isf_diags_flx ! ice shelf diags subroutine23 23 ! 24 24 USE dom_oce , ONLY: bathy ! ocean space and time domain … … 48 48 !! 49 49 !! ** Purpose : compute the heat and fresh water due to ice shelf melting/freezing using a parametrisation 50 !! 51 !! ** Comment : in isf_par and all its call tree, 52 !! 'tbl' means parametrisation layer (ie how the far field temperature/salinity is computed) 53 !! instead of in a proper top boundary layer as at the ice shelf ocean interface 54 !! as the action to compute the properties of the tbl or the parametrisation layer are the same, 55 !! (ie average T/S over a specific depth (can be across multiple levels)) 56 !! the name tbl was kept. 50 57 !! 51 58 !!--------------------------------------------------------------------- -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfparmlt.F90
r12068 r12077 8 8 !!---------------------------------------------------------------------- 9 9 10 USE isf ! ice shelf10 USE isf_oce ! ice shelf 11 11 USE isftbl , ONLY: isf_tbl ! ice shelf depth average 12 12 -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfstp.F90
r12068 r12077 14 14 !!---------------------------------------------------------------------- 15 15 ! 16 USE isf ! isf variables16 USE isf_oce ! isf variables 17 17 USE isfload, ONLY: isf_load ! ice shelf load 18 18 USE isftbl , ONLY: isf_tbl_lvl ! ice shelf boundary layer … … 187 187 WRITE(numout,*) ' melt inside the cavity ln_isfcav_mlt = ', ln_isfcav_mlt 188 188 IF ( ln_isfcav_mlt) THEN 189 WRITE(numout,*) ' melt formulation cn_isfcav_mlt= ', TRIM(cn_isfcav_mlt)190 WRITE(numout,*) ' thickness of the top boundary layer rn_htbl= ', rn_htbl191 WRITE(numout,*) ' gamma formulation cn_gammablk= ', TRIM(cn_gammablk)189 WRITE(numout,*) ' melt formulation cn_isfcav_mlt= ', TRIM(cn_isfcav_mlt) 190 WRITE(numout,*) ' thickness of the top boundary layer rn_htbl = ', rn_htbl 191 WRITE(numout,*) ' gamma formulation cn_gammablk = ', TRIM(cn_gammablk) 192 192 IF ( TRIM(cn_gammablk) .NE. 'spe' ) THEN 193 WRITE(numout,*) ' gammat coefficient rn_gammat0 = ', rn_gammat0194 WRITE(numout,*) ' gammas coefficient rn_gammas0 = ', rn_gammas0195 WRITE(numout,*) ' top drag coef. used (from namdrg_top) rn_Cd0 = ', r_Cdmin_top196 WRITE(numout,*) ' top background ke used (from namdrg_top) rn_ke0 = ', r_ke0_top193 WRITE(numout,*) ' gammat coefficient rn_gammat0 = ', rn_gammat0 194 WRITE(numout,*) ' gammas coefficient rn_gammas0 = ', rn_gammas0 195 WRITE(numout,*) ' top background ke used (from namdrg_top) rn_ke0 = ', r_ke0_top 196 WRITE(numout,*) ' top drag coef. used (from namdrg_top) rn_Cd0 = ', r_Cdmin_top 197 197 END IF 198 198 END IF … … 222 222 END IF 223 223 224 IF (ln_isfcav) WRITE(numout,*) ' Ice shelf load method cn_isfload = ', TRIM(cn_isfload) 224 IF (ln_isfcav) THEN 225 WRITE(numout,*) ' Ice shelf load method cn_isfload = ', TRIM(cn_isfload) 226 WRITE(numout,*) ' Temperature used to compute the ice shelf load = ', rn_isfload_T 227 WRITE(numout,*) ' Salinity used to compute the ice shelf load = ', rn_isfload_S 228 END IF 225 229 WRITE(numout,*) '' 230 FLUSH(numout) 226 231 227 232 END IF … … 245 250 IF ( l_isfoasis .AND. ln_isf ) THEN 246 251 ! 247 CALL ctl_stop( ' OASISand ice shelf not tested' )252 CALL ctl_stop( ' ln_ctl and ice shelf not tested' ) 248 253 ! 249 254 ! NEMO coupled to ATMO model with isf cavity need oasis method for melt computation … … 277 282 INTEGER :: ios ! Local integer output status for namelist read 278 283 !!---------------------------------------------------------------------- 279 NAMELIST/namisf/ ln_isf , & 280 & ln_isfcav_mlt, cn_isfcav_mlt, cn_gammablk, rn_gammat0, rn_gammas0, rn_htbl, sn_isfcav_fwf, & 281 & ln_isfpar_mlt, cn_isfpar_mlt, sn_isfpar_fwf, sn_isfpar_zmin, sn_isfpar_zmax, sn_isfpar_Leff, & 282 & ln_isfcpl , nn_drown, ln_isfcpl_cons, ln_isfdebug, & 283 & cn_isfload , cn_isfdir 284 NAMELIST/namisf/ ln_isf , & 285 & cn_gammablk , rn_gammat0 , rn_gammas0 , rn_htbl, sn_isfcav_fwf, & 286 & ln_isfcav_mlt , cn_isfcav_mlt , sn_isfcav_fwf , & 287 & ln_isfpar_mlt , cn_isfpar_mlt , sn_isfpar_fwf , & 288 & sn_isfpar_zmin, sn_isfpar_zmax, sn_isfpar_Leff, & 289 & ln_isfcpl , nn_drown , ln_isfcpl_cons, ln_isfdebug, & 290 & cn_isfload , rn_isfload_T , rn_isfload_S , cn_isfdir 284 291 !!---------------------------------------------------------------------- 285 292 ! -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isftbl.F90
r12068 r12077 14 14 !!---------------------------------------------------------------------- 15 15 16 USE isf 16 USE isf_oce ! ice shelf variables 17 17 18 18 USE dom_oce ! vertical scale factor and depth -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfutils.F90
r11931 r12077 15 15 USE lib_fortran , ONLY: glob_sum, glob_min, glob_max ! compute global value 16 16 USE par_oce , ONLY: jpi,jpj,jpk ! domain size 17 USE in_out_manager, ONLY: wp, lwp, numout ! miscelenious 17 USE dom_oce , ONLY: nldi, nlei, nldj, nlej ! local domain 18 USE in_out_manager, ONLY: i8, wp, lwp, numout ! miscelenious 19 USE lib_mpp 18 20 19 21 IMPLICIT NONE … … 54 56 !! *** ROUTINE isf_debug2d *** 55 57 !! 56 !! ** Purpose : add debug print 58 !! ** Purpose : add debug print for 2d variables 57 59 !! 58 60 !!-------------------------- IN ------------------------------------- 59 CHARACTER(LEN= 256), INTENT(in ) :: cdtxt61 CHARACTER(LEN=*) , INTENT(in ) :: cdtxt 60 62 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pvar 61 63 !!-------------------------------------------------------------------- 62 REAL(wp) :: zmin, zmax, zsum 64 REAL(wp) :: zmin, zmax, zsum 65 INTEGER(i8) :: imodd, ip 66 INTEGER :: itmps,imods, ji, jj, jk 63 67 !!-------------------------------------------------------------------- 64 68 ! 69 ! global min/max/sum to check data range and NaN 65 70 zsum = glob_sum( 'debug', pvar(:,:) ) 66 71 zmin = glob_min( 'debug', pvar(:,:) ) 67 72 zmax = glob_max( 'debug', pvar(:,:) ) 68 73 ! 69 IF (lwp) WRITE(numout,*) TRIM(cdtxt),' (min, max, sum) : ',zmin, zmax, zsum 74 ! basic check sum to check reproducibility 75 ! TRANSFER function find out the integer corresponding to pvar(i,j) bit pattern 76 ! MOD allow us to keep only the latest digits during the sum 77 ! imod is not choosen to be very large as at the end there is a classic mpp_sum 78 imodd=65521 ! highest prime number < 2**16 with i8 type 79 imods=65521 ! highest prime number < 2**16 with default integer for mpp_sum subroutine 80 itmps=0 81 DO jj=nldj,nlej 82 DO ji=nldi,nlei 83 itmps = MOD(itmps + MOD(TRANSFER(pvar(ji,jj), ip),imodd), imods) 84 END DO 85 END DO 86 CALL mpp_sum('debug',itmps) 70 87 ! 71 CALL FLUSH(numout) 88 ! print out 89 IF (lwp) THEN 90 WRITE(numout,*) TRIM(cdtxt),' (min, max, sum, tag) : ',zmin, zmax, zsum, itmps 91 CALL FLUSH(numout) 92 END IF 72 93 ! 73 94 END SUBROUTINE debug2d … … 77 98 !! *** ROUTINE isf_debug3d *** 78 99 !! 79 !! ** Purpose : add debug print 100 !! ** Purpose : add debug print for 3d variables 80 101 !! 81 102 !!-------------------------- IN ------------------------------------- 82 CHARACTER(LEN= 256), INTENT(in ) :: cdtxt103 CHARACTER(LEN=*) , INTENT(in ) :: cdtxt 83 104 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in ) :: pvar 84 105 !!-------------------------------------------------------------------- 85 106 REAL(wp) :: zmin, zmax, zsum 107 INTEGER(i8) :: imodd, ip 108 INTEGER :: itmps,imods, ji, jj, jk 86 109 !!-------------------------------------------------------------------- 87 110 ! 111 ! global min/max/sum to check data range and NaN 88 112 zsum = glob_sum( 'debug', pvar(:,:,:) ) 89 113 zmin = glob_min( 'debug', pvar(:,:,:) ) 90 114 zmax = glob_max( 'debug', pvar(:,:,:) ) 91 115 ! 92 IF (lwp) WRITE(numout,*) TRIM(cdtxt),' (min, max, sum) : ',zmin, zmax, zsum 116 ! basic check sum to check reproducibility 117 ! TRANSFER function find out the integer corresponding to pvar(i,j) bit pattern 118 ! MOD allow us to keep only the latest digits during the sum 119 ! imod is not choosen to be very large as at the end there is a classic mpp_sum 120 imodd=65521 ! highest prime number < 2**16 with i8 type 121 imods=65521 ! highest prime number < 2**16 with default integer for mpp_sum subroutine 122 itmps=0 123 DO jk=1,jpk 124 DO jj=nldj,nlej 125 DO ji=nldi,nlei 126 itmps = MOD(itmps + MOD(TRANSFER(pvar(ji,jj,jk), ip),imodd), imods) 127 END DO 128 END DO 129 END DO 130 CALL mpp_sum('debug',itmps) 93 131 ! 94 CALL FLUSH(numout) 132 ! print out 133 IF (lwp) THEN 134 WRITE(numout,*) TRIM(cdtxt),' (min, max, sum, tag) : ',zmin, zmax, zsum, itmps 135 CALL FLUSH(numout) 136 END IF 95 137 ! 96 138 END SUBROUTINE debug3d 97 139 98 140 END MODULE isfutils 99 -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/LDF/ldfslp.F90
r12068 r12077 21 21 !!---------------------------------------------------------------------- 22 22 USE oce ! ocean dynamics and tracers 23 USE isf 23 USE isf_oce ! ice shelf 24 24 USE dom_oce ! ocean space and time domain 25 25 ! USE ldfdyn ! lateral diffusion: eddy viscosity coef. -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/LDF/ldftra.F90
r11822 r12077 664 664 ! eddies using the isopycnal slopes calculated in ldfslp.F : 665 665 ! T^-1 = sqrt(m_jpk(N^2*(r1^2+r2^2)*e3w)) 666 ze3w = e3w(ji,jj,jk,Kmm) * tmask(ji,jj,jk)666 ze3w = e3w(ji,jj,jk,Kmm) * wmask(ji,jj,jk) 667 667 zah(ji,jj) = zah(ji,jj) + zn2 * wslp2(ji,jj,jk) * ze3w 668 668 zhw(ji,jj) = zhw(ji,jj) + ze3w … … 682 682 ! eddies using the isopycnal slopes calculated in ldfslp.F : 683 683 ! T^-1 = sqrt(m_jpk(N^2*(r1^2+r2^2)*e3w)) 684 ze3w = e3w(ji,jj,jk,Kmm) * tmask(ji,jj,jk)684 ze3w = e3w(ji,jj,jk,Kmm) * wmask(ji,jj,jk) 685 685 zah(ji,jj) = zah(ji,jj) + zn2 * ( wslpi(ji,jj,jk) * wslpi(ji,jj,jk) & 686 686 & + wslpj(ji,jj,jk) * wslpj(ji,jj,jk) ) * ze3w -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/SBC/sbccpl.F90
r12068 r12077 27 27 USE sbcwave ! surface boundary condition: waves 28 28 USE phycst ! physical constants 29 USE isf_oce , ONLY : l_isfoasis, fwfisf_oasis ! ice shelf boundary condition 29 30 #if defined key_si3 30 31 USE ice ! ice variables … … 36 37 USE eosbn2 ! 37 38 USE sbcrnf , ONLY : l_rnfcpl 38 USE isf , ONLY : ln_isf, l_isfoasis, fwfisf_oasis39 39 #if defined key_cice 40 40 USE ice_domain_size, only: ncat -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/SBC/sbcfwb.F90
r12068 r12077 17 17 USE dom_oce ! ocean space and time domain 18 18 USE sbc_oce ! surface ocean boundary condition 19 USE isf_oce , ONLY : fwfisf_cav, fwfisf_par ! ice shelf melting contribution 19 20 USE sbc_ice , ONLY : snwice_mass, snwice_mass_b, snwice_fmass 20 21 USE phycst ! physical constants 21 22 USE sbcrnf ! ocean runoffs 22 USE isf ! ice shelf melting contribution23 23 USE sbcssr ! Sea-Surface damping terms 24 24 ! -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/SBC/sbcrnf.F90
r12068 r12077 19 19 USE phycst ! physical constants 20 20 USE sbc_oce ! surface boundary condition variables 21 USE isf ! ice shelf22 21 USE eosbn2 ! Equation Of State 23 22 USE closea ! closed seas … … 127 126 rnf_tsc(:,:,jp_tem) = sst_m(:,:) * rnf(:,:) * r1_rau0 128 127 END WHERE 129 WHERE( sf_t_rnf(1)%fnow(:,:,1) == -222._wp ) ! where fwf comes from melting of ice shelves or iceberg130 rnf_tsc(:,:,jp_tem) = ztfrz(:,:) * rnf(:,:) * r1_rau0 - rnf(:,:) * rLfusisf * r1_rau0_rcp131 END WHERE132 128 ELSE ! use SST as runoffs temperature 133 129 !CEOD River is fresh water so must at least be 0 unless we consider ice -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/SBC/sbcssm.F90
r11027 r12077 61 61 ! 62 62 ! !* surface T-, U-, V- ocean level variables (T, S, depth, velocity) 63 DO jj = 1, jpj 64 DO ji = 1, jpi 65 zts(ji,jj,jp_tem) = ts(ji,jj,mikt(ji,jj),jp_tem,Kmm) 66 zts(ji,jj,jp_sal) = ts(ji,jj,mikt(ji,jj),jp_sal,Kmm) 67 END DO 68 END DO 63 zts(:,:,jp_tem) = ts(:,:,1,jp_tem,Kmm) 64 zts(:,:,jp_sal) = ts(:,:,1,jp_sal,Kmm) 69 65 ! 70 66 IF( nn_fsbc == 1 ) THEN ! Instantaneous surface fields ! … … 73 69 ssv_m(:,:) = vv(:,:,1,Kbb) 74 70 IF( l_useCT ) THEN ; sst_m(:,:) = eos_pt_from_ct( zts(:,:,jp_tem), zts(:,:,jp_sal) ) 75 ELSE 71 ELSE ; sst_m(:,:) = zts(:,:,jp_tem) 76 72 ENDIF 77 73 sss_m(:,:) = zts(:,:,jp_sal) -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/TRA/eosbn2.F90
r11822 r12077 29 29 !! eos_insitu_pot: Compute the insitu and surface referenced potential volumic mass 30 30 !! eos_insitu_2d : Compute the in situ density for 2d fields 31 !! bn2 : Compute the Brunt-Vaisala frequency32 31 !! bn2 : compute the Brunt-Vaisala frequency 33 32 !! eos_pt_from_ct: compute the potential temperature from the Conservative Temperature -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/TRA/traatf.F90
r12068 r12077 29 29 USE sbc_oce ! surface boundary condition: ocean 30 30 USE sbcrnf ! river runoffs 31 USE isf 31 USE isf_oce ! ice shelf melting 32 32 USE zdf_oce ! ocean vertical mixing 33 33 USE domvvl ! variable volume -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/TRA/traisf.F90
r12068 r12077 10 10 !! tra_isf : update the tracer trend at ocean surface 11 11 !!---------------------------------------------------------------------- 12 USE oce ! ocean dynamics and active tracers 13 USE dom_oce ! ocean space domain variables 14 USE phycst ! physical constant 15 USE eosbn2 ! Equation Of State 16 USE isf ! Ice shelf variable 17 USE isfutils ! 18 ! 19 USE in_out_manager ! I/O manager 20 USE iom ! xIOS server 21 USE timing ! Timing 12 USE isf_oce ! Ice shelf variables 13 USE dom_oce , ONLY : e3t, r1_e1e2t ! ocean space domain variables 14 USE isfutils, ONLY : debug ! debug option 15 USE timing , ONLY : timing_start, timing_stop ! Timing 16 USE in_out_manager ! I/O manager 22 17 23 18 IMPLICIT NONE … … 65 60 IF ( ln_isfcpl ) THEN 66 61 ! 62 ! Dynamical stability at start up after change in under ice shelf cavity geometry is achieve by correcting the divergence. 63 ! This is achieved by applying a volume flux in order to keep the horizontal divergence after remapping 64 ! the same as at the end of the latest time step. So correction need to be apply at nit000 (euler time step) and 65 ! half of it at nit000+1 (leap frog time step). 66 ! in accordance to this, the heat content flux due to injected water need to be added in the temperature and salt trend 67 ! at time step nit000 and nit000+1 67 68 IF ( kt == nit000 ) CALL tra_isf_cpl(Kmm, risfcpl_tsc , pts(:,:,:,:,Krhs)) 68 69 IF ( kt == nit000+1) CALL tra_isf_cpl(Kmm, risfcpl_tsc*0.5_wp, pts(:,:,:,:,Krhs)) -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ZDF/zdfmxl.F90
r12068 r12077 12 12 !!---------------------------------------------------------------------- 13 13 USE oce ! ocean dynamics and tracers variables 14 USE isf 14 USE isf_oce ! ice shelf 15 15 USE dom_oce ! ocean space and time domain variables 16 16 USE trc_oce , ONLY: l_offline ! ocean space and time domain variables -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/step.F90
r12068 r12077 115 115 116 116 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 117 ! Update external forcing (tides, open boundaries, and surface boundary condition (including sea-ice) 118 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 119 IF( ln_isf ) CALL isf_stp ( kstp, Nnn ) 117 ! Update external forcing (tides, open boundaries, ice shelf interaction and surface boundary condition (including sea-ice) 118 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 120 119 IF( ln_tide ) CALL sbc_tide( kstp ) ! update tide potential 121 120 IF( ln_apr_dyn ) CALL sbc_apr ( kstp ) ! atmospheric pressure (NB: call before bdy_dta which needs ssh_ib) 122 121 IF( ln_bdy ) CALL bdy_dta ( kstp, Nnn, kt_offset = +1 ) ! update dynamic & tracer data at open boundaries 122 IF( ln_isf ) CALL isf_stp ( kstp, Nnn ) 123 123 CALL sbc ( kstp, Nbb, Nnn ) ! Sea Boundary Condition (including sea-ice) 124 124 -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/step_oce.F90
r12068 r12077 22 22 USE sbcwave ! Wave intialisation 23 23 24 USE isf 24 USE isf_oce ! ice shelf boundary condition 25 25 USE isfstp ! ice shelf boundary condition (isf_stp routine) 26 26 -
NEMO/branches/2019/UKMO_MERGE_2019/tests/ISOMIP+/EXPREF/namelist_cfg
r11896 r12077 165 165 ! ---------------- ice shelf load ------------------------------- 166 166 ! 167 cn_isfload = 'isomip' ! scheme to compute ice shelf load (ln_isfcav = .true. in domain_cfg.nc) 167 cn_isfload = 'uniform' ! scheme to compute ice shelf load (ln_isfcav = .true. in domain_cfg.nc) 168 rn_isfload_T = -1.0 169 rn_isfload_S = 34.2 168 170 ! 169 171 ! ---------------- ice shelf melt formulation ------------------------------- … … 182 184 ! ! oasis = fwfisf is given by oasis and pattern by file sn_isfcav_fwf 183 185 ! ! cn_isfcav_mlt = 2eq or 3eq cases: 184 cn_gammablk = 'ad15' ! scheme to compute gammat/s (spe,ad15,hj99) 185 ! ! ad15 = velocity dependend Gamma (u* * gammat/s) (Jenkins et al. 2010) 186 ! ! hj99 = velocity and stability dependent Gamma (Holland et al. 1999) 186 cn_gammablk = 'vel' ! scheme to compute gammat/s (spe,ad15,hj99) 187 ! ! spe = constant transfert velocity (rn_gammat0, rn_gammas0) 188 ! ! vel = velocity dependent transfert velocity (u* * gammat/s) (Asay-Davis et al. 2016 for a short description) 189 ! ! vel_stab = velocity and stability dependent transfert coeficient (Holland et al. 1999 for a complete description) 187 190 rn_gammat0 = 0.0215 ! gammat coefficient used in blk formula 188 191 rn_gammas0 = 0.614e-3 ! gammas coefficient used in blk formula -
NEMO/branches/2019/UKMO_MERGE_2019/tests/ISOMIP+/MY_SRC/dtatsd.F90
r11889 r12077 69 69 REWIND( numnam_ref ) ! Namelist namtsd in reference namelist : 70 70 READ ( numnam_ref, namtsd, IOSTAT = ios, ERR = 901) 71 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtsd in reference namelist' , lwp)71 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtsd in reference namelist' ) 72 72 REWIND( numnam_cfg ) ! Namelist namtsd in configuration namelist : Parameters of the run 73 73 READ ( numnam_cfg, namtsd, IOSTAT = ios, ERR = 902 ) 74 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtsd in configuration namelist' , lwp)74 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtsd in configuration namelist' ) 75 75 IF(lwm) WRITE ( numond, namtsd ) 76 76 -
NEMO/branches/2019/UKMO_MERGE_2019/tests/ISOMIP+/MY_SRC/eosbn2.F90
r11889 r12077 29 29 !! eos_insitu_pot: Compute the insitu and surface referenced potential volumic mass 30 30 !! eos_insitu_2d : Compute the in situ density for 2d fields 31 !! bn2 : Compute the Brunt-Vaisala frequency 31 !! bn2 : compute the Brunt-Vaisala frequency 32 !! eos_pt_from_ct: compute the potential temperature from the Conservative Temperature 32 33 !! eos_rab : generic interface of in situ thermal/haline expansion ratio 33 34 !! eos_rab_3d : compute in situ thermal/haline expansion ratio … … 74 75 75 76 ! !!** Namelist nameos ** 76 LOGICAL , PUBLIC :: ln_TEOS10 ! determine if eos_pt_from_ct is used to compute sst_m77 LOGICAL , PUBLIC :: ln_EOS80 ! determine if eos_pt_from_ct is used to compute sst_m78 LOGICAL , PUBLIC :: ln_SEOS ! determine if eos_pt_from_ct is used to compute sst_m77 LOGICAL , PUBLIC :: ln_TEOS10 78 LOGICAL , PUBLIC :: ln_EOS80 79 LOGICAL , PUBLIC :: ln_SEOS 79 80 LOGICAL , PUBLIC :: ln_LEOS ! determine if linear eos is used 80 81 … … 624 625 625 626 626 SUBROUTINE rab_3d( pts, pab )627 SUBROUTINE rab_3d( pts, pab, Kmm ) 627 628 !!---------------------------------------------------------------------- 628 629 !! *** ROUTINE rab_3d *** … … 634 635 !! ** Action : - pab : thermal/haline expansion ratio at T-points 635 636 !!---------------------------------------------------------------------- 637 INTEGER , INTENT(in ) :: Kmm ! time level index 636 638 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in ) :: pts ! pot. temperature & salinity 637 639 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT( out) :: pab ! thermal/haline expansion ratio … … 652 654 DO ji = 1, jpi 653 655 ! 654 zh = gdept _n(ji,jj,jk) * r1_Z0 ! depth656 zh = gdept(ji,jj,jk,Kmm) * r1_Z0 ! depth 655 657 zt = pts (ji,jj,jk,jp_tem) * r1_T0 ! temperature 656 658 zs = SQRT( ABS( pts(ji,jj,jk,jp_sal) + rdeltaS ) * r1_S0 ) ! square root salinity … … 710 712 zt = pts (ji,jj,jk,jp_tem) - 10._wp ! pot. temperature anomaly (t-T0) 711 713 zs = pts (ji,jj,jk,jp_sal) - 35._wp ! abs. salinity anomaly (s-S0) 712 zh = gdept _n(ji,jj,jk) ! depth in meters at t-point714 zh = gdept(ji,jj,jk,Kmm) ! depth in meters at t-point 713 715 ztm = tmask(ji,jj,jk) ! land/sea bottom mask = surf. mask 714 716 ! … … 730 732 zt = pts (ji,jj,jk,jp_tem) - (-1._wp) 731 733 zs = pts (ji,jj,jk,jp_sal) - 34.2_wp ! abs. salinity anomaly (s-S0) 732 zh = gdept _n(ji,jj,jk) ! depth in meters at t-point734 zh = gdept(ji,jj,jk,Kmm) ! depth in meters at t-point 733 735 ztm = tmask(ji,jj,jk) ! land/sea bottom mask = surf. mask 734 736 ! … … 757 759 758 760 759 SUBROUTINE rab_2d( pts, pdep, pab )761 SUBROUTINE rab_2d( pts, pdep, pab, Kmm ) 760 762 !!---------------------------------------------------------------------- 761 763 !! *** ROUTINE rab_2d *** … … 765 767 !! ** Action : - pab : thermal/haline expansion ratio at T-points 766 768 !!---------------------------------------------------------------------- 769 INTEGER , INTENT(in ) :: Kmm ! time level index 767 770 REAL(wp), DIMENSION(jpi,jpj,jpts) , INTENT(in ) :: pts ! pot. temperature & salinity 768 771 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: pdep ! depth [m] … … 891 894 892 895 893 SUBROUTINE rab_0d( pts, pdep, pab )896 SUBROUTINE rab_0d( pts, pdep, pab, Kmm ) 894 897 !!---------------------------------------------------------------------- 895 898 !! *** ROUTINE rab_0d *** … … 899 902 !! ** Action : - pab : thermal/haline expansion ratio at T-points 900 903 !!---------------------------------------------------------------------- 904 INTEGER , INTENT(in ) :: Kmm ! time level index 901 905 REAL(wp), DIMENSION(jpts) , INTENT(in ) :: pts ! pot. temperature & salinity 902 906 REAL(wp), INTENT(in ) :: pdep ! depth [m] … … 999 1003 1000 1004 1001 SUBROUTINE bn2( pts, pab, pn2 )1005 SUBROUTINE bn2( pts, pab, pn2, Kmm ) 1002 1006 !!---------------------------------------------------------------------- 1003 1007 !! *** ROUTINE bn2 *** … … 1013 1017 !! 1014 1018 !!---------------------------------------------------------------------- 1019 INTEGER , INTENT(in ) :: Kmm ! time level index 1015 1020 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in ) :: pts ! pot. temperature and salinity [Celsius,psu] 1016 1021 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in ) :: pab ! thermal/haline expansion coef. [Celsius-1,psu-1] … … 1026 1031 DO jj = 1, jpj ! surface and bottom value set to zero one for all in istate.F90 1027 1032 DO ji = 1, jpi 1028 zrw = ( gdepw _n(ji,jj,jk ) - gdept_n(ji,jj,jk) ) &1029 & / ( gdept _n(ji,jj,jk-1) - gdept_n(ji,jj,jk) )1033 zrw = ( gdepw(ji,jj,jk ,Kmm) - gdept(ji,jj,jk,Kmm) ) & 1034 & / ( gdept(ji,jj,jk-1,Kmm) - gdept(ji,jj,jk,Kmm) ) 1030 1035 ! 1031 1036 zaw = pab(ji,jj,jk,jp_tem) * (1. - zrw) + pab(ji,jj,jk-1,jp_tem) * zrw … … 1034 1039 pn2(ji,jj,jk) = grav * ( zaw * ( pts(ji,jj,jk-1,jp_tem) - pts(ji,jj,jk,jp_tem) ) & 1035 1040 & - zbw * ( pts(ji,jj,jk-1,jp_sal) - pts(ji,jj,jk,jp_sal) ) ) & 1036 & / e3w _n(ji,jj,jk) * wmask(ji,jj,jk)1041 & / e3w(ji,jj,jk,Kmm) * wmask(ji,jj,jk) 1037 1042 END DO 1038 1043 END DO … … 1203 1208 1204 1209 1205 SUBROUTINE eos_pen( pts, pab_pe, ppen )1210 SUBROUTINE eos_pen( pts, pab_pe, ppen, Kmm ) 1206 1211 !!---------------------------------------------------------------------- 1207 1212 !! *** ROUTINE eos_pen *** … … 1223 1228 !! pab_pe(:,:,:,jp_sal) is beta_pe 1224 1229 !!---------------------------------------------------------------------- 1230 INTEGER , INTENT(in ) :: Kmm ! time level index 1225 1231 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in ) :: pts ! pot. temperature & salinity 1226 1232 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT( out) :: pab_pe ! alpha_pe and beta_pe … … 1242 1248 DO ji = 1, jpi 1243 1249 ! 1244 zh = gdept _n(ji,jj,jk) * r1_Z0 ! depth1250 zh = gdept(ji,jj,jk,Kmm) * r1_Z0 ! depth 1245 1251 zt = pts (ji,jj,jk,jp_tem) * r1_T0 ! temperature 1246 1252 zs = SQRT( ABS( pts(ji,jj,jk,jp_sal) + rdeltaS ) * r1_S0 ) ! square root salinity … … 1306 1312 zt = pts(ji,jj,jk,jp_tem) - 10._wp ! temperature anomaly (t-T0) 1307 1313 zs = pts (ji,jj,jk,jp_sal) - 35._wp ! abs. salinity anomaly (s-S0) 1308 zh = gdept _n(ji,jj,jk) ! depth in meters at t-point1314 zh = gdept(ji,jj,jk,Kmm) ! depth in meters at t-point 1309 1315 ztm = tmask(ji,jj,jk) ! tmask 1310 1316 zn = 0.5_wp * zh * r1_rau0 * ztm … … 1326 1332 zt = pts(ji,jj,jk,jp_tem) - (-1._wp) ! temperature anomaly (t-T0) 1327 1333 zs = pts (ji,jj,jk,jp_sal) - 34.2_wp ! abs. salinity anomaly (s-S0) 1328 zh = gdept _n(ji,jj,jk) ! depth in meters at t-point1334 zh = gdept(ji,jj,jk,Kmm) ! depth in meters at t-point 1329 1335 ztm = tmask(ji,jj,jk) ! tmask 1330 1336 zn = 0.5_wp * zh * r1_rau0 * ztm … … 1368 1374 REWIND( numnam_ref ) ! Namelist nameos in reference namelist : equation of state 1369 1375 READ ( numnam_ref, nameos, IOSTAT = ios, ERR = 901 ) 1370 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nameos in reference namelist' , lwp)1376 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nameos in reference namelist' ) 1371 1377 ! 1372 1378 REWIND( numnam_cfg ) ! Namelist nameos in configuration namelist : equation of state 1373 1379 READ ( numnam_cfg, nameos, IOSTAT = ios, ERR = 902 ) 1374 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nameos in configuration namelist' , lwp)1380 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nameos in configuration namelist' ) 1375 1381 IF(lwm) WRITE( numond, nameos ) 1376 1382 ! … … 1782 1788 ! 1783 1789 CASE( np_seos ) !== Simplified EOS ==! 1790 1791 r1_S0 = 0.875_wp/35.16504_wp ! Used to convert CT in potential temperature when using bulk formulae (eos_pt_from_ct) 1792 1784 1793 IF(lwp) THEN 1785 1794 WRITE(numout,*) -
NEMO/branches/2019/UKMO_MERGE_2019/tests/ISOMIP+/MY_SRC/isfcavgam.F90
r11889 r12077 10 10 !! isfcav_gammats : compute exchange coeficient gamma 11 11 !!---------------------------------------------------------------------- 12 USE isf 12 USE isf_oce 13 13 USE isfutils, ONLY: debug 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 46 46 !! 47 47 !! ** Method : select the gamma formulation 48 !! 3 method available (cst, AD15 and HJ99)48 !! 3 method available (cst, vel and vel_stab) 49 49 !!--------------------------------------------------------------------- 50 50 !!-------------------------- OUT ------------------------------------- 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 … … 57 58 !!--------------------------------------------------------------------- 58 59 ! 59 ! compute velocity in the tbl if needed 60 !========================================== 61 ! 1.: compute velocity in the tbl if needed 62 !========================================== 63 ! 60 64 SELECT CASE ( cn_gammablk ) 61 65 CASE ( 'spe' ) 62 66 ! gamma is constant (specified in namelist) 63 67 ! nothing to do 64 CASE (' ad15', 'hj99')68 CASE ('vel', 'vel_stab') 65 69 ! compute velocity in tbl 66 CALL isf_tbl( un(:,:,:) ,zutbl(:,:),'U', miku, rhisf_tbl_cav)67 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) 68 72 ! 69 73 ! mask velocity in tbl with ice shelf mask … … 78 82 END SELECT 79 83 ! 80 ! compute gamma 84 !========================================== 85 ! 2.: compute gamma 86 !========================================== 87 ! 81 88 SELECT CASE ( cn_gammablk ) 82 89 CASE ( 'spe' ) ! gamma is constant (specified in namelist) 83 90 pgt(:,:) = rn_gammat0 84 91 pgs(:,:) = rn_gammas0 85 CASE ( ' ad15' ) ! gamma is proportional to u*86 CALL gammats_ AD15 ( zutbl, zvtbl, rCd0_top, rn_vtide**2, pgt, pgs )87 CASE ( ' hj99' ) ! gamma depends of stability of boundary layer and u*88 CALL gammats_ HJ99 (pttbl, pstbl, zutbl, zvtbl, rCd0_top, r_ke0_top, pqoce, pqfwf, pgt, pgs )92 CASE ( 'vel' ) ! gamma is proportional to u* 93 CALL gammats_vel ( zutbl, zvtbl, rCd0_top, r_ke0_top, pgt, pgs ) 94 CASE ( 'vel_stab' ) ! gamma depends of stability of boundary layer and u* 95 CALL gammats_vel_stab (Kmm, pttbl, pstbl, zutbl, zvtbl, rCd0_top, r_ke0_top, pqoce, pqfwf, pgt, pgs ) 89 96 CASE DEFAULT 90 97 CALL ctl_stop('STOP','method to compute gamma (cn_gammablk) is unknown (should not see this)') 91 98 END SELECT 92 99 ! 93 ! ouput exchange coeficient and tbl velocity 100 !========================================== 101 ! 3.: output and debug 102 !========================================== 103 ! 94 104 CALL iom_put('isfgammat', pgt(:,:)) 95 105 CALL iom_put('isfgammas', pgs(:,:)) … … 106 116 !!----------------------------------------------------------------------------------------------------- 107 117 ! 108 SUBROUTINE gammats_ AD15(putbl, pvtbl, pCd, pke2, & ! <<== in118 SUBROUTINE gammats_vel( putbl, pvtbl, pCd, pke2, & ! <<== in 109 119 & pgt, pgs ) ! ==>> out gammats [m/s] 110 120 !!---------------------------------------------------------------------- … … 113 123 !! ** Method : gamma is velocity dependent ( gt= gt0 * Ustar ) 114 124 !! 115 !! ** Reference : Jenkins et al., 2010, JPO, p2298-2312 116 !! Asay-Davis et al., Geosci. Model Dev., 9, 2471-2497, 2016 125 !! ** Reference : Asay-Davis et al., Geosci. Model Dev., 9, 2471-2497, 2016 117 126 !!--------------------------------------------------------------------- 118 127 !!-------------------------- OUT ------------------------------------- … … 136 145 CALL iom_put('isfustar',zustar(:,:)) 137 146 ! 138 END SUBROUTINE gammats_ AD15139 140 SUBROUTINE gammats_ HJ99(pttbl, pstbl, putbl, pvtbl, pCd, pke2, pqoce, pqfwf, & ! <<== in141 & pgt , pgs ) ! ==>> out gammats [m/s]147 END SUBROUTINE gammats_vel 148 149 SUBROUTINE gammats_vel_stab( Kmm, pttbl, pstbl, putbl, pvtbl, pCd, pke2, pqoce, pqfwf, & ! <<== in 150 & pgt , pgs ) ! ==>> out gammats [m/s] 142 151 !!---------------------------------------------------------------------- 143 152 !! ** Purpose : compute the coefficient echange coefficient … … 150 159 REAL(wp), DIMENSION(jpi,jpj), INTENT( out) :: pgt, pgs ! gammat and gammas 151 160 !!-------------------------- IN ------------------------------------- 161 INTEGER :: Kmm ! ocean time level index 152 162 REAL(wp), INTENT(in ) :: pke2 ! background velocity squared 153 163 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pqoce, pqfwf ! surface heat flux and fwf flux … … 199 209 ! compute Rc number (as done in zdfric.F90) 200 210 !!gm better to do it like in the new zdfric.F90 i.e. avm weighted Ri computation 201 zcoef = 0.5_wp / e3w _n(ji,jj,ikt+1)211 zcoef = 0.5_wp / e3w(ji,jj,ikt+1,Kmm) 202 212 ! ! shear of horizontal velocity 203 zdku = zcoef * ( u n(ji-1,jj ,ikt ) + un(ji,jj,ikt) &204 & -u n(ji-1,jj ,ikt+1) - un(ji,jj,ikt+1) )205 zdkv = zcoef * ( v n(ji ,jj-1,ikt ) + vn(ji,jj,ikt) &206 & -v n(ji ,jj-1,ikt+1) - vn(ji,jj,ikt+1) )213 zdku = zcoef * ( uu(ji-1,jj ,ikt ,Kmm) + uu(ji,jj,ikt ,Kmm) & 214 & -uu(ji-1,jj ,ikt+1,Kmm) - uu(ji,jj,ikt+1,Kmm) ) 215 zdkv = zcoef * ( vv(ji ,jj-1,ikt ,Kmm) + vv(ji,jj,ikt ,Kmm) & 216 & -vv(ji ,jj-1,ikt+1,Kmm) - vv(ji,jj,ikt+1,Kmm) ) 207 217 ! ! richardson number (minimum value set to zero) 208 218 zRc = MAX(rn2(ji,jj,ikt+1), 0._wp) / MAX( zdku*zdku + zdkv*zdkv, zeps ) … … 211 221 zts(jp_tem) = pttbl(ji,jj) 212 222 zts(jp_sal) = pstbl(ji,jj) 213 zdep = gdepw _n(ji,jj,ikt)214 ! 215 CALL eos_rab( zts, zdep, zab )223 zdep = gdepw(ji,jj,ikt,Kmm) 224 ! 225 CALL eos_rab( zts, zdep, zab, Kmm ) 216 226 ! 217 227 ! compute length scale (Eq ??) … … 220 230 ! compute Monin Obukov Length 221 231 ! Maximum boundary layer depth (Eq ??) 222 zhmax = gdept _n(ji,jj,mbkt(ji,jj)) - gdepw_n(ji,jj,mikt(ji,jj)) -0.001_wp232 zhmax = gdept(ji,jj,mbkt(ji,jj),Kmm) - gdepw(ji,jj,mikt(ji,jj),Kmm) -0.001_wp 223 233 ! 224 234 ! Compute Monin obukhov length scale at the surface and Ekman depth: (Eq ??) … … 243 253 END DO 244 254 245 END SUBROUTINE gammats_ HJ99255 END SUBROUTINE gammats_vel_stab 246 256 247 257 END MODULE isfcavgam -
NEMO/branches/2019/UKMO_MERGE_2019/tests/ISOMIP+/MY_SRC/isfstp.F90
r11931 r12077 14 14 !!---------------------------------------------------------------------- 15 15 ! 16 USE isf ! isf variables16 USE isf_oce ! isf variables 17 17 USE isfload, ONLY: isf_load ! ice shelf load 18 18 USE isftbl , ONLY: isf_tbl_lvl ! ice shelf boundary layer … … 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. 26 26 ! 27 27 USE lib_mpp, ONLY: ctl_stop, ctl_nam 28 USE fldread, ONLY: FLD, FLD_N 28 29 USE in_out_manager ! I/O manager 29 30 USE timing … … 42 43 CONTAINS 43 44 44 SUBROUTINE isf_stp( kt )45 SUBROUTINE isf_stp( kt, Kmm ) 45 46 !!--------------------------------------------------------------------- 46 47 !! *** ROUTINE isf_stp *** … … 58 59 !!---------------------------------------------------------------------- 59 60 INTEGER, INTENT(in) :: kt ! ocean time step 61 INTEGER, INTENT(in) :: Kmm ! ocean time level index 60 62 !!--------------------------------------------------------------------- 61 63 ! 62 64 IF( ln_timing ) CALL timing_start('isf') 63 65 ! 66 !======================================================================= 67 ! 1.: compute melt and associated heat fluxes in the ice shelf cavities 68 !======================================================================= 69 ! 64 70 IF ( ln_isfcav_mlt ) THEN 65 71 ! 66 ! before time step72 ! 1.1: before time step 67 73 IF ( kt /= nit000 ) THEN 68 74 risf_cav_tsc_b (:,:,:) = risf_cav_tsc (:,:,:) … … 70 76 END IF 71 77 ! 72 ! compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl)78 ! 1.2: compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl) 73 79 rhisf_tbl_cav(:,:) = rn_htbl * mskisf_cav(:,:) 74 CALL isf_tbl_lvl(ht _n, e3t_n, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav)75 ! 76 ! compute ice shelf melt77 CALL isf_cav( kt, risf_cav_tsc, fwfisf_cav)80 CALL isf_tbl_lvl(ht, e3t(:,:,:,Kmm), misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav) 81 ! 82 ! 1.3: compute ice shelf melt 83 CALL isf_cav( kt, Kmm, risf_cav_tsc, fwfisf_cav) 78 84 ! 79 85 END IF 80 86 ! 87 !================================================================================= 88 ! 2.: compute melt and associated heat fluxes for not resolved ice shelf cavities 89 !================================================================================= 90 ! 81 91 IF ( ln_isfpar_mlt ) THEN 82 92 ! 83 ! before time step93 ! 2.1: before time step 84 94 IF ( kt /= nit000 ) THEN 85 95 risf_par_tsc_b(:,:,:) = risf_par_tsc(:,:,:) … … 87 97 END IF 88 98 ! 89 ! compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl)90 ! by simplicity, we assume the top level where param applied do not change with time 99 ! 2.2: compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl) 100 ! by simplicity, we assume the top level where param applied do not change with time (done in init part) 91 101 rhisf_tbl_par(:,:) = rhisf0_tbl_par(:,:) 92 CALL isf_tbl_lvl(ht_n, e3t_n, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par) 93 ! 94 ! compute ice shelf melt 95 CALL isf_par( kt, risf_par_tsc, fwfisf_par) 96 ! 97 END IF 98 ! 99 IF ( ln_isfcpl ) THEN 100 ! after step nit000 + 2 we do not need anymore the risfcpl_ arrays 101 IF ( kt == nit000 + 2 ) CALL isf_dealloc_cpl() 102 103 IF ( lrst_oce ) CALL isfcpl_rst_write(kt) 104 END IF 102 CALL isf_tbl_lvl(ht, e3t(:,:,:,Kmm), misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par) 103 ! 104 ! 2.3: compute ice shelf melt 105 CALL isf_par( kt, Kmm, risf_par_tsc, fwfisf_par) 106 ! 107 END IF 108 ! 109 !================================================================================== 110 ! 3.: output specific restart variable in case of coupling with an ice sheet model 111 !================================================================================== 112 ! 113 IF ( ln_isfcpl .AND. lrst_oce ) CALL isfcpl_rst_write(kt, Kmm) 105 114 ! 106 115 IF( ln_timing ) CALL timing_stop('isf') … … 108 117 END SUBROUTINE isf_stp 109 118 110 SUBROUTINE isf_init 119 SUBROUTINE isf_init(Kbb, Kmm, Kaa) 111 120 !!--------------------------------------------------------------------- 112 121 !! *** ROUTINE isfstp_init *** … … 122 131 !! - call cav/param/isfcpl init routine 123 132 !!---------------------------------------------------------------------- 133 INTEGER, INTENT(in) :: Kbb, Kmm, Kaa ! ocean time level indices 124 134 ! 125 135 ! constrain: l_isfoasis need to be known … … 135 145 ! 136 146 ! compute ice shelf load 137 IF ( ln_isfcav ) CALL isf_load( risfload )147 IF ( ln_isfcav ) CALL isf_load( Kmm, risfload ) 138 148 ! 139 149 ! terminate routine now if no ice shelf melt formulation specify … … 150 160 !--------------------------------------------------------------------------------------------------------------------- 151 161 ! initialisation ice sheet coupling 152 IF ( ln_isfcpl ) CALL isfcpl_init()162 IF( ln_isfcpl ) CALL isfcpl_init(Kbb, Kmm, Kaa) 153 163 ! 154 164 END IF … … 177 187 WRITE(numout,*) ' melt inside the cavity ln_isfcav_mlt = ', ln_isfcav_mlt 178 188 IF ( ln_isfcav_mlt) THEN 179 WRITE(numout,*) ' melt formulation cn_isfcav_mlt= ', TRIM(cn_isfcav_mlt)180 WRITE(numout,*) ' thickness of the top boundary layer rn_htbl= ', rn_htbl181 WRITE(numout,*) ' gamma formulation cn_gammablk= ', TRIM(cn_gammablk)189 WRITE(numout,*) ' melt formulation cn_isfcav_mlt= ', TRIM(cn_isfcav_mlt) 190 WRITE(numout,*) ' thickness of the top boundary layer rn_htbl = ', rn_htbl 191 WRITE(numout,*) ' gamma formulation cn_gammablk = ', TRIM(cn_gammablk) 182 192 IF ( TRIM(cn_gammablk) .NE. 'spe' ) THEN 183 WRITE(numout,*) ' gammat coefficient rn_gammat0 = ', rn_gammat0184 WRITE(numout,*) ' gammas coefficient rn_gammas0 = ', rn_gammas0185 WRITE(numout,*) ' top background ke used (from namdrg_top) rn_vtide**2 = ', rn_vtide**2186 WRITE(numout,*) ' top drag coef. used (from namdrg_top) rn_Cd0 = ', r_Cdmin_top193 WRITE(numout,*) ' gammat coefficient rn_gammat0 = ', rn_gammat0 194 WRITE(numout,*) ' gammas coefficient rn_gammas0 = ', rn_gammas0 195 WRITE(numout,*) ' top background ke used (from namdrg_top) rn_vtide**2 = ', rn_vtide**2 196 WRITE(numout,*) ' top drag coef. used (from namdrg_top) rn_Cd0 = ', r_Cdmin_top 187 197 END IF 188 198 END IF … … 212 222 END IF 213 223 214 IF (ln_isfcav) WRITE(numout,*) ' Ice shelf load method cn_isfload = ', TRIM(cn_isfload) 224 IF (ln_isfcav) THEN 225 WRITE(numout,*) ' Ice shelf load method cn_isfload = ', TRIM(cn_isfload) 226 WRITE(numout,*) ' Temperature used to compute the ice shelf load = ', rn_isfload_T 227 WRITE(numout,*) ' Salinity used to compute the ice shelf load = ', rn_isfload_S 228 END IF 215 229 WRITE(numout,*) '' 230 FLUSH(numout) 216 231 217 232 END IF … … 267 282 INTEGER :: ios ! Local integer output status for namelist read 268 283 !!---------------------------------------------------------------------- 269 NAMELIST/namisf/ ln_isf , & 270 & ln_isfcav_mlt, cn_isfcav_mlt, cn_gammablk, rn_gammat0, rn_gammas0, rn_htbl, sn_isfcav_fwf, & 271 & ln_isfpar_mlt, cn_isfpar_mlt, sn_isfpar_fwf, sn_isfpar_zmin, sn_isfpar_zmax, sn_isfpar_Leff, & 272 & ln_isfcpl , nn_drown, ln_isfcpl_cons, ln_isfdebug, rn_vtide, & 273 & cn_isfload , cn_isfdir 284 NAMELIST/namisf/ ln_isf , & 285 & cn_gammablk , rn_gammat0 , rn_gammas0 , rn_htbl, sn_isfcav_fwf, & 286 & ln_isfcav_mlt , cn_isfcav_mlt , sn_isfcav_fwf , & 287 & ln_isfpar_mlt , cn_isfpar_mlt , sn_isfpar_fwf , & 288 & sn_isfpar_zmin, sn_isfpar_zmax, sn_isfpar_Leff, & 289 & ln_isfcpl , nn_drown , ln_isfcpl_cons, ln_isfdebug, rn_vtide, & 290 & cn_isfload , rn_isfload_T , rn_isfload_S , cn_isfdir 274 291 !!---------------------------------------------------------------------- 275 292 ! 276 293 REWIND( numnam_ref ) ! Namelist namsbc_rnf in reference namelist : Runoffs 277 294 READ ( numnam_ref, namisf, IOSTAT = ios, ERR = 901) 278 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namisf in reference namelist' , lwp)295 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namisf in reference namelist' ) 279 296 ! 280 297 REWIND( numnam_cfg ) ! Namelist namsbc_rnf in configuration namelist : Runoffs 281 298 READ ( numnam_cfg, namisf, IOSTAT = ios, ERR = 902 ) 282 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namisf in configuration namelist' , lwp)299 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namisf in configuration namelist' ) 283 300 IF(lwm) WRITE ( numond, namisf ) 284 301 -
NEMO/branches/2019/UKMO_MERGE_2019/tests/ISOMIP+/MY_SRC/istate.F90
r11889 r12077 50 50 CONTAINS 51 51 52 SUBROUTINE istate_init 52 SUBROUTINE istate_init( Kbb, Kmm, Kaa ) 53 53 !!---------------------------------------------------------------------- 54 54 !! *** ROUTINE istate_init *** … … 56 56 !! ** Purpose : Initialization of the dynamics and tracer fields. 57 57 !!---------------------------------------------------------------------- 58 INTEGER, INTENT( in ) :: Kbb, Kmm, Kaa ! ocean time level indices 59 ! 58 60 INTEGER :: ji, jj, jk ! dummy loop indices 59 61 !!gm see comment further down … … 75 77 rhd (:,:,: ) = 0._wp ; rhop (:,:,: ) = 0._wp ! set one for all to 0 at level jpk 76 78 rn2b (:,:,: ) = 0._wp ; rn2 (:,:,: ) = 0._wp ! set one for all to 0 at levels 1 and jpk 77 ts a (:,:,:,:) = 0._wp! set one for all to 0 at level jpk79 ts (:,:,:,:,Kaa) = 0._wp ! set one for all to 0 at level jpk 78 80 rab_b(:,:,:,:) = 0._wp ; rab_n(:,:,:,:) = 0._wp ! set one for all to 0 at level jpk 79 81 #if defined key_agrif 80 u a (:,:,:) = 0._wp ! used in agrif_oce_sponge at initialization81 v a (:,:,:) = 0._wp ! used in agrif_oce_sponge at initialization82 uu (:,:,: ,Kaa) = 0._wp ! used in agrif_oce_sponge at initialization 83 vv (:,:,: ,Kaa) = 0._wp ! used in agrif_oce_sponge at initialization 82 84 #endif 83 85 84 86 IF( ln_rstart ) THEN ! Restart from a file 85 87 ! ! ------------------- 86 CALL rst_read 88 CALL rst_read( Kbb, Kmm ) ! Read the restart file 87 89 CALL day_init ! model calendar (using both namelist and restart infos) 88 90 ! … … 95 97 ! 96 98 IF( ln_tsd_init ) THEN 97 CALL dta_tsd( nit000, 'ini', ts b) ! read 3D T and S data at nit00099 CALL dta_tsd( nit000, 'ini', ts(:,:,:,:,Kbb) ) ! read 3D T and S data at nit000 98 100 ! 99 ssh b(:,:) = 0._wp ! set the ocean at rest101 ssh(:,:,Kbb) = 0._wp ! set the ocean at rest 100 102 IF( ll_wd ) THEN 101 ssh b(:,:) = -ssh_ref ! Added in 30 here for bathy that adds 30 as Iterative test CEOD103 ssh(:,:,Kbb) = -ssh_ref ! Added in 30 here for bathy that adds 30 as Iterative test CEOD 102 104 ! 103 105 ! Apply minimum wetdepth criterion … … 105 107 DO jj = 1,jpj 106 108 DO ji = 1,jpi 107 IF( ht_0(ji,jj) + ssh b(ji,jj) < rn_wdmin1 ) THEN108 ssh b(ji,jj) = tmask(ji,jj,1)*( rn_wdmin1 - (ht_0(ji,jj)) )109 IF( ht_0(ji,jj) + ssh(ji,jj,Kbb) < rn_wdmin1 ) THEN 110 ssh(ji,jj,Kbb) = tmask(ji,jj,1)*( rn_wdmin1 - (ht_0(ji,jj)) ) 109 111 ENDIF 110 112 END DO 111 113 END DO 112 114 ENDIF 113 u b (:,:,:) = 0._wp114 v b (:,:,:) = 0._wp115 uu (:,:,:,Kbb) = 0._wp 116 vv (:,:,:,Kbb) = 0._wp 115 117 ! 116 118 ELSE ! user defined initial T and S 117 CALL usr_def_istate( gdept _b, tmask, tsb, ub, vb, sshb)119 CALL usr_def_istate( gdept(:,:,:,Kbb), tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb), ssh(:,:,Kbb) ) 118 120 ENDIF 119 ts n (:,:,:,:) = tsb (:,:,:,:) ! set now values from to before ones120 ssh n (:,:) = sshb(:,:)121 u n (:,:,:) = ub (:,:,:)122 v n (:,:,:) = vb (:,:,:)123 hdiv n(:,:,jpk) = 0._wp ! bottom divergence set one for 0 to zero at jpk level124 CALL div_hor( 0 ) ! compute interior hdivnvalue125 !!gm hdiv n(:,:,:) = 0._wp121 ts (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb) ! set now values from to before ones 122 ssh (:,:,Kmm) = ssh(:,:,Kbb) 123 uu (:,:,:,Kmm) = uu (:,:,:,Kbb) 124 vv (:,:,:,Kmm) = vv (:,:,:,Kbb) 125 hdiv(:,:,jpk) = 0._wp ! bottom divergence set one for 0 to zero at jpk level 126 CALL div_hor( 0, Kbb, Kmm ) ! compute interior hdiv value 127 !!gm hdiv(:,:,:) = 0._wp 126 128 127 129 !!gm POTENTIAL BUG : 128 !!gm ISSUE : if ssh b/= 0 then, in non linear free surface, the e3._n, e3._b should be recomputed130 !!gm ISSUE : if ssh(:,:,Kbb) /= 0 then, in non linear free surface, the e3._n, e3._b should be recomputed 129 131 !! as well as gdept and gdepw.... !!!!! 130 132 !! ===>>>> probably a call to domvvl initialisation here.... … … 136 138 ! ALLOCATE( zuvd(jpi,jpj,jpk,2) ) 137 139 ! CALL dta_uvd( nit000, zuvd ) 138 ! u b(:,:,:) = zuvd(:,:,:,1) ; un(:,:,:) = ub(:,:,:)139 ! v b(:,:,:) = zuvd(:,:,:,2) ; vn(:,:,:) = vb(:,:,:)140 ! uu(:,:,:,Kbb) = zuvd(:,:,:,1) ; uu(:,:,:,Kmm) = uu(:,:,:,Kbb) 141 ! vv(:,:,:,Kbb) = zuvd(:,:,:,2) ; vv(:,:,:,Kmm) = vv(:,:,:,Kbb) 140 142 ! DEALLOCATE( zuvd ) 141 143 ! ENDIF 142 144 ! 143 145 !!gm This is to be changed !!!! 144 ! ! - ML - ssh n could be modified by istate_eel, so that initialization of e3t_bis done here146 ! ! - ML - ssh(:,:,Kmm) could be modified by istate_eel, so that initialization of e3t(:,:,:,Kbb) is done here 145 147 ! IF( .NOT.ln_linssh ) THEN 146 148 ! DO jk = 1, jpk 147 ! e3t _b(:,:,jk) = e3t_n(:,:,jk)149 ! e3t(:,:,jk,Kbb) = e3t(:,:,jk,Kmm) 148 150 ! END DO 149 151 ! ENDIF … … 155 157 ! Do it whatever the free surface method, these arrays being eventually used 156 158 ! 157 u n_b(:,:) = 0._wp ; vn_b(:,:) = 0._wp158 u b_b(:,:) = 0._wp ; vb_b(:,:) = 0._wp159 uu_b(:,:,Kmm) = 0._wp ; vv_b(:,:,Kmm) = 0._wp 160 uu_b(:,:,Kbb) = 0._wp ; vv_b(:,:,Kbb) = 0._wp 159 161 ! 160 !!gm the use of umsak & vmask is not necessary below as u n, vn, ub, vbare always masked162 !!gm the use of umsak & vmask is not necessary below as uu(:,:,:,Kmm), vv(:,:,:,Kmm), uu(:,:,:,Kbb), vv(:,:,:,Kbb) are always masked 161 163 DO jk = 1, jpkm1 162 164 DO jj = 1, jpj 163 165 DO ji = 1, jpi 164 u n_b(ji,jj) = un_b(ji,jj) + e3u_n(ji,jj,jk) * un(ji,jj,jk) * umask(ji,jj,jk)165 v n_b(ji,jj) = vn_b(ji,jj) + e3v_n(ji,jj,jk) * vn(ji,jj,jk) * vmask(ji,jj,jk)166 uu_b(ji,jj,Kmm) = uu_b(ji,jj,Kmm) + e3u(ji,jj,jk,Kmm) * uu(ji,jj,jk,Kmm) * umask(ji,jj,jk) 167 vv_b(ji,jj,Kmm) = vv_b(ji,jj,Kmm) + e3v(ji,jj,jk,Kmm) * vv(ji,jj,jk,Kmm) * vmask(ji,jj,jk) 166 168 ! 167 u b_b(ji,jj) = ub_b(ji,jj) + e3u_b(ji,jj,jk) * ub(ji,jj,jk) * umask(ji,jj,jk)168 v b_b(ji,jj) = vb_b(ji,jj) + e3v_b(ji,jj,jk) * vb(ji,jj,jk) * vmask(ji,jj,jk)169 uu_b(ji,jj,Kbb) = uu_b(ji,jj,Kbb) + e3u(ji,jj,jk,Kbb) * uu(ji,jj,jk,Kbb) * umask(ji,jj,jk) 170 vv_b(ji,jj,Kbb) = vv_b(ji,jj,Kbb) + e3v(ji,jj,jk,Kbb) * vv(ji,jj,jk,Kbb) * vmask(ji,jj,jk) 169 171 END DO 170 172 END DO 171 173 END DO 172 174 ! 173 u n_b(:,:) = un_b(:,:) * r1_hu_n(:,:)174 v n_b(:,:) = vn_b(:,:) * r1_hv_n(:,:)175 uu_b(:,:,Kmm) = uu_b(:,:,Kmm) * r1_hu(:,:,Kmm) 176 vv_b(:,:,Kmm) = vv_b(:,:,Kmm) * r1_hv(:,:,Kmm) 175 177 ! 176 u b_b(:,:) = ub_b(:,:) * r1_hu_b(:,:)177 v b_b(:,:) = vb_b(:,:) * r1_hv_b(:,:)178 uu_b(:,:,Kbb) = uu_b(:,:,Kbb) * r1_hu(:,:,Kbb) 179 vv_b(:,:,Kbb) = vv_b(:,:,Kbb) * r1_hv(:,:,Kbb) 178 180 ! 179 181 END SUBROUTINE istate_init -
NEMO/branches/2019/UKMO_MERGE_2019/tests/ISOMIP+/MY_SRC/sbcfwb.F90
r11931 r12077 17 17 USE dom_oce ! ocean space and time domain 18 18 USE sbc_oce ! surface ocean boundary condition 19 USE isf_oce ! ice shelf melting contribution 19 20 USE sbc_ice , ONLY : snwice_mass, snwice_mass_b, snwice_fmass 20 21 USE phycst ! physical constants 21 22 USE sbcrnf ! ocean runoffs 22 USE isf ! ice shelf melting contribution23 23 USE sbcssr ! Sea-Surface damping terms 24 USE tradmp !25 24 ! 26 25 USE in_out_manager ! I/O manager … … 49 48 CONTAINS 50 49 51 SUBROUTINE sbc_fwb( kt, kn_fwb, kn_fsbc )50 SUBROUTINE sbc_fwb( kt, kn_fwb, kn_fsbc, Kmm ) 52 51 !!--------------------------------------------------------------------- 53 52 !! *** ROUTINE sbc_fwb *** … … 66 65 INTEGER, INTENT( in ) :: kn_fsbc ! 67 66 INTEGER, INTENT( in ) :: kn_fwb ! ocean time-step index 67 INTEGER, INTENT( in ) :: Kmm ! ocean time level index 68 68 ! 69 69 INTEGER :: inum, ikty, iyear ! local integers … … 157 157 a_fwb_b = a_fwb ! mean sea level taking into account the ice+snow 158 158 ! sum over the global domain 159 a_fwb = glob_sum( 'sbcfwb', e1e2t(:,:) * ( ssh n(:,:) + snwice_mass(:,:) * r1_rau0 ) )159 a_fwb = glob_sum( 'sbcfwb', e1e2t(:,:) * ( ssh(:,:,Kmm) + snwice_mass(:,:) * r1_rau0 ) ) 160 160 a_fwb = a_fwb * 1.e+3 / ( area * rday * 365. ) ! convert in Kg/m3/s = mm/s 161 161 !!gm ! !!bug 365d year -
NEMO/branches/2019/UKMO_MERGE_2019/tests/ISOMIP+/MY_SRC/tradmp.F90
r11889 r12077 72 72 73 73 74 SUBROUTINE tra_dmp( kt )74 SUBROUTINE tra_dmp( kt, Kbb, Kmm, pts, Krhs ) 75 75 !!---------------------------------------------------------------------- 76 76 !! *** ROUTINE tra_dmp *** … … 90 90 !! ** Action : - tsa: tracer trends updated with the damping trend 91 91 !!---------------------------------------------------------------------- 92 INTEGER, INTENT(in) :: kt ! ocean time-step index 92 INTEGER, INTENT(in ) :: kt ! ocean time-step index 93 INTEGER, INTENT(in ) :: Kbb, Kmm, Krhs ! time level indices 94 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts ! active tracers and RHS of tracer equation 93 95 ! 94 96 INTEGER :: ji, jj, jk, jn ! dummy loop indices … … 101 103 IF( l_trdtra ) THEN !* Save ta and sa trends 102 104 ALLOCATE( ztrdts(jpi,jpj,jpk,jpts) ) 103 ztrdts(:,:,:,:) = tsa(:,:,:,:)105 ztrdts(:,:,:,:) = pts(:,:,:,:,Krhs) 104 106 ENDIF 105 107 ! !== input T-S data at kt ==! … … 113 115 DO jj = 2, jpjm1 114 116 DO ji = fs_2, fs_jpim1 ! vector opt. 115 tsa(ji,jj,jk,jn) = tsa(ji,jj,jk,jn) + resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jn) - tsb(ji,jj,jk,jn) ) 117 pts(ji,jj,jk,jn,Krhs) = pts(ji,jj,jk,jn,Krhs) & 118 & + resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jn) - pts(ji,jj,jk,jn,Kbb) ) 116 119 END DO 117 120 END DO … … 124 127 DO ji = fs_2, fs_jpim1 ! vector opt. 125 128 IF( avt(ji,jj,jk) <= avt_c ) THEN 126 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) &127 & + resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jp_tem) - tsb(ji,jj,jk,jp_tem) )128 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) &129 & + resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jp_sal) - tsb(ji,jj,jk,jp_sal) )129 pts(ji,jj,jk,jp_tem,Krhs) = pts(ji,jj,jk,jp_tem,Krhs) & 130 & + resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jp_tem) - pts(ji,jj,jk,jp_tem,Kbb) ) 131 pts(ji,jj,jk,jp_sal,Krhs) = pts(ji,jj,jk,jp_sal,Krhs) & 132 & + resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jp_sal) - pts(ji,jj,jk,jp_sal,Kbb) ) 130 133 ENDIF 131 134 END DO … … 137 140 DO jj = 2, jpjm1 138 141 DO ji = fs_2, fs_jpim1 ! vector opt. 139 IF( gdept _n(ji,jj,jk) >= hmlp (ji,jj) ) THEN140 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) &141 & + resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jp_tem) - tsb(ji,jj,jk,jp_tem) )142 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) &143 & + resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jp_sal) - tsb(ji,jj,jk,jp_sal) )142 IF( gdept(ji,jj,jk,Kmm) >= hmlp (ji,jj) ) THEN 143 pts(ji,jj,jk,jp_tem,Krhs) = pts(ji,jj,jk,jp_tem,Krhs) & 144 & + resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jp_tem) - pts(ji,jj,jk,jp_tem,Kbb) ) 145 pts(ji,jj,jk,jp_sal,Krhs) = pts(ji,jj,jk,jp_sal,Krhs) & 146 & + resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jp_sal) - pts(ji,jj,jk,jp_sal,Kbb) ) 144 147 ENDIF 145 148 END DO … … 150 153 ! 151 154 IF( l_trdtra ) THEN ! trend diagnostic 152 ztrdts(:,:,:,:) = tsa(:,:,:,:) - ztrdts(:,:,:,:)153 CALL trd_tra( kt, 'TRA', jp_tem, jptra_dmp, ztrdts(:,:,:,jp_tem) )154 CALL trd_tra( kt, 'TRA', jp_sal, jptra_dmp, ztrdts(:,:,:,jp_sal) )155 ztrdts(:,:,:,:) = pts(:,:,:,:,Krhs) - ztrdts(:,:,:,:) 156 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_dmp, ztrdts(:,:,:,jp_tem) ) 157 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_dmp, ztrdts(:,:,:,jp_sal) ) 155 158 DEALLOCATE( ztrdts ) 156 159 ENDIF 157 160 ! ! Control print 158 IF(ln_ctl) CALL prt_ctl( tab3d_1= tsa(:,:,:,jp_tem), clinfo1=' dmp - Ta: ', mask1=tmask, &159 & tab3d_2= tsa(:,:,:,jp_sal), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' )161 IF(ln_ctl) CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Krhs), clinfo1=' dmp - Ta: ', mask1=tmask, & 162 & tab3d_2=pts(:,:,:,jp_sal,Krhs), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' ) 160 163 ! 161 164 IF( ln_timing ) CALL timing_stop('tra_dmp') … … 179 182 REWIND( numnam_ref ) ! Namelist namtra_dmp in reference namelist : T & S relaxation 180 183 READ ( numnam_ref, namtra_dmp, IOSTAT = ios, ERR = 901) 181 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_dmp in reference namelist' , lwp)184 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_dmp in reference namelist' ) 182 185 ! 183 186 REWIND( numnam_cfg ) ! Namelist namtra_dmp in configuration namelist : T & S relaxation 184 187 READ ( numnam_cfg, namtra_dmp, IOSTAT = ios, ERR = 902 ) 185 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtra_dmp in configuration namelist' , lwp)188 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtra_dmp in configuration namelist' ) 186 189 IF(lwm) WRITE ( numond, namtra_dmp ) 187 190 ! -
NEMO/branches/2019/UKMO_MERGE_2019/tests/ISOMIP+/MY_SRC/usrdef_sbc.F90
r11889 r12077 41 41 CONTAINS 42 42 43 SUBROUTINE usrdef_sbc_oce( kt )43 SUBROUTINE usrdef_sbc_oce( kt, Kbb ) 44 44 !!--------------------------------------------------------------------- 45 45 !! *** ROUTINE usr_def_sbc *** … … 56 56 !!---------------------------------------------------------------------- 57 57 INTEGER, INTENT(in) :: kt ! ocean time step 58 INTEGER, INTENT(in) :: Kbb ! ocean time index 58 59 !!--------------------------------------------------------------------- 59 60 ! -
NEMO/branches/2019/UKMO_MERGE_2019/tests/ISOMIP/EXPREF/namelist_cfg
r12068 r12077 150 150 ! ---------------- ice shelf load ------------------------------- 151 151 ! 152 cn_isfload = 'isomip' ! scheme to compute ice shelf load (ln_isfcav = .true. in domain_cfg.nc)153 152 ! 154 153 ! ---------------- ice shelf melt formulation ------------------------------- -
NEMO/branches/2019/UKMO_MERGE_2019/tests/demo_cfgs.txt
r10516 r12077 1 1 CANAL OCE 2 2 ISOMIP OCE 3 ISOMIP+ OCE 3 4 LOCK_EXCHANGE OCE 4 5 OVERFLOW OCE
Note: See TracChangeset
for help on using the changeset viewer.