Changeset 14921 for NEMO/trunk/src/OCE/ZDF/zdfphy.F90
- Timestamp:
- 2021-05-28T14:19:26+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/ZDF/zdfphy.F90
r14834 r14921 186 186 IF( lk_top .AND. ln_zdfnpc ) CALL ctl_stop( 'zdf_phy_init: npc scheme is not working with key_top' ) 187 187 IF( lk_top .AND. ln_zdfosm ) CALL ctl_warn( 'zdf_phy_init: osmosis gives no non-local fluxes for TOP tracers yet' ) 188 ! TEMP: [tiling] This change not necessary after finalisation of zdf_osm (not yet tiled)189 IF( ln_tile .AND. ln_zdfosm ) CALL ctl_warn( 'zdf_phy_init: osmosis does not yet work with tiling' )190 188 IF( lk_top .AND. ln_zdfmfc ) CALL ctl_stop( 'zdf_phy_init: Mass Flux scheme is not working with key_top' ) 191 189 IF(lwp) THEN … … 256 254 INTEGER :: ji, jj, jk ! dummy loop indice 257 255 REAL(wp), DIMENSION(A2D(nn_hls),jpk) :: zsh2 ! shear production 258 ! TEMP: [tiling] This change not necessary after finalisation of zdf_osm (not yet tiled)259 LOGICAL :: lskip260 256 !! --------------------------------------------------------------------- 261 257 ! 262 258 IF( ln_timing ) CALL timing_start('zdf_phy') 263 264 ! TEMP: [tiling] These changes not necessary after finalisation of zdf_osm (not yet tiled)265 lskip = .FALSE.266 267 IF( ln_tile .AND. nzdf_phy == np_OSM ) THEN268 IF( ntile == 1 ) THEN269 CALL dom_tile_stop( ldhold=.TRUE. )270 ELSE271 lskip = .TRUE.272 ENDIF273 ENDIF274 259 ! 275 260 IF( l_zdfdrg ) THEN !== update top/bottom drag ==! (non-linear cases) … … 301 286 ! 302 287 CALL zdf_mxl( kt, Kmm ) !* mixed layer depth, and level 303 304 ! TEMP: [tiling] These changes not necessary after finalisation of zdf_osm (not yet tiled) 305 IF( .NOT. lskip ) THEN 306 ! !== Kz from chosen turbulent closure ==! (avm_k, avt_k) 307 ! 308 ! NOTE: [tiling] the closure schemes (zdf_tke etc) will update avm_k. With tiling, the calculation of zsh2 on adjacent tiles then uses both updated (next timestep) and non-updated (current timestep) values of avm_k. To preserve results, we save a read-only copy of the "now" avm_k to use in the calculation of zsh2. 309 IF( l_zdfsh2 ) THEN !* shear production at w-points (energy conserving form) 310 IF( ln_tile ) THEN 311 IF( ntile == 1 ) avm_k_n(:,:,:) = avm_k(:,:,:) ! Preserve "now" avm_k for calculation of zsh2 312 CALL zdf_sh2( Kbb, Kmm, avm_k_n, & ! <<== in 313 & zsh2 ) ! ==>> out : shear production 314 ELSE 315 CALL zdf_sh2( Kbb, Kmm, avm_k, & ! <<== in 316 & zsh2 ) ! ==>> out : shear production 317 ENDIF 318 ENDIF 319 ! 320 SELECT CASE ( nzdf_phy ) !* Vertical eddy viscosity and diffusivity coefficients at w-points 321 CASE( np_RIC ) ; CALL zdf_ric( kt, Kmm, zsh2, avm_k, avt_k ) ! Richardson number dependent Kz 322 CASE( np_TKE ) ; CALL zdf_tke( kt, Kbb, Kmm, zsh2, avm_k, avt_k ) ! TKE closure scheme for Kz 323 CASE( np_GLS ) ; CALL zdf_gls( kt, Kbb, Kmm, zsh2, avm_k, avt_k ) ! GLS closure scheme for Kz 324 CASE( np_OSM ) ; CALL zdf_osm( kt, Kbb, Kmm, Krhs, avm_k, avt_k ) ! OSMOSIS closure scheme for Kz 288 ! 289 ! !== Kz from chosen turbulent closure ==! (avm_k, avt_k) 290 ! 291 ! NOTE: [tiling] the closure schemes (zdf_tke etc) will update avm_k. With tiling, the calculation of zsh2 on adjacent tiles then uses both updated (next timestep) and non-updated (current timestep) values of avm_k. To preserve results, we save a read-only copy of the "now" avm_k to use in the calculation of zsh2. 292 IF( l_zdfsh2 ) THEN !* shear production at w-points (energy conserving form) 293 IF( ln_tile ) THEN 294 IF( ntile == 1 ) avm_k_n(:,:,:) = avm_k(:,:,:) ! Preserve "now" avm_k for calculation of zsh2 295 CALL zdf_sh2( Kbb, Kmm, avm_k_n, & ! <<== in 296 & zsh2 ) ! ==>> out : shear production 297 ELSE 298 CALL zdf_sh2( Kbb, Kmm, avm_k, & ! <<== in 299 & zsh2 ) ! ==>> out : shear production 300 ENDIF 301 ENDIF 302 ! 303 SELECT CASE ( nzdf_phy ) !* Vertical eddy viscosity and diffusivity coefficients at w-points 304 CASE( np_RIC ) ; CALL zdf_ric( kt, Kmm, zsh2, avm_k, avt_k ) ! Richardson number dependent Kz 305 CASE( np_TKE ) ; CALL zdf_tke( kt, Kbb, Kmm, zsh2, avm_k, avt_k ) ! TKE closure scheme for Kz 306 CASE( np_GLS ) ; CALL zdf_gls( kt, Kbb, Kmm, zsh2, avm_k, avt_k ) ! GLS closure scheme for Kz 307 CASE( np_OSM ) ; CALL zdf_osm( kt, Kbb, Kmm, Krhs, avm_k, avt_k ) ! OSMOSIS closure scheme for Kz 325 308 ! CASE( np_CST ) ! Constant Kz (reset avt, avm to the background value) 326 309 ! ! avt_k and avm_k set one for all at initialisation phase 327 310 !!gm avt(2:jpim1,2:jpjm1,1:jpkm1) = rn_avt0 * wmask(2:jpim1,2:jpjm1,1:jpkm1) 328 311 !!gm avm(2:jpim1,2:jpjm1,1:jpkm1) = rn_avm0 * wmask(2:jpim1,2:jpjm1,1:jpkm1) 329 END SELECT 330 331 IF( ln_tile .AND. .NOT. l_istiled ) CALL dom_tile_start( ldhold=.TRUE. ) 332 ENDIF 312 END SELECT 333 313 ! 334 314 ! !== ocean Kz ==! (avt, avs, avm)
Note: See TracChangeset
for help on using the changeset viewer.