Changeset 14072 for NEMO/trunk/src/OCE/DYN/dynvor.F90
- Timestamp:
- 2020-12-04T08:48:38+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/DYN/dynvor.F90
r14053 r14072 15 15 !! 3.2 ! 2009-04 (R. Benshila) vvl: correction of een scheme 16 16 !! 3.3 ! 2010-10 (C. Ethe, G. Madec) reorganisation of initialisation phase 17 !! 3.7 ! 2014-04 (G. Madec) trend simplification: suppress jpdyn_trd_dat vorticity 17 !! 3.7 ! 2014-04 (G. Madec) trend simplification: suppress jpdyn_trd_dat vorticity 18 18 !! - ! 2014-06 (G. Madec) suppression of velocity curl from in-core memory 19 19 !! - ! 2016-12 (G. Madec, E. Clementi) add Stokes-Coriolis trends (ln_stcor=T) … … 74 74 INTEGER, PUBLIC, PARAMETER :: np_MIX = 5 ! MIX scheme 75 75 76 INTEGER :: ncor, nrvm, ntot ! choice of calculated vorticity 76 INTEGER :: ncor, nrvm, ntot ! choice of calculated vorticity 77 77 ! ! associated indices: 78 78 INTEGER, PUBLIC, PARAMETER :: np_COR = 1 ! Coriolis (planetary) … … 83 83 84 84 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: di_e2u_2 ! = di(e2u)/2 used in T-point metric term calculation 85 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: dj_e1v_2 ! = dj(e1v)/2 - - - - 85 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: dj_e1v_2 ! = dj(e1v)/2 - - - - 86 86 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: di_e2v_2e1e2f ! = di(e2u)/(2*e1e2f) used in F-point metric term calculation 87 87 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: dj_e1u_2e1e2f ! = dj(e1v)/(2*e1e2f) - - - - 88 88 ! 89 89 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: e3f_0vor ! e3f used in EEN, ENE and ENS cases (key_qco only) 90 90 91 91 REAL(wp) :: r1_4 = 0.250_wp ! =1/4 92 92 REAL(wp) :: r1_8 = 0.125_wp ! =1/8 93 93 REAL(wp) :: r1_12 = 1._wp / 12._wp ! 1/12 94 94 95 95 !! * Substitutions 96 96 # include "do_loop_substitute.h90" … … 111 111 !! ** Action : - Update (puu(:,:,:,Krhs),pvv(:,:,:,Krhs)) with the now vorticity term trend 112 112 !! - save the trends in (ztrdu,ztrdv) in 2 parts (relative 113 !! and planetary vorticity trends) and send them to trd_dyn 113 !! and planetary vorticity trends) and send them to trd_dyn 114 114 !! for futher diagnostics (l_trddyn=T) 115 115 !!---------------------------------------------------------------------- … … 163 163 CALL vor_enT( kt, Kmm, ntot, puu(:,:,:,Kmm) , pvv(:,:,:,Kmm) , puu(:,:,:,Krhs), pvv(:,:,:,Krhs) ) ! total vorticity trend 164 164 IF( ln_stcor .AND. .NOT. ln_vortex_force ) THEN 165 CALL vor_enT( kt, Kmm, ncor, usd, vsd, puu(:,:,:,Krhs), pvv(:,:,:,Krhs) ) ! add the Stokes-Coriolis trend 165 CALL vor_enT( kt, Kmm, ncor, usd, vsd, puu(:,:,:,Krhs), pvv(:,:,:,Krhs) ) ! add the Stokes-Coriolis trend 166 166 ELSE IF( ln_stcor .AND. ln_vortex_force ) THEN 167 167 CALL vor_enT( kt, Kmm, ntot, usd, vsd, puu(:,:,:,Krhs), pvv(:,:,:,Krhs) ) ! add the Stokes-Coriolis trend and vortex force … … 218 218 !! *** ROUTINE vor_enT *** 219 219 !! 220 !! ** Purpose : Compute the now total vorticity trend and add it to 220 !! ** Purpose : Compute the now total vorticity trend and add it to 221 221 !! the general trend of the momentum equation. 222 222 !! 223 !! ** Method : Trend evaluated using now fields (centered in time) 223 !! ** Method : Trend evaluated using now fields (centered in time) 224 224 !! and t-point evaluation of vorticity (planetary and relative). 225 225 !! conserves the horizontal kinetic energy. 226 !! The general trend of momentum is increased due to the vorticity 226 !! The general trend of momentum is increased due to the vorticity 227 227 !! term which is given by: 228 228 !! voru = 1/bu mj[ ( mi(mj(bf*rvor))+bt*f_t)/e3t mj[vn] ] … … 260 260 & - e1u(ji,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk) ) * r1_e1e2f(ji,jj) 261 261 END_2D 262 IF( ln_dynvor_msk ) THEN ! mask relative vorticity 262 IF( ln_dynvor_msk ) THEN ! mask relative vorticity 263 263 DO_2D( 1, 0, 1, 0 ) 264 264 zwz(ji,jj,jk) = zwz(ji,jj,jk) * fmask(ji,jj,jk) … … 314 314 ! 315 315 pv_rhs(ji,jj,jk) = pv_rhs(ji,jj,jk) - r1_4 * r1_e1e2v(ji,jj) / e3v(ji,jj,jk,Kmm) & 316 & * ( zwt(ji,jj+1) * ( pu(ji,jj+1,jk) + pu(ji-1,jj+1,jk) ) & 317 & + zwt(ji,jj ) * ( pu(ji,jj ,jk) + pu(ji-1,jj ,jk) ) ) 316 & * ( zwt(ji,jj+1) * ( pu(ji,jj+1,jk) + pu(ji-1,jj+1,jk) ) & 317 & + zwt(ji,jj ) * ( pu(ji,jj ,jk) + pu(ji-1,jj ,jk) ) ) 318 318 END_2D 319 319 ! ! =============== … … 332 332 !! *** ROUTINE vor_ene *** 333 333 !! 334 !! ** Purpose : Compute the now total vorticity trend and add it to 334 !! ** Purpose : Compute the now total vorticity trend and add it to 335 335 !! the general trend of the momentum equation. 336 336 !! 337 !! ** Method : Trend evaluated using now fields (centered in time) 337 !! ** Method : Trend evaluated using now fields (centered in time) 338 338 !! and the Sadourny (1975) flux form formulation : conserves the 339 339 !! horizontal kinetic energy. 340 !! The general trend of momentum is increased due to the vorticity 340 !! The general trend of momentum is increased due to the vorticity 341 341 !! term which is given by: 342 342 !! voru = 1/e1u mj-1[ (rvor+f)/e3f mi(e1v*e3v pvv(:,:,:,Kmm)) ] … … 371 371 SELECT CASE( kvor ) !== vorticity considered ==! 372 372 CASE ( np_COR ) !* Coriolis (planetary vorticity) 373 zwz(:,:) = ff_f(:,:) 373 zwz(:,:) = ff_f(:,:) 374 374 CASE ( np_RVO ) !* relative vorticity 375 375 DO_2D( 1, 0, 1, 0 ) … … 447 447 zx2 = zwx(ji ,jj) + zwx(ji ,jj+1) 448 448 pu_rhs(ji,jj,jk) = pu_rhs(ji,jj,jk) + r1_4 * r1_e1u(ji,jj) * ( zwz(ji ,jj-1) * zy1 + zwz(ji,jj) * zy2 ) 449 pv_rhs(ji,jj,jk) = pv_rhs(ji,jj,jk) - r1_4 * r1_e2v(ji,jj) * ( zwz(ji-1,jj ) * zx1 + zwz(ji,jj) * zx2 ) 449 pv_rhs(ji,jj,jk) = pv_rhs(ji,jj,jk) - r1_4 * r1_e2v(ji,jj) * ( zwz(ji-1,jj ) * zx1 + zwz(ji,jj) * zx2 ) 450 450 END_2D 451 451 ! ! =============== … … 497 497 SELECT CASE( kvor ) !== vorticity considered ==! 498 498 CASE ( np_COR ) !* Coriolis (planetary vorticity) 499 zwz(:,:) = ff_f(:,:) 499 zwz(:,:) = ff_f(:,:) 500 500 CASE ( np_RVO ) !* relative vorticity 501 501 DO_2D( 1, 0, 1, 0 ) … … 586 586 !! *** ROUTINE vor_een *** 587 587 !! 588 !! ** Purpose : Compute the now total vorticity trend and add it to 588 !! ** Purpose : Compute the now total vorticity trend and add it to 589 589 !! the general trend of the momentum equation. 590 590 !! 591 !! ** Method : Trend evaluated using now fields (centered in time) 592 !! and the Arakawa and Lamb (1980) flux form formulation : conserves 591 !! ** Method : Trend evaluated using now fields (centered in time) 592 !! and the Arakawa and Lamb (1980) flux form formulation : conserves 593 593 !! both the horizontal kinetic energy and the potential enstrophy 594 594 !! when horizontal divergence is zero (see the NEMO documentation) … … 684 684 IF( ln_dynvor_msk ) THEN ! mask the relative vorticity 685 685 DO_2D( 1, 0, 1, 0 ) 686 zwz(ji,jj,jk) = ( zwz(ji,jj,jk) - ff_f(ji,jj) ) * fmask(ji,jj,jk) + ff_f(ji,jj) 686 zwz(ji,jj,jk) = ( zwz(ji,jj,jk) - ff_f(ji,jj) ) * fmask(ji,jj,jk) + ff_f(ji,jj) 687 687 END_2D 688 688 ENDIF … … 735 735 !! *** ROUTINE vor_eeT *** 736 736 !! 737 !! ** Purpose : Compute the now total vorticity trend and add it to 737 !! ** Purpose : Compute the now total vorticity trend and add it to 738 738 !! the general trend of the momentum equation. 739 739 !! 740 !! ** Method : Trend evaluated using now fields (centered in time) 741 !! and the Arakawa and Lamb (1980) vector form formulation using 740 !! ** Method : Trend evaluated using now fields (centered in time) 741 !! and the Arakawa and Lamb (1980) vector form formulation using 742 742 !! a modified version of Arakawa and Lamb (1980) scheme (see vor_een). 743 !! The change consists in 743 !! The change consists in 744 744 !! Add this trend to the general momentum trend (pu_rhs,pv_rhs). 745 745 !! … … 758 758 REAL(wp) :: zua, zva ! local scalars 759 759 REAL(wp) :: zmsk, z1_e3t ! local scalars 760 REAL(wp), DIMENSION(jpi,jpj) :: zwx , zwy 760 REAL(wp), DIMENSION(jpi,jpj) :: zwx , zwy 761 761 REAL(wp), DIMENSION(jpi,jpj) :: ztnw, ztne, ztsw, ztse 762 762 REAL(wp), DIMENSION(jpi,jpj,jpkm1) :: zwz ! 3D workspace, avoid lbc_lnk on jpk that is not defined … … 803 803 IF( ln_dynvor_msk ) THEN ! mask the relative vorticity 804 804 DO_2D( 1, 0, 1, 0 ) 805 zwz(ji,jj,jk) = ( zwz(ji,jj,jk) - ff_f(ji,jj) ) * fmask(ji,jj,jk) + ff_f(ji,jj) 805 zwz(ji,jj,jk) = ( zwz(ji,jj,jk) - ff_f(ji,jj) ) * fmask(ji,jj,jk) + ff_f(ji,jj) 806 806 END_2D 807 807 ENDIF … … 916 916 ! 917 917 IF( ioptio /= 1 ) CALL ctl_stop( ' use ONE and ONLY one vorticity scheme' ) 918 ! 918 ! 919 919 IF(lwp) WRITE(numout,*) ! type of calculated vorticity (set ncor, nrvm, ntot) 920 920 ncor = np_COR ! planetary vorticity … … 925 925 ntot = np_COR ! - - 926 926 CASE( np_VEC_c2 ) 927 IF(lwp) WRITE(numout,*) ' ==>>> vector form dynamics : total vorticity = Coriolis + relative vorticity' 927 IF(lwp) WRITE(numout,*) ' ==>>> vector form dynamics : total vorticity = Coriolis + relative vorticity' 928 928 nrvm = np_RVO ! relative vorticity 929 ntot = np_CRV ! relative + planetary vorticity 929 ntot = np_CRV ! relative + planetary vorticity 930 930 CASE( np_FLX_c2 , np_FLX_ubs ) 931 931 IF(lwp) WRITE(numout,*) ' ==>>> flux form dynamics : total vorticity = Coriolis + metric term' … … 971 971 & + tmask(ji,jj ,jk) +tmask(ji+1,jj ,jk) ) 972 972 ! 973 IF( zmsk /= 0._wp ) THEN 973 IF( zmsk /= 0._wp ) THEN 974 974 e3f_0vor(ji,jj,jk) = ( e3t_0(ji ,jj+1,jk)*tmask(ji ,jj+1,jk) & 975 975 & + e3t_0(ji+1,jj+1,jk)*tmask(ji+1,jj+1,jk) & … … 997 997 CASE( np_EEN ) ; WRITE(numout,*) ' ==>>> energy and enstrophy conserving scheme (EEN)' 998 998 CASE( np_MIX ) ; WRITE(numout,*) ' ==>>> mixed enstrophy/energy conserving scheme (MIX)' 999 END SELECT 999 END SELECT 1000 1000 ENDIF 1001 1001 !
Note: See TracChangeset
for help on using the changeset viewer.