Changeset 9545
- Timestamp:
- 2018-05-03T18:47:30+02:00 (7 years ago)
- Location:
- branches/2018/dev_r8864_nemo_v3_6_ZTILDE/NEMOGCM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2018/dev_r8864_nemo_v3_6_ZTILDE/NEMOGCM/CONFIG/SHARED/field_def.xml
r9529 r9545 98 98 <field id="gdepwt" long_name="T-cell interface depth" unit="m" grid_ref="grid_T_3D" /> 99 99 <field id="stiff_tilde" long_name="Stiffness" unit=" " grid_ref="grid_T_3D" /> 100 <field id="gdepwu" long_name="U-cell interface depth" unit="m" grid_ref="grid_U_3D" /> 101 <field id="gdepwv" long_name="V-cell interface depth" unit="m" grid_ref="grid_V_3D" /> 100 102 <field id="depw_tilde" long_name="Interface displacement" unit="m" grid_ref="grid_W_3D" /> 101 103 <field id="dz_tilde" long_name="Vertical grid deformation" unit=" " grid_ref="grid_W_3D" /> -
branches/2018/dev_r8864_nemo_v3_6_ZTILDE/NEMOGCM/CONFIG/SHARED/namelist_ref
r9353 r9545 833 833 rn_zdef_max = 0.9e0 ! maximum fractional e3t deformation 834 834 ln_vvl_dbg = .true. ! debug prints (T/F) 835 ln_vvl_ramp = .false. ! linear ramp at startup 836 rn_day_ramp = 3.e0 ! ramp duration [days] 835 837 / 836 838 !----------------------------------------------------------------------- -
branches/2018/dev_r8864_nemo_v3_6_ZTILDE/NEMOGCM/CONFIG/cfg.txt
r9529 r9545 12 12 ORCA2_LIM OPA_SRC LIM_SRC_2 NST_SRC 13 13 ORCA2LIM3_16 OPA_SRC LIM_SRC_3 NST_SRC 14 ORCA2LIM3_LONG OPA_SRC LIM_SRC_3 NST_SRC15 14 RIDGE OPA_SRC 16 15 COMODO_IW OPA_SRC 16 ORCA2LIM3_LONG OPA_SRC LIM_SRC_3 NST_SRC -
branches/2018/dev_r8864_nemo_v3_6_ZTILDE/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
r9529 r9545 158 158 CALL iom_put("tpt_dep", fsdept_n(:,:,:) ) 159 159 IF( iom_use("gdepwt") ) THEN 160 z3d(:,:,1) = (gdepw_n(:,:,1)-sshn(:,:))*tmask(:,:,1) 160 #if defined key_vvl 161 z3d(:,:,1) = (fsdepw(:,:,1)-sshn(:,:))*tmask(:,:,1) 161 162 DO jk=2,jpk 162 z3d(:,:,jk) = (gdepw_n(:,:,jk)-sshn(:,:))*tmask(:,:,jk-1) 163 END DO 163 z3d(:,:,jk) = (fsdepw(:,:,jk)-sshn(:,:))*tmask(:,:,jk-1) 164 END DO 165 #else 166 z3d(:,:,1) = 0._wp 167 DO jk=2,jpk 168 z3d(:,:,jk) = fsdepw(:,:,jk)*tmask(:,:,jk-1) 169 END DO 170 #endif 164 171 CALL iom_put("gdepwt" , z3d(:,:,:) ) 172 END IF 173 174 IF( iom_use("gdepwu") ) THEN 175 z2d(:,:) = 0._wp 176 DO jj = 1, jpjm1 177 DO ji = 1, fs_jpim1 ! vector opt. 178 z2d(ji,jj) = 0.5_wp * umask(ji,jj,1) * r1_e12u(ji,jj) & 179 & * ( e12t(ji,jj) * sshn(ji,jj) + e12t(ji+1,jj) * sshn(ji+1,jj) ) 180 END DO 181 END DO 182 CALL lbc_lnk( z2d(:,:), 'U', 1._wp ) 183 184 z3d(:,:,1)=0._wp 185 DO jk=2,jpk 186 z3d(:,:,jk) = z3d(:,:,jk-1) + fse3u_n(:,:,jk-1) * umask(:,:,jk-1) 187 END DO 188 189 z3d(:,:,1) = (z3d(:,:,1)-z2d(:,:))*umask(:,:,1) 190 DO jk=2,jpk 191 z3d(:,:,jk) = (z3d(:,:,jk)-z2d(:,:))*umask(:,:,jk-1) 192 END DO 193 CALL iom_put("gdepwu" , z3d(:,:,:) ) 194 END IF 195 196 IF( iom_use("gdepwv") ) THEN 197 z2d(:,:) = 0._wp 198 DO jj = 1, jpjm1 199 DO ji = 1, fs_jpim1 ! vector opt. 200 z2d(ji,jj) = 0.5_wp * vmask(ji,jj,1) * r1_e12v(ji,jj) & 201 & * ( e12t(ji,jj) * sshn(ji,jj) + e12t(ji,jj+1) * sshn(ji,jj+1) ) 202 END DO 203 END DO 204 CALL lbc_lnk( z2d(:,:), 'V', 1._wp ) 205 206 z3d(:,:,1)=0._wp 207 DO jk=2,jpk 208 z3d(:,:,jk) = z3d(:,:,jk-1) + fse3v_n(:,:,jk-1) * vmask(:,:,jk-1) 209 END DO 210 211 z3d(:,:,1) = (z3d(:,:,1)-z2d(:,:))*vmask(:,:,1) 212 DO jk=2,jpk 213 z3d(:,:,jk) = (z3d(:,:,jk)-z2d(:,:))*vmask(:,:,jk-1) 214 END DO 215 CALL iom_put("gdepwv" , z3d(:,:,:) ) 165 216 END IF 166 217 -
branches/2018/dev_r8864_nemo_v3_6_ZTILDE/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
r9529 r9545 35 35 USE timing ! Timing 36 36 USE bdy_oce ! ocean open boundary conditions 37 USE sbcrnf ! river runoff 37 38 38 39 IMPLICIT NONE … … 57 58 LOGICAL :: ln_vvl_adv_cn2 =.TRUE. ! FCT thickness advection 58 59 LOGICAL :: ln_vvl_dbg = .FALSE. ! debug control prints 60 LOGICAL :: ln_vvl_ramp = .FALSE. ! Ramp on interfaces displacement 59 61 LOGICAL :: ln_vvl_lap ! Laplacian thickness diffusion 60 62 LOGICAL :: ln_vvl_blp ! Bilaplacian thickness diffusion … … 66 68 REAL(wp) :: rn_rst_e3t ! ztilde to zstar restoration timescale [days] 67 69 REAL(wp) :: rn_lf_cutoff ! cutoff frequency for low-pass filter [days] 70 REAL(wp) :: rn_day_ramp ! Duration of linear ramp [days] 68 71 REAL(wp) :: rn_zdef_max ! maximum fractional e3t deformation 69 72 REAL(wp) :: hsmall=0.01 ! small thickness … … 354 357 IF( PRESENT(kcall) ) THEN 355 358 ! comment line below if tilda coordinate has to be computed at each call 356 IF (kcall == 2 .AND. ln_vvl_ztilde.OR.ln_vvl_layer) ll_do_bclinic = .FALSE.359 IF (kcall == 2 .AND. (ln_vvl_ztilde.OR.ln_vvl_layer) ) ll_do_bclinic = .FALSE. 357 360 IF (kcall == 2) ncall=2 358 361 ENDIF … … 388 391 zhdiv(:,:) = zhdiv(:,:) + fse3t_n(:,:,jk) * hdivn(:,:,jk) 389 392 END DO 390 zhdiv(:,:) = zhdiv(:,:) / ( ht_0(:,:) + sshn(:,:) + 1._wp - tmask_i(:,:) ) 393 zhdiv(:,:) = zhdiv(:,:) / ( ht_0(:,:) + sshn(:,:) + 1._wp - tmask_i(:,:) ) 394 395 ze3t(:,:,:) = 0._wp 396 IF( ln_rnf ) THEN 397 CALL sbc_rnf_div( ze3t ) ! runoffs 398 DO jk=1,jpkm1 399 tilde_e3t_a(:,:,jk) = tilde_e3t_a(:,:,jk) - ze3t(:,:,jk) * fse3t_n(:,:,jk) 400 END DO 401 ENDIF 391 402 392 403 ! Thickness advection: … … 394 405 ! Set advection velocities and source term 395 406 IF ( ln_vvl_ztilde ) THEN 407 IF ( ncall==1 ) THEN 408 zalpha = rdt * 2.0_wp * rpi / ( MAX( rn_lf_cutoff, rsmall ) * 86400.0_wp ) 409 DO jk = 1, jpkm1 410 ztu(:,:,jk) = un(:,:,jk) * fse3u_n(:,:,jk) * e2u(:,:) 411 ztv(:,:,jk) = vn(:,:,jk) * fse3v_n(:,:,jk) * e1v(:,:) 412 ze3t(:,:,jk) = -tilde_e3t_a(:,:,jk) - fse3t_n(:,:,jk) * zhdiv(:,:) 413 END DO 414 ! 415 un_lf(:,:,:) = un_lf(:,:,:) * (1._wp - zalpha) + zalpha * ztu(:,:,:) 416 vn_lf(:,:,:) = vn_lf(:,:,:) * (1._wp - zalpha) + zalpha * ztv(:,:,:) 417 hdivn_lf(:,:,:) = hdivn_lf(:,:,:) * (1._wp - zalpha) + zalpha * ze3t(:,:,:) 418 ! un_lf(:,:,:) = un_lf(:,:,:) * (1._wp - zalpha) + zalpha * un_lf2(:,:,:) 419 ! vn_lf(:,:,:) = vn_lf(:,:,:) * (1._wp - zalpha) + zalpha * vn_lf2(:,:,:) 420 ! hdivn_lf(:,:,:) = hdivn_lf(:,:,:) * (1._wp - zalpha) + zalpha * hdivn_lf2(:,:,:) 421 ENDIF 396 422 ! 397 423 DO jk = 1, jpkm1 … … 561 587 ! ~~~~~~~~~~~~~~~~~~~~~~ 562 588 zramp = 1._wp 563 ! IF (.NOT.ln_rstart) zramp = MIN(MAX( ((kt-nit000)*rdt)/(3._wp*rday),0._wp),1._wp)589 IF ((.NOT.ln_rstart).AND.ln_vvl_ramp) zramp = MIN(MAX( ((kt-nit000)*rdt)/(rn_day_ramp*rday),0._wp),1._wp) 564 590 565 591 DO jk=1,jpkm1 … … 626 652 ENDIF 627 653 628 IF( ln_vvl_ztilde ) THEN629 IF ( ncall==1 ) THEN630 zalpha = rdt * 2.0_wp * rpi / ( MAX( rn_lf_cutoff, rsmall ) * 86400.0_wp )631 DO jk = 1, jpkm1632 ztu(:,:,jk) = un(:,:,jk) * fse3u_n(:,:,jk) * e2u(:,:) + un_td(:,:,jk)633 ztv(:,:,jk) = vn(:,:,jk) * fse3v_n(:,:,jk) * e1v(:,:) + vn_td(:,:,jk)634 ze3t(:,:,jk) = -fse3t_n(:,:,jk) * zhdiv(:,:)635 END DO636 !637 un_lf(:,:,:) = un_lf(:,:,:) * (1._wp - zalpha) + zalpha * ztu(:,:,:)638 vn_lf(:,:,:) = vn_lf(:,:,:) * (1._wp - zalpha) + zalpha * ztv(:,:,:)639 hdivn_lf(:,:,:) = hdivn_lf(:,:,:) * (1._wp - zalpha) + zalpha * ze3t(:,:,:)640 ! un_lf(:,:,:) = un_lf(:,:,:) * (1._wp - zalpha) + zalpha * un_lf2(:,:,:)641 ! vn_lf(:,:,:) = vn_lf(:,:,:) * (1._wp - zalpha) + zalpha * vn_lf2(:,:,:)642 ! hdivn_lf(:,:,:) = hdivn_lf(:,:,:) * (1._wp - zalpha) + zalpha * hdivn_lf2(:,:,:)643 ENDIF644 ENDIF654 ! IF( ln_vvl_ztilde ) THEN 655 ! IF ( ncall==1 ) THEN 656 ! zalpha = rdt * 2.0_wp * rpi / ( MAX( rn_lf_cutoff, rsmall ) * 86400.0_wp ) 657 ! DO jk = 1, jpkm1 658 ! ztu(:,:,jk) = un(:,:,jk) * fse3u_n(:,:,jk) * e2u(:,:) + un_td(:,:,jk) 659 ! ztv(:,:,jk) = vn(:,:,jk) * fse3v_n(:,:,jk) * e1v(:,:) + vn_td(:,:,jk) 660 ! ze3t(:,:,jk) = -fse3t_n(:,:,jk) * zhdiv(:,:) 661 ! END DO 662 ! ! 663 ! un_lf(:,:,:) = un_lf(:,:,:) * (1._wp - zalpha) + zalpha * ztu(:,:,:) 664 ! vn_lf(:,:,:) = vn_lf(:,:,:) * (1._wp - zalpha) + zalpha * ztv(:,:,:) 665 ! hdivn_lf(:,:,:) = hdivn_lf(:,:,:) * (1._wp - zalpha) + zalpha * ze3t(:,:,:) 666 !! un_lf(:,:,:) = un_lf(:,:,:) * (1._wp - zalpha) + zalpha * un_lf2(:,:,:) 667 !! vn_lf(:,:,:) = vn_lf(:,:,:) * (1._wp - zalpha) + zalpha * vn_lf2(:,:,:) 668 !! hdivn_lf(:,:,:) = hdivn_lf(:,:,:) * (1._wp - zalpha) + zalpha * hdivn_lf2(:,:,:) 669 ! ENDIF 670 ! ENDIF 645 671 646 672 IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN ! z_tilde or layer coordinate ! … … 675 701 676 702 677 IF( ln_vvl_dbg .AND. ( ncall==2) ) THEN ! - ML - test: control prints for debuging703 IF( (ln_vvl_dbg .AND. ( ncall==2 )).AND.(ln_vvl_ztilde .OR. ln_vvl_layer) ) THEN ! - ML - test: control prints for debuging 678 704 ! 679 705 zht(:,:) = 0.0_wp … … 1131 1157 INTEGER :: jkbot ! bottom level 1132 1158 LOGICAL :: l_is_orca ! local logical 1133 REAL(wp) :: zmin, zdo, zup, ztap , zsmall1159 REAL(wp) :: zmin, zdo, zup, ztap 1134 1160 REAL(wp), POINTER, DIMENSION(:,:) :: zs ! Surface interface depth anomaly 1135 1161 REAL(wp), POINTER, DIMENSION(:,:,:) :: zw ! Interface depth anomaly … … 1141 1167 1142 1168 1169 nmet=1 1143 1170 ! nmet=0 ! Original method (Surely wrong) 1144 ! nmet= 1 ! Interface interpolation 1145 nmet=1 ! Internal interfaces interpolation only, spread barotropic increment 1146 1147 ztap = 0._wp ! Minimum fraction of T-point thickness at cell interfaces 1148 zsmall = 1e-3_wp 1171 ! nmet=1 ! Interface interpolation 1172 ! nmet=2 ! Internal interfaces interpolation only, spread barotropic increment 1173 ztap = 0.1_wp ! Minimum fraction of T-point thickness at cell interfaces 1149 1174 1150 1175 IF ( (nmet==1).OR.(nmet==2) ) THEN … … 1158 1183 zw(:,:,:) = 0._wp 1159 1184 ! 1160 !DO jj = 1, jpj1161 !DO ji = 1, jpi1162 !jkbot = mbkt(ji,jj)1163 !DO jk=jkbot,1,-11164 !zw(ji,jj,jk) = zw(ji,jj,jk+1) - pe3_in(ji,jj,jk) + e3t_0(ji,jj,jk)1165 !END DO1166 !END DO1167 !END DO1185 DO jj = 1, jpj 1186 DO ji = 1, jpi 1187 jkbot = mbkt(ji,jj) 1188 DO jk=jkbot,1,-1 1189 zw(ji,jj,jk) = zw(ji,jj,jk+1) - pe3_in(ji,jj,jk) + e3t_0(ji,jj,jk) 1190 END DO 1191 END DO 1192 END DO 1168 1193 ! 1169 DO jk=2,jpk1170 zw(:,:,jk) = zw(:,:,jk-1) + pe3_in(:,:,jk-1)*tmask(:,:,jk-1)1171 END DO1172 ! Interface depth anomalies:1173 DO jk=1,jpkm11174 zw(:,:,jk) = zw(:,:,jk) - zw(:,:,jpk) + ht_0(:,:)1175 END DO1176 zw(:,:,jpk) = ht_0(:,:)1177 1194 ! 1178 1195 IF (nmet==2) THEN ! Consider "internal" interfaces only 1179 1196 zs(:,:) = - zw(:,:,1) ! Save surface anomaly (ssh) 1180 1197 ! 1198 zw(:,:,:) = 0._wp 1181 1199 DO jj = 1, jpj 1182 1200 DO ji = 1, jpi 1183 DO jk=1,jpk 1184 zw(ji,jj,jk) = (zw(ji,jj,jk) + zs(ji,jj)) & 1201 jkbot = mbkt(ji,jj) 1202 DO jk=jkbot,1,-1 1203 zw(ji,jj,jk) = zw(ji,jj,jk+1) - ( pe3_in(ji,jj,jk) & 1185 1204 & * ht_0(ji,jj) / (ht_0(ji,jj) + zs(ji,jj) + 1._wp - tmask(ji,jj,1)) & 1186 & * tmask(ji,jj,jk)1205 & - e3t_0(ji,jj,jk)) * tmask(ji,jj,jk) 1187 1206 END DO 1188 1207 END DO … … 1217 1236 ! Correction at last level: 1218 1237 jkbot = mbku(ji,jj) 1219 zdo = hu_0(ji,jj) 1220 DO jk=jkbot,1,-1 1221 zup = 0.5_wp * umask(ji,jj,jk) * r1_e12u(ji,jj) & 1222 & * ( e12t(ji ,jj) * zw(ji ,jj,jk) & 1223 & + e12t(ji+1,jj) * zw(ji+1,jj,jk) ) 1224 ! 1225 ! If there is a step, taper bottom interface: 1226 IF ((hu_0(ji,jj) < 0.5_wp * ( ht_0(ji,jj) + ht_0(ji+1,jj) ) ).AND.(zup>zdo)) THEN 1227 IF ( ht_0(ji+1,jj) < ht_0(ji,jj) ) THEN 1228 ! zmin = ztap * pe3_in(ji+1,jj,jk) 1229 zmin = ztap * (zw(ji+1,jj,jk+1)-zw(ji+1,jj,jk)) 1230 ELSE 1231 ! zmin = ztap * pe3_in(ji ,jj,jk) 1232 zmin = ztap * (zw(ji ,jj,jk+1)-zw(ji ,jj,jk)) 1233 ENDIF 1234 zup = MIN(zup, zdo-zmin) 1238 pe3_out(ji,jj,jkbot) = -0.5_wp * umask(ji,jj,jkbot) * r1_e12u(ji,jj) & 1239 & * ( e12t(ji ,jj) * zw(ji ,jj,jkbot) & 1240 & + e12t(ji+1,jj) * zw(ji+1,jj,jkbot) ) 1241 ! 1242 ! If there is a step, taper bottom interface: 1243 IF (hu_0(ji,jj) < 0.5_wp * ( ht_0(ji,jj) + ht_0(ji+1,jj) ) ) THEN 1244 IF ( ht_0(ji+1,jj) < ht_0(ji,jj) ) THEN 1245 ! zmin = ztap * pe3_in(ji+1,jj,jkbot) 1246 zmin = ztap * (-zw(ji+1,jj,jkbot)+e3t_0(ji+1,jj,jkbot)) 1247 ELSE 1248 ! zmin = ztap * pe3_in(ji ,jj,jkbot) 1249 zmin = ztap * (-zw(ji,jj,jkbot)+e3t_0(ji,jj,jkbot)) 1235 1250 ENDIF 1236 zup = MIN(zup, zdo-zsmall) 1237 pe3_out(ji,jj,jk) = zdo - zup - e3u_0(ji,jj,jk) 1238 zdo = zup 1251 zmin = -e3u_0(ji,jj,jkbot) + zmin 1252 pe3_out(ji,jj,jkbot) = MAX(pe3_out(ji,jj,jkbot), zmin) 1253 ENDIF 1254 ! 1255 zdo = -pe3_out(ji,jj,jkbot) 1256 DO jk=jkbot-1,1,-1 1257 zup = 0.5_wp * umask(ji,jj,jk) * r1_e12u(ji ,jj) & 1258 & *( e12t(ji ,jj) * zw(ji ,jj,jk) & 1259 & +e12t(ji+1,jj) * zw(ji+1,jj,jk) ) 1260 pe3_out(ji,jj,jk) = zdo - zup 1261 zdo = zdo - pe3_out(ji,jj,jk) 1239 1262 END DO 1240 1263 END DO … … 1286 1309 ! Correction at last level: 1287 1310 jkbot = mbkv(ji,jj) 1288 zdo = hv_0(ji,jj) 1289 DO jk=jkbot,1,-1 1290 zup = 0.5_wp * vmask(ji,jj,jk) * r1_e12v(ji,jj) & 1291 & * ( e12t(ji,jj ) * zw(ji,jj ,jk) & 1292 & + e12t(ji,jj+1) * zw(ji,jj+1,jk) ) 1311 pe3_out(ji,jj,jkbot) = -0.5_wp * vmask(ji,jj,jkbot) * r1_e12v(ji,jj) & 1312 & * ( e12t(ji,jj ) * zw(ji,jj ,jkbot) & 1313 & + e12t(ji,jj+1) * zw(ji,jj+1,jkbot) ) 1314 ! 1315 ! If there is a step, taper bottom interface: 1316 IF (hv_0(ji,jj) < 0.5_wp * ( ht_0(ji,jj) + ht_0(ji,jj+1) ) ) THEN 1317 IF ( ht_0(ji,jj+1) < ht_0(ji,jj) ) THEN 1318 ! zmin = ztap * pe3_in(ji,jj+1,jkbot) 1319 zmin = ztap * (-zw(ji,jj+1,jkbot)+e3t_0(ji,jj+1,jkbot)) 1320 ELSE 1321 ! zmin = ztap * pe3_in(ji,jj ,jkbot) 1322 zmin = ztap * (-zw(ji,jj,jkbot)+e3t_0(ji,jj,jkbot)) 1323 ENDIF 1324 zmin = -e3v_0(ji,jj,jkbot) + zmin 1325 pe3_out(ji,jj,jkbot) = MAX(pe3_out(ji,jj,jkbot), zmin) 1326 ENDIF 1327 ! 1328 zdo = -pe3_out(ji,jj,jkbot) 1329 DO jk=jkbot-1,1,-1 1330 zup = 0.5_wp * vmask(ji,jj,jk) * r1_e12v(ji,jj ) & 1331 & * ( e12t(ji,jj ) * zw(ji,jj ,jk) & 1332 & +e12t(ji,jj+1) * zw(ji,jj+1,jk) ) 1293 1333 ! 1294 ! If there is a step, taper bottom interface: 1295 IF ((hv_0(ji,jj) < 0.5_wp * ( ht_0(ji,jj) + ht_0(ji,jj+1) ) ).AND.(zup>zdo)) THEN 1296 IF ( ht_0(ji,jj+1) < ht_0(ji,jj) ) THEN 1297 ! zmin = ztap * pe3_in(ji,jj+1,jk) 1298 zmin = ztap * (zw(ji,jj+1,jk+1)-zw(ji,jj+1,jk)) 1299 ELSE 1300 ! zmin = ztap * pe3_in(ji ,jj,jk) 1301 zmin = ztap * (zw(ji,jj ,jk+1)-zw(ji,jj ,jk)) 1302 ENDIF 1303 zup = MIN(zup, zdo-zmin) 1304 ENDIF 1305 zup = MIN(zup, zdo-zsmall) 1306 pe3_out(ji,jj,jk) = zdo - zup - e3v_0(ji,jj,jk) 1307 zdo = zup 1334 pe3_out(ji,jj,jk) = zdo - zup 1335 zdo = zdo - pe3_out(ji,jj,jk) 1308 1336 END DO 1309 1337 END DO … … 1358 1386 ! bottom correction: 1359 1387 jkbot = MIN(mbku(ji,jj), mbku(ji,jj+1)) 1360 zdo = hf_0(ji,jj) 1361 DO jk=jkbot,1,-1 1388 pe3_out(ji,jj,jkbot) = -0.25_wp * umask(ji,jj,jkbot) * umask(ji,jj+1,jkbot) * r1_e12f(ji,jj) & 1389 & * ( e12t(ji ,jj ) * zw(ji ,jj ,jkbot) & 1390 & + e12t(ji+1,jj ) * zw(ji+1,jj ,jkbot) & 1391 & + e12t(ji ,jj+1) * zw(ji ,jj+1,jkbot) & 1392 & + e12t(ji+1,jj+1) * zw(ji+1,jj+1,jkbot) ) 1393 ! 1394 ! If there is a step, taper bottom interface: 1395 IF (hf_0(ji,jj) < 0.5_wp * ( hu_0(ji,jj ) + hu_0(ji,jj+1) ) ) THEN 1396 IF ( hu_0(ji,jj+1) < hu_0(ji,jj) ) THEN 1397 IF ( ht_0(ji+1,jj+1) < ht_0(ji ,jj+1) ) THEN 1398 ! zmin = ztap * pe3_in(ji+1,jj+1,jkbot) 1399 zmin = ztap * (-zw(ji+1,jj+1,jkbot)+e3t_0(ji+1,jj+1,jkbot)) 1400 ELSE 1401 ! zmin = ztap * pe3_in(ji ,jj+1,jkbot) 1402 zmin = ztap * (-zw(ji,jj+1,jkbot)+e3t_0(ji,jj+1,jkbot)) 1403 ENDIF 1404 ELSE 1405 IF ( ht_0(ji+1,jj ) < ht_0(ji ,jj ) ) THEN 1406 ! zmin = ztap * pe3_in(ji+1,jj ,jkbot) 1407 zmin = ztap * (-zw(ji+1,jj,jkbot)+e3t_0(ji+1,jj,jkbot)) 1408 ELSE 1409 ! zmin = ztap * pe3_in(ji ,jj ,jkbot) 1410 zmin = ztap * (-zw(ji,jj,jkbot)+e3t_0(ji,jj,jkbot)) 1411 ENDIF 1412 ENDIF 1413 zmin = -e3f_0(ji,jj,jkbot) + zmin 1414 pe3_out(ji,jj,jkbot) = MAX(pe3_out(ji,jj,jkbot), zmin) 1415 ENDIF 1416 ! 1417 zdo = -pe3_out(ji,jj,jkbot) 1418 DO jk=jkbot-1,1,-1 1362 1419 zup = 0.25_wp * umask(ji,jj,jk) * umask(ji,jj+1,jk) * r1_e12f(ji,jj) & 1363 1420 & * ( e12t(ji ,jj ) * zw(ji ,jj ,jk) & … … 1365 1422 & + e12t(ji ,jj+1) * zw(ji ,jj+1,jk) & 1366 1423 & + e12t(ji+1,jj+1) * zw(ji+1,jj+1,jk) ) 1424 pe3_out(ji,jj,jk) = zdo - zup 1367 1425 ! 1368 ! If there is a step, taper bottom interface: 1369 IF ((hf_0(ji,jj) < 0.5_wp * ( hu_0(ji,jj ) + hu_0(ji,jj+1) ) ).AND.(zup>zdo)) THEN 1370 IF ( hu_0(ji,jj+1) < hu_0(ji,jj) ) THEN 1371 IF ( ht_0(ji+1,jj+1) < ht_0(ji ,jj+1) ) THEN 1372 ! zmin = ztap * pe3_in(ji+1,jj+1,jk) 1373 zmin = ztap * (zw(ji+1,jj+1,jk+1)-zw(ji+1,jj+1,jk)) 1374 ELSE 1375 ! zmin = ztap * pe3_in(ji ,jj+1,jk) 1376 zmin = ztap * (zw(ji ,jj+1,jk+1)-zw(ji ,jj+1,jk)) 1377 ENDIF 1378 ELSE 1379 IF ( ht_0(ji+1,jj ) < ht_0(ji ,jj ) ) THEN 1380 ! zmin = ztap * pe3_in(ji+1,jj ,jk) 1381 zmin = ztap * (zw(ji+1,jj ,jk+1)-zw(ji+1,jj ,jk)) 1382 ELSE 1383 ! zmin = ztap * pe3_in(ji ,jj ,jk) 1384 zmin = ztap * (zw(ji ,jj ,jk+1)-zw(ji ,jj ,jk)) 1385 ENDIF 1386 ENDIF 1387 zup = MIN(zup, zdo-zmin) 1388 ENDIF 1389 zup = MIN(zup, zdo-zsmall) 1390 ! 1391 pe3_out(ji,jj,jk) = zdo - zup - e3f_0(ji,jj,jk) 1392 zdo = zup 1426 zdo = zdo - pe3_out(ji,jj,jk) 1393 1427 END DO 1394 END DO 1395 END DO 1428 ! 1429 END DO 1430 END DO 1396 1431 ENDIF 1397 1432 ! … … 1456 1491 1457 1492 END SUBROUTINE dom_vvl_interpol 1493 1458 1494 1459 1495 SUBROUTINE dom_vvl_rst( kt, cdrw ) … … 1626 1662 & rn_rst_e3t , rn_lf_cutoff , & 1627 1663 & ln_vvl_regrid , rn_zdef_max , & 1664 & ln_vvl_ramp , rn_day_ramp , & 1628 1665 & ln_vvl_dbg ! not yet implemented: ln_vvl_kepe 1629 1666 !!---------------------------------------------------------------------- … … 1660 1697 WRITE(numout,*) ' Bilaplacian coefficient rn_ahe3_blp = ', rn_ahe3_blp 1661 1698 WRITE(numout,*) ' Namelist nam_vvl : layers regriding' 1662 WRITE(numout,*) ' ln_vvl_regrid = ', ln_vvl_regrid 1699 WRITE(numout,*) ' ln_vvl_regrid = ', ln_vvl_regrid 1700 WRITE(numout,*) ' Namelist nam_vvl : linear ramp at startup' 1701 WRITE(numout,*) ' ln_vvl_ramp = ', ln_vvl_ramp 1702 WRITE(numout,*) ' rn_day_ramp = ', rn_day_ramp 1663 1703 WRITE(numout,*) ' Namelist nam_vvl : maximum e3t deformation fractional change' 1664 1704 WRITE(numout,*) ' rn_zdef_max = ', rn_zdef_max … … 2401 2441 dzmin_int = 0.1_wp ! Absolute minimum depth in the interior (in meters) 2402 2442 dzmin_surf = 1.0_wp ! Absolute minimum depth at the surface (in meters) 2403 zfrch_stp = 0. 1_wp ! Maximum fractionnal thickness change in one time step (<= 1.)2443 zfrch_stp = 0.5_wp ! Maximum fractionnal thickness change in one time step (<= 1.) 2404 2444 zfrch_rel = 0.4_wp ! Maximum relative thickness change in the vertical (<= 1.) 2405 2445 zfrac_bot = 0.05_wp ! Fraction of bottom level allowed to change … … 2621 2661 ! 2622 2662 zh_0 = e3t_0(ji,jj,jk) 2623 zh_bef = tilde_e3t_b(ji,jj,jk) + zh_02663 zh_bef = MIN(tilde_e3t_b(ji,jj,jk) + zh_0, tilde_e3t_b(ji,jj,jk-1) + e3t_0(ji,jj,jk-1)) 2624 2664 zh_old = zwdw(ji,jj,jk+1) - zwdw(ji,jj,jk) 2625 zh_dwn = tilde_e3t_a(ji,jj,jk-1) + e3t_0(ji,jj,jk-1)2626 2665 zh_min = MIN(zh_0/3._wp, dzmin_int) 2627 2666 ! … … 2639 2678 ! 2640 2679 ! Ensure minimum layer thickness: 2641 ! zh_new = MAX(zh_new, zh_dwn * zfrch_rel / (2._wp-zfrch_rel) ) 2642 zh_new = MAX((1._wp-zfrch_stp)*zh_bef, zh_new) 2680 ! zh_new = MAX((1._wp-zfrch_stp)*zh_bef, zh_new) 2643 2681 zh_new = cush(zh_new, zh_min) 2644 2682 ! … … 2647 2685 ! 2648 2686 ! Limit thickness change in 1 time step: 2649 ! zh_new = MIN( ABS(zh_new-zh_bef), (1._wp-zfrch_stp)*zh_bef ) 2650 ! zdiff = SIGN(ztmp, zh_new - zh_old) 2651 ! zh_new = zdiff + zh_old 2652 ! 2653 ! tilde_e3t_a(ji,jj,jk ) = (zh_new - e3t_0(ji,jj,jk)) * tmask(ji,jj,jk) 2654 zwdw(ji,jj,jk) = zwdw(ji,jj,jk+1) - zh_new 2655 ! tilde_e3t_a(ji,jj,jk-1) = (-zdiff + tilde_e3t_a(ji,jj,jk-1) ) * tmask(ji,jj,jk-1) 2687 ztmp = MIN( ABS(zdiff), zfrch_stp*zh_bef ) 2688 zdiff = SIGN(ztmp, zh_new - zh_old) 2689 zh_new = zdiff + zh_old 2690 ! 2691 zwdw(ji,jj,jk) = zwdw(ji,jj,jk+1) - zh_new 2656 2692 END DO 2657 2693 END DO … … 2668 2704 ! 2669 2705 zh_0 = e3t_0(ji,jj,jk) 2670 zh_bef = tilde_e3t_b(ji,jj,jk) + zh_02706 zh_bef = MIN(tilde_e3t_b(ji,jj,jk) + zh_0, tilde_e3t_b(ji,jj,jk+1) + e3t_0(ji,jj,jk+1)) 2671 2707 zh_old = zwdw(ji,jj,jk+1) - zwdw(ji,jj,jk) 2672 zh_up = tilde_e3t_a(ji,jj,jk+1) + e3t_0(ji,jj,jk+1)2673 2708 zh_min = MIN(zh_0/3._wp, dzmin_int) 2674 2709 ! … … 2679 2714 ! 2680 2715 ! Ensure minimum layer thickness: 2681 ! zh_new=MAX(zh_new, zh_up * zfrch_rel / (2._wp-zfrch_rel) ) 2682 zh_new = MAX((1._wp-zfrch_stp)*zh_bef, zh_new) 2716 ! zh_new = MAX((1._wp-zfrch_stp)*zh_bef, zh_new) 2683 2717 zh_new = cush(zh_new, zh_min) 2684 2718 ! … … 2687 2721 ! 2688 2722 ! Limit flux: 2689 ! ztmp = MIN( ABS(zdiff), zfrch_stp*zh_bef ) 2690 ! zdiff = SIGN(ztmp, zdiff) 2691 ! zh_new = zdiff + zh_old 2692 ! 2693 ! tilde_e3t_a(ji,jj,jk ) = (zh_new - e3t_0(ji,jj,jk)) * tmask(ji,jj,jk) 2694 zwdw(ji,jj,jk+1) = zwdw(ji,jj,jk) + zh_new 2695 ! tilde_e3t_a(ji,jj,jk+1) = (-zdiff + tilde_e3t_a(ji,jj,jk+1) ) * tmask(ji,jj,jk+1) 2723 ztmp = MIN( ABS(zdiff), zfrch_stp*zh_bef ) 2724 zdiff = SIGN(ztmp, zh_new - zh_old) 2725 zh_new = zdiff + zh_old 2726 ! 2727 zwdw(ji,jj,jk+1) = zwdw(ji,jj,jk) + zh_new 2696 2728 END DO 2697 2729 !
Note: See TracChangeset
for help on using the changeset viewer.