Changeset 12489 for NEMO/trunk/tests/VORTEX/MY_SRC
 Timestamp:
 20200228T16:55:11+01:00 (15 months ago)
 Location:
 NEMO/trunk/tests/VORTEX/MY_SRC
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

NEMO/trunk/tests/VORTEX/MY_SRC/domvvl.F90
r12377 r12489 237 237 IF( ln_vvl_ztilde_as_zstar ) THEN ! zstar emulation using ztile 238 238 frq_rst_e3t(:,:) = 0._wp !Ignore namelist settings 239 frq_rst_hdv(:,:) = 1._wp / r dt239 frq_rst_hdv(:,:) = 1._wp / rn_Dt 240 240 ENDIF 241 241 IF ( ln_vvl_zstar_at_eqtor ) THEN ! use zstar in vicinity of the Equator … … 250 250 ! values inside the equatorial band (ztilde as zstar) 251 251 frq_rst_e3t(ji,jj) = 0.0_wp 252 frq_rst_hdv(ji,jj) = 1.0_wp / r dt252 frq_rst_hdv(ji,jj) = 1.0_wp / rn_Dt 253 253 ELSE ! transition band (2.5 to 6 degrees N/S) 254 254 ! ! (linearly transition from ztilde to zstar) … … 256 256 & * ( 1.0_wp  COS( rad*(ABS(gphit(ji,jj))2.5_wp) & 257 257 & * 180._wp / 3.5_wp ) ) 258 frq_rst_hdv(ji,jj) = (1.0_wp / r dt) &259 & + ( frq_rst_hdv(ji,jj)(1.e0_wp / r dt) )*0.5_wp &258 frq_rst_hdv(ji,jj) = (1.0_wp / rn_Dt) & 259 & + ( frq_rst_hdv(ji,jj)(1.e0_wp / rn_Dt) )*0.5_wp & 260 260 & * ( 1._wp  COS( rad*(ABS(gphit(ji,jj))2.5_wp) & 261 261 & * 180._wp / 3.5_wp ) ) … … 268 268 ij0 = 128 ; ij1 = 135 ; 269 269 frq_rst_e3t( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.0_wp 270 frq_rst_hdv( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 1.e0_wp / r dt270 frq_rst_hdv( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 1.e0_wp / rn_Dt 271 271 ENDIF 272 272 ENDIF … … 323 323 INTEGER :: ji, jj, jk ! dummy loop indices 324 324 INTEGER , DIMENSION(3) :: ijk_max, ijk_min ! temporary integers 325 REAL(wp) :: z 2dt, z_tmin, z_tmax! local scalars325 REAL(wp) :: z_tmin, z_tmax ! local scalars 326 326 LOGICAL :: ll_do_bclinic ! local logical 327 327 REAL(wp), DIMENSION(jpi,jpj) :: zht, z_scale, zwu, zwv, zhdiv … … 377 377 IF( kt > nit000 ) THEN 378 378 DO jk = 1, jpkm1 379 hdiv_lf(:,:,jk) = hdiv_lf(:,:,jk)  r dt * frq_rst_hdv(:,:) &379 hdiv_lf(:,:,jk) = hdiv_lf(:,:,jk)  rn_Dt * frq_rst_hdv(:,:) & 380 380 & * ( hdiv_lf(:,:,jk)  e3t(:,:,jk,Kmm) * ( hdiv(:,:,jk)  zhdiv(:,:) ) ) 381 381 END DO … … 446 446 ! Leapfrog time stepping 447 447 ! ~~~~~~~~~~~~~~~~~~~~~~ 448 IF( neuler == 0 .AND. kt == nit000 ) THEN449 z2dt = rdt450 ELSE451 z2dt = 2.0_wp * rdt452 ENDIF453 448 CALL lbc_lnk( 'domvvl', tilde_e3t_a(:,:,:), 'T', 1._wp ) 454 tilde_e3t_a(:,:,:) = tilde_e3t_b(:,:,:) + z2dt * tmask(:,:,:) * tilde_e3t_a(:,:,:)449 tilde_e3t_a(:,:,:) = tilde_e3t_b(:,:,:) + rDt * tmask(:,:,:) * tilde_e3t_a(:,:,:) 455 450 456 451 ! Maximum deformation control … … 638 633 !  ML  e3(t/u/v)_b are allready computed in dynnxt. 639 634 IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN 640 IF( neuler == 0 .AND. kt == nit000) THEN635 IF( l_1st_euler ) THEN 641 636 tilde_e3t_b(:,:,:) = tilde_e3t_n(:,:,:) 642 637 ELSE 643 638 tilde_e3t_b(:,:,:) = tilde_e3t_n(:,:,:) & 644 & + atfp * ( tilde_e3t_b(:,:,:)  2.0_wp * tilde_e3t_n(:,:,:) + tilde_e3t_a(:,:,:) )639 & + rn_atfp * ( tilde_e3t_b(:,:,:)  2.0_wp * tilde_e3t_n(:,:,:) + tilde_e3t_a(:,:,:) ) 645 640 ENDIF 646 641 tilde_e3t_n(:,:,:) = tilde_e3t_a(:,:,:) … … 849 844 e3t(:,:,:,Kbb) = e3t_0(:,:,:) 850 845 END WHERE 851 IF( neuler == 0) THEN846 IF( l_1st_euler ) THEN 852 847 e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 853 848 ENDIF … … 855 850 IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : e3t(:,:,:,Kmm) not found in restart files' 856 851 IF(lwp) write(numout,*) 'e3t_n set equal to e3t_b.' 857 IF(lwp) write(numout,*) ' neuler is forced to 0'852 IF(lwp) write(numout,*) 'l_1st_euler is forced to .true.' 858 853 CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 859 854 e3t(:,:,:,Kmm) = e3t(:,:,:,Kbb) 860 neuler = 0855 l_1st_euler = .true. 861 856 ELSE IF( id2 > 0 ) THEN 862 857 IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : e3t(:,:,:,Kbb) not found in restart files' 863 858 IF(lwp) write(numout,*) 'e3t_b set equal to e3t_n.' 864 IF(lwp) write(numout,*) ' neuler is forced to 0'859 IF(lwp) write(numout,*) 'l_1st_euler is forced to .true.' 865 860 CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 866 861 e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 867 neuler = 0862 l_1st_euler = .true. 868 863 ELSE 869 864 IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : e3t(:,:,:,Kmm) not found in restart file' 870 865 IF(lwp) write(numout,*) 'Compute scale factor from sshn' 871 IF(lwp) write(numout,*) ' neuler is forced to 0'866 IF(lwp) write(numout,*) 'l_1st_euler is forced to .true.' 872 867 DO jk = 1, jpk 873 868 e3t(:,:,jk,Kmm) = e3t_0(:,:,jk) * ( ht_0(:,:) + ssh(:,:,Kmm) ) & … … 876 871 END DO 877 872 e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 878 neuler = 0873 l_1st_euler = .true. 879 874 ENDIF 880 875 ! !  ! … … 1039 1034 WRITE(numout,*) ' rn_rst_e3t = 0.e0' 1040 1035 WRITE(numout,*) ' hardwired : ztilde cutoff frequency of lowpass filter (days)' 1041 WRITE(numout,*) ' rn_lf_cutoff = 1.0/r dt'1036 WRITE(numout,*) ' rn_lf_cutoff = 1.0/rn_Dt' 1042 1037 ELSE 1043 1038 WRITE(numout,*) ' ztilde to zstar restoration timescale (days) rn_rst_e3t = ', rn_rst_e3t 
NEMO/trunk/tests/VORTEX/MY_SRC/usrdef_istate.F90
r10425 r12489 69 69 zH = 0.5_wp * 5000._wp 70 70 ! 71 zP0 = r au0 * zf0 * zumax * zlambda * SQRT(EXP(1._wp)/2._wp)71 zP0 = rho0 * zf0 * zumax * zlambda * SQRT(EXP(1._wp)/2._wp) 72 72 ! 73 73 ! Sea level: … … 77 77 zx = glamt(ji,jj) * 1.e3 78 78 zy = gphit(ji,jj) * 1.e3 79 zrho1 = r au0 + za * EXP((zx**2+zy**2)/zlambda**2)79 zrho1 = rho0 + za * EXP((zx**2+zy**2)/zlambda**2) 80 80 pssh(ji,jj) = zP0 * EXP((zx**2+zy**2)/zlambda**2)/(zrho1*grav) * ptmask(ji,jj,1) 81 81 END DO … … 89 89 DO jk=1,jpk 90 90 zdt = pdept(ji,jj,jk) 91 zrho1 = r au0 * (1._wp + zn2*zdt/grav)91 zrho1 = rho0 * (1._wp + zn2*zdt/grav) 92 92 IF (zdt < zH) THEN 93 93 zrho1 = zrho1  zP0 * (1._wpEXP(zdtzH)) & 94 94 & * EXP((zx**2+zy**2)/zlambda**2) / (grav*(zH 1._wp + exp(zH))); 95 95 ENDIF 96 pts(ji,jj,jk,jp_tem) = (20._wp + (r au0zrho1) / 0.28_wp) * ptmask(ji,jj,jk)96 pts(ji,jj,jk,jp_tem) = (20._wp + (rho0zrho1) / 0.28_wp) * ptmask(ji,jj,jk) 97 97 END DO 98 98 END DO … … 103 103 ! 104 104 ! velocities: 105 za = 2._wp * zP0 / (zf0 * r au0 * zlambda**2)105 za = 2._wp * zP0 / (zf0 * rho0 * zlambda**2) 106 106 DO ji=1, jpim1 107 107 DO jj=1, jpj
Note: See TracChangeset
for help on using the changeset viewer.