Changeset 13859
- Timestamp:
- 2020-11-24T10:45:13+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser_4.0/src/OCE/ZDF/zdfosm.F90
r13858 r13859 1049 1049 END DO 1050 1050 1051 DO jj = 2, jpjm1 1052 DO ji = 2, jpim1 1053 IF ( lpyc(ji,jj) ) THEN 1054 zd_cubic = ( 0.948 - 2.13 * zdh(ji,jj) / zhml(ji,jj) ) * zustar(ji,jj)**2 1055 zc_cubic = -0.474 * zustar(ji,jj)**2 - zd_cubic 1056 DO jk = imld(ji,jj), ibld(ji,jj) 1057 zznd_pyc = -( gdepw_n(ji,jj,jk) - zhbl(ji,jj) ) / zdh(ji,jj) 1058 ghamu(ji,jj,jk) = ghamu(ji,jj,jk) + 0.3 * ( zc_cubic * zznd_pyc**2 + zd_cubic * zznd_pyc**3 ) 1059 END DO 1060 zc_cubic= 0.2 * ff_t(ji,jj) * zustke(ji,jj) * zhml(ji,jj) 1061 zd_cubic = -0.1 * ff_t(ji,jj) * zustke(ji,jj) * zhml(ji,jj) 1062 DO jk = imld(ji,jj), ibld(ji,jj) 1063 zznd_pyc = -( gdepw_n(ji,jj,jk)-zhbl(ji,jj) ) / zdh(ji,jj) 1064 ghamv(ji,jj,jk) = ghamv(ji,jj,jk) + 0.3 * ( zc_cubic * zznd_pyc**2 + zd_cubic * zznd_pyc**3 ) 1065 END DO 1066 ENDIF 1067 END DO 1068 END DO 1069 1070 1051 1071 IF(ln_dia_osm) THEN 1052 1072 IF ( iom_use("ghamu_f") ) CALL iom_put( "ghamu_f", wmask*ghamu ) … … 1067 1087 IF ( .not. lconv(ji,jj) ) THEN 1068 1088 DO jk = 2, ibld(ji,jj) 1069 znd = ( gdepw_n(ji,jj,jk) - zhbl(ji,jj) ) / zhbl(ji,jj) !ALMG to think about1089 znd = -( gdepw_n(ji,jj,jk) - zhbl(ji,jj) ) / zhbl(ji,jj) !ALMG to think about 1070 1090 IF ( znd >= 0.0 ) THEN 1071 1091 ghamu(ji,jj,jk) = ghamu(ji,jj,jk) * ( 1.0 - EXP( -10.0 * znd**2 ) ) … … 1448 1468 zb_cubic = -1.75 * zvispyc_s_sc(ji,jj) / zvispyc_n_sc(ji,jj) 1449 1469 zd_cubic = ( 0.5 * zvisml_sc(ji,jj) * zdh(ji,jj) / zhml(ji,jj) - 0.85 * zvispyc_s_sc(ji,jj) ) / MAX(zvispyc_n_sc(ji,jj), 1.e-8) 1450 zd_cubic = zd_cubic - zb_cubic - 2.0 * ( 1.0 - za_cubic - z d_cubic )1470 zd_cubic = zd_cubic - zb_cubic - 2.0 * ( 1.0 - za_cubic - zb_cubic ) 1451 1471 zc_cubic = 1.0 - za_cubic - zb_cubic - zd_cubic 1452 1472 DO jk = imld(ji,jj) , ibld(ji,jj) … … 2305 2325 IF ( lshear(ji,jj) ) THEN 2306 2326 IF ( lconv(ji,jj) ) THEN 2307 IF ( j_ddh(ji,jj) == 0 ) THEN 2327 IF( ln_osm_mle ) THEN 2328 IF ( ( zwb_ent(ji,jj) + 2.0 * zwb_fk_b(ji,jj) ) < 0._wp ) THEN 2329 IF ( j_ddh(ji,jj) == 0 ) THEN 2308 2330 ! ddhdt for pycnocline determined in osm_calculate_dhdt 2309 dh(ji,jj) = dh(ji,jj) + zddhdt(ji,jj) * rn_rdt2310 ELSE2331 dh(ji,jj) = dh(ji,jj) + zddhdt(ji,jj) * rn_rdt 2332 ELSE 2311 2333 ! Temporary (probably) Recalculate dh_ref to ensure dh doesn't go negative. Can't do this using zddhdt from calculate_dhdt 2312 IF ( ( zwstrc(ji,jj) / zvstr(ji,jj) )**3 <= 0.5 ) THEN 2313 zari = MIN( 1.5 * zdb_bl(ji,jj) / ( zhbl(ji,jj) * ( MAX(zdbdz_bl_ext(ji,jj),0._wp) + zdb_bl(ji,jj)**2 / MAX(4.5 * zvstr(ji,jj)**2 , 1.e-12 )) ), 0.2d0 ) 2334 IF ( ( zwstrc(ji,jj) / zvstr(ji,jj) )**3 <= 0.5 ) THEN 2335 zari = MIN( 1.5 * zdb_bl(ji,jj) / ( zhbl(ji,jj) * ( MAX(zdbdz_bl_ext(ji,jj),0._wp) + zdb_bl(ji,jj)**2 / MAX(4.5 * zvstr(ji,jj)**2 , 1.e-12 )) ), 0.2d0 ) 2336 ELSE 2337 zari = MIN( 1.5 * zdb_bl(ji,jj) / ( zhbl(ji,jj) * ( MAX(zdbdz_bl_ext(ji,jj),0._wp) + zdb_bl(ji,jj)**2 / MAX(4.5 * zwstrc(ji,jj)**2 , 1.e-12 )) ), 0.2d0 ) 2338 ENDIF 2339 ztau = MAX( zdb_bl(ji,jj) * ( zari * hbl(ji,jj) ) / ( a_ddh_2 * MAX(-zwb_ent(ji,jj), 1.e-12) ), 2.0 * rn_rdt ) 2340 dh(ji,jj) = dh(ji,jj) * EXP( -rn_rdt / ztau ) + zari * zhbl(ji,jj) * ( 1.0 - EXP( -rn_rdt / ztau ) ) 2341 ! IF ( zdhdt(ji,jj) < 0._wp .and. dh(ji,jj) >= hbl(ji,jj) ) dh(ji,jj) = zari * zhbl(ji,jj)! 2342 ENDIF ! j_ddh 2343 IF ( dh(ji,jj) >= hbl(ji,jj) ) dh(ji,jj) = zari * zhbl(ji,jj) 2344 ELSE ! dhdt inc FK <0 2345 ztau = 0.2 * hbl(ji,jj) / MAX(epsln, (zvstr(ji,jj)**3 + 0.5 *zwstrc(ji,jj)**3)**pthird) 2346 dh(ji,jj) = dh(ji,jj) * EXP( -rn_rdt / ztau ) + 0.2 * zhbl(ji,jj) * ( 1.0 - EXP( -rn_rdt / ztau ) ) 2347 ! IF ( zdhdt(ji,jj) < 0._wp .and. dh(ji,jj) >= hbl(ji,jj) ) dh(ji,jj) = zari * zhbl(ji,jj)! 2348 IF ( dh(ji,jj) >= hbl(ji,jj) ) dh(ji,jj) = 0.2 * zhbl(ji,jj) 2349 ENDIF ! dhdt<0 2350 ELSE ! ln_osm_mle 2351 IF ( j_ddh(ji,jj) == 0 ) THEN 2352 ! ddhdt for pycnocline determined in osm_calculate_dhdt 2353 dh(ji,jj) = dh(ji,jj) + zddhdt(ji,jj) * rn_rdt 2314 2354 ELSE 2315 zari = MIN( 1.5 * zdb_bl(ji,jj) / ( zhbl(ji,jj) * ( MAX(zdbdz_bl_ext(ji,jj),0._wp) + zdb_bl(ji,jj)**2 / MAX(4.5 * zwstrc(ji,jj)**2 , 1.e-12 )) ), 0.2d0 ) 2355 ! Temporary (probably) Recalculate dh_ref to ensure dh doesn't go negative. Can't do this using zddhdt from calculate_dhdt 2356 IF ( ( zwstrc(ji,jj) / zvstr(ji,jj) )**3 <= 0.5 ) THEN 2357 zari = MIN( 1.5 * zdb_bl(ji,jj) / ( zhbl(ji,jj) * ( MAX(zdbdz_bl_ext(ji,jj),0._wp) + zdb_bl(ji,jj)**2 / MAX(4.5 * zvstr(ji,jj)**2 , 1.e-12 )) ), 0.2d0 ) 2358 ELSE 2359 zari = MIN( 1.5 * zdb_bl(ji,jj) / ( zhbl(ji,jj) * ( MAX(zdbdz_bl_ext(ji,jj),0._wp) + zdb_bl(ji,jj)**2 / MAX(4.5 * zwstrc(ji,jj)**2 , 1.e-12 )) ), 0.2d0 ) 2360 ENDIF 2361 ztau = MAX( zdb_bl(ji,jj) * ( zari * hbl(ji,jj) ) / ( a_ddh_2 * MAX(-zwb_ent(ji,jj), 1.e-12) ), 2.0 * rn_rdt ) 2362 dh(ji,jj) = dh(ji,jj) * EXP( -rn_rdt / ztau ) + zari * zhbl(ji,jj) * ( 1.0 - EXP( -rn_rdt / ztau ) ) 2316 2363 ENDIF 2317 ztau = MAX( zdb_bl(ji,jj) * ( zari * hbl(ji,jj) ) / ( a_ddh_2 * MAX(-zwb_ent(ji,jj), 1.e-12) ), 2.0 * rn_rdt )2318 dh(ji,jj) = dh(ji,jj) * EXP( -rn_rdt / ztau ) + zari * zhbl(ji,jj) * ( 1.0 - EXP( -rn_rdt / ztau ) )2319 2364 IF ( dh(ji,jj) >= hbl(ji,jj) ) dh(ji,jj) = zari * zhbl(ji,jj) 2320 ENDIF 2321 2365 ENDIF ! ln_osm_mle 2322 2366 ELSE ! lconv 2323 2367 ! Initially shear only for entraining OSBL. Stable code will be needed if extended to stable OSBL … … 2415 2459 2416 2460 END SUBROUTINE zdf_osm_pycnocline_thickness 2417 2461 2418 2462 2419 2463 SUBROUTINE zdf_osm_zmld_horizontal_gradients( zmld, zdtdx, zdtdy, zdsdx, zdsdy, dbdx_mle, dbdy_mle, zdbds_mle ) … … 2578 2622 ENDIF 2579 2623 hmle(ji,jj) = MIN(hmle(ji,jj), ht_n(ji,jj)) 2580 IF(ln_osm_hmle_limit) hmle(ji,jj) = MIN(hmle(ji,jj), MAX(rn_osm_hmle_limit,1.2*hbl(ji,jj)) )2624 IF(ln_osm_hmle_limit) hmle(ji,jj) = MIN(hmle(ji,jj), MAX(rn_osm_hmle_limit,1.2*hbl(ji,jj)) ) 2581 2625 END DO 2582 2626 END DO
Note: See TracChangeset
for help on using the changeset viewer.