Changeset 12688
 Timestamp:
 20200406T14:39:52+02:00 (4 years ago)
 Location:
 NEMO/branches/UKMO/NEMO_4.0.1_biharmonic_GM/src/OCE
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

NEMO/branches/UKMO/NEMO_4.0.1_biharmonic_GM/src/OCE/DYN/dynldf_lap_blp.F90
r12535 r12688 226 226 ! =============== 227 227 !CW: calculate bhm * d/dz(del^2 u) 228 ! Use of wumask and wvmask to ensure diffusive fluxes at topography are zero. 228 229 DO jk = 2, jpkm1 229 230 DO jj = 2, jpjm1 230 231 DO ji = fs_2, jpim1 ! vector opt. 231 zulapdz(ji,jj,jk) =  bhmu(ji,jj,jk)*(zulap(ji,jj,jk1)  zulap(ji,jj,jk)) / e3uw_n(ji,jj,jk)232 zvlapdz(ji,jj,jk) =  bhmv(ji,jj,jk)*(zvlap(ji,jj,jk1)  zvlap(ji,jj,jk)) / e3vw_n(ji,jj,jk)232 zulapdz(ji,jj,jk) = 0.5_wp*(bhm(ji+1,jj ,jk)+bhm(ji,jj,jk))*(zulap(ji,jj,jk1)  zulap(ji,jj,jk)) * wumask(ji,jj,jk) / e3uw_n(ji,jj,jk) 233 zvlapdz(ji,jj,jk) = 0.5_wp*(bhm(ji ,jj+1,jk)+bhm(ji,jj,jk))*(zvlap(ji,jj,jk1)  zvlap(ji,jj,jk)) * wvmask(ji,jj,jk) / e3vw_n(ji,jj,jk) 233 234 ENDDO 234 235 ENDDO 
NEMO/branches/UKMO/NEMO_4.0.1_biharmonic_GM/src/OCE/LDF/ldfdyn.F90
r12535 r12688 66 66 67 67 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ahmt, ahmf !: eddy viscosity coef. at T and Fpoints [m2/s or m4/s] 68 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: bhm u, bhmv !: eddy viscosity coef. for biLaplacian GM at u and vpoints[m4/s]68 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: bhm !: eddy viscosity coef. for biLaplacian GM at Wpoints (cf. avm) [m4/s] 69 69 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: dtensq !: horizontal tension squared (Smagorinsky only) 70 70 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: dshesq !: horizontal shearing strain squared (Smagorinsky only) … … 117 117 INTEGER :: ji, jj, jk ! dummy loop indices 118 118 INTEGER :: ioptio, ierr, inum, ios, inn ! local integer 119 INTEGER :: ik u, ikv, ikt! local integer119 INTEGER :: ikw ! local integer 120 120 REAL(wp) :: zah0, zah_max, zUfac ! local scalar 121 121 REAL(wp) :: bhm0, lhscrit, lhscritmax ! local scalar … … 279 279 !CW 280 280 !IF(lwp) WRITE(numout,*) ' ==>>> No viscous operator selected. ahmt and ahmf are not allocated' 281 IF(lwp) WRITE(numout,*) ' ==>>> No viscous operator selected. ahmt, ahmf, bhm u, bhmvare not allocated'281 IF(lwp) WRITE(numout,*) ' ==>>> No viscous operator selected. ahmt, ahmf, bhm are not allocated' 282 282 ! 283 283 RETURN … … 286 286 ! 287 287 ! ! allocate the ahm arrays 288 ALLOCATE( ahmt(jpi,jpj,jpk) , ahmf(jpi,jpj,jpk) , bhm u(jpi,jpj,jpk) , bhmv(jpi,jpj,jpk) , STAT=ierr )288 ALLOCATE( ahmt(jpi,jpj,jpk) , ahmf(jpi,jpj,jpk) , bhm(jpi,jpj,jpk) , STAT=ierr ) 289 289 ! 290 290 IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'ldf_dyn_init: failed to allocate arrays') … … 292 292 ahmt(:,:,:) = 0._wp ! init to 0 needed 293 293 ahmf(:,:,:) = 0._wp 294 bhmu(:,:,:) = 0._wp ! init to 0 needed 295 bhmv(:,:,:) = 0._wp 294 bhm(:,:,:) = 0._wp ! init to 0 needed 296 295 ! ! value of lap/blp eddy mixing coef. 297 296 IF( ln_dynldf_lap ) THEN ; zUfac = r1_2 *rn_Uv ; inn = 1 ; cl_Units = ' m2/s' ! laplacian … … 386 385 DO jj = 2, jpjm1 387 386 DO ji = 2, jpim1 388 bhmu(ji,jj,:) = bhm0 389 bhmv(ji,jj,:) = bhm0 387 bhm(ji,jj,:) = bhm0 390 388 ENDDO 391 389 ENDDO 392 390 393 391 ! Surface BC : set to zero 394 bhm u(:,:,1) = 0._wp ; bhmv(:,:,1) = 0._wp392 bhm(:,:,1) = 0._wp 395 393 ! Flat bottom BC : set to zero 396 bhmu(:,:,jpk) = 0._wp ; bhmv(:,:,jpk) = 0._wp 397 ! Variable bathymetry case, including zpartial steps, as in dynhpg.F90, subroutine hpg_zps 398 ! and exactly mirroring top, bottom BC d/dz(del^2 u) = 0 for BGM calculation in dynldf_lap_blp 399 DO jj = 2, jpjm1 400 DO ji = 2, jpim1 401 iku = mbku(ji,jj)+1 402 ikv = mbkv(ji,jj)+1 403 bhmu(:,:,iku) = 0._wp 404 bhmv(:,:,ikv) = 0._wp 405 ENDDO 406 ENDDO 394 bhm(:,:,jpk) = 0._wp 395 ! Variable bathymetry case: diffusive fluxes masked in dyn_ldf_bgm 407 396 408 397 !CW Test criterion for two gridlength mode for BGM scheme with leapfrog timestepping … … 417 406 DO jj = 2, jpjm1 418 407 DO ji = 2, jpim1 419 ik t= mbkt(ji,jj) !bottom last wet Tlevel420 DO jk = 2, ik t408 ikw = mbkt(ji,jj) !bottom last wet Tlevel 409 DO jk = 2, ikw 421 410 lhscrit=bhm0*rdt/(e3t_n(ji,jj,jk)**2*e1t(ji,jj)**2) 422 411 IF(lhscrit .gt. lhscritmax) lhscritmax=lhscrit … … 463 452 DO jj = 2, jpjm1 464 453 DO ji = 2, jpim1 465 bhmu(ji,jj,jk) = bhm0 * gdept_1d(jk)/rn_bgmzcrit 466 bhmv(ji,jj,jk) = bhm0 * gdept_1d(jk)/rn_bgmzcrit 454 bhm(ji,jj,jk) = bhm0 * gdepw_1d(jk)/rn_bgmzcrit 467 455 ENDDO 468 456 ENDDO … … 473 461 DO jj = 2, jpjm1 474 462 DO ji = 2, jpim1 475 bhmu(ji,jj,jk) = bhm0 476 bhmv(ji,jj,jk) = bhm0 463 bhm(ji,jj,jk) = bhm0 477 464 ENDDO 478 465 ENDDO … … 482 469 ENDDO 483 470 484 485 471 ! Surface BC : set to zero 486 bhm u(:,:,1) = 0._wp ; bhmv(:,:,1) = 0._wp472 bhm(:,:,1) = 0._wp 487 473 ! Flat bottom BC : set to zero 488 bhmu(:,:,jpk) = 0._wp ; bhmv(:,:,jpk) = 0._wp 489 ! Variable bathymetry case, including zpartial steps, as in dynhpg.F90, subroutine hpg_zps 490 ! and exactly mirroring top, bottom BC d/dz(del^2 u) = 0 for BGM calculation in dynldf_lap_blp 491 DO jj = 2, jpjm1 492 DO ji = 2, jpim1 493 iku = mbku(ji,jj)+1 494 ikv = mbkv(ji,jj)+1 495 bhmu(:,:,iku) = 0._wp 496 bhmv(:,:,ikv) = 0._wp 497 ENDDO 498 ENDDO 474 bhm(:,:,jpk) = 0._wp 475 ! Variable bathymetry case: diffusive fluxes masked in dyn_ldf_bgm 499 476 500 477 ! … … 516 493 DO jj = 2, jpjm1 517 494 DO ji = 2, jpim1 518 bhmu(ji,jj,jk) = bhm0*e1u(ji,jj)**2*e3t_n(ji,jj,jk)**2 519 bhmv(ji,jj,jk) = bhm0*e1v(ji,jj)**2*e3t_n(ji,jj,jk)**2 495 bhm(ji,jj,jk) = bhm0*e1t(ji,jj)**2*e3w_n(ji,jj,jk)**2 520 496 ENDDO 521 497 ENDDO 522 498 ENDDO 523 499 524 525 500 ! Surface BC : set to zero 526 bhm u(:,:,1) = 0._wp ; bhmv(:,:,1) = 0._wp501 bhm(:,:,1) = 0._wp 527 502 ! Flat bottom BC : set to zero 528 bhmu(:,:,jpk) = 0._wp ; bhmv(:,:,jpk) = 0._wp 529 ! Variable bathymetry case, including zpartial steps, as in dynhpg.F90, subroutine hpg_zps 530 ! and exactly mirroring top, bottom BC d/dz(del^2 u) = 0 for BGM calculation in dynldf_lap_blp 531 DO jj = 2, jpjm1 532 DO ji = 2, jpim1 533 iku = mbku(ji,jj)+1 534 ikv = mbkv(ji,jj)+1 535 bhmu(:,:,iku) = 0._wp 536 bhmv(:,:,ikv) = 0._wp 537 ENDDO 538 ENDDO 503 bhm(:,:,jpk) = 0._wp 504 ! Variable bathymetry case: diffusive fluxes masked in dyn_ldf_bgm 539 505 540 506 ! … … 554 520 !CW 555 521 ELSEIF( ln_dynldf_bgm ) THEN !biLaplacian GM operator (mask only) 556 bhmu(:,:,1:jpkm1) = bhmu(:,:,1:jpkm1) * umask(:,:,1:jpkm1) 557 bhmv(:,:,1:jpkm1) = bhmv(:,:,1:jpkm1) * vmask(:,:,1:jpkm1) 522 bhm(:,:,1:jpkm1) = bhm(:,:,1:jpkm1) * wmask(:,:,1:jpkm1) 558 523 ! 559 524 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.