New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 12397 for NEMO/branches/2020/KERNEL-03_Storkey_Coward_RK3_stage2/src/OCE/DYN/sshwzv.F90 – NEMO

Ignore:
Timestamp:
2020-02-18T11:58:37+01:00 (4 years ago)
Author:
davestorkey
Message:

2020/KERNEL-03_Storkey_Coward_RK3_stage2 : Consolidation of code to
handle initial Euler timestep in the context of leapfrog
timestepping. This version passes all SETTE tests but fails to bit
compare with the control for several tests (ORCA2_ICE_PISCES, AMM12,
ISOMIP, AGRIF_DEMO, SPITZ12).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/KERNEL-03_Storkey_Coward_RK3_stage2/src/OCE/DYN/sshwzv.F90

    r12377 r12397  
    7575      REAL(wp), DIMENSION(jpi,jpj,jpt), INTENT(inout) ::   pssh           ! sea-surface height 
    7676      !  
    77       INTEGER  ::   jk            ! dummy loop indice 
    78       REAL(wp) ::   z2dt, zcoef   ! local scalars 
     77      INTEGER  ::   jk      ! dummy loop index 
     78      REAL(wp) ::   zcoef   ! local scalar 
    7979      REAL(wp), DIMENSION(jpi,jpj) ::   zhdiv   ! 2D workspace 
    8080      !!---------------------------------------------------------------------- 
     
    8888      ENDIF 
    8989      ! 
    90       z2dt = 2._wp * rdt                          ! set time step size (Euler/Leapfrog) 
    91       IF( neuler == 0 .AND. kt == nit000 )   z2dt = rdt 
    9290      zcoef = 0.5_wp * r1_rau0 
    9391 
     
    9694      !                                           !------------------------------! 
    9795      IF(ln_wd_il) THEN 
    98          CALL wad_lmt(pssh(:,:,Kbb), zcoef * (emp_b(:,:) + emp(:,:)), z2dt, Kmm, uu, vv ) 
     96         CALL wad_lmt(pssh(:,:,Kbb), zcoef * (emp_b(:,:) + emp(:,:)), r2dt, Kmm, uu, vv ) 
    9997      ENDIF 
    10098 
     
    109107      ! compute the vertical velocity which can be used to compute the non-linear terms of the momentum equations. 
    110108      !  
    111       pssh(:,:,Kaa) = (  pssh(:,:,Kbb) - z2dt * ( zcoef * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) )  ) * ssmask(:,:) 
     109      pssh(:,:,Kaa) = (  pssh(:,:,Kbb) - r2dt * ( zcoef * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) )  ) * ssmask(:,:) 
    112110      ! 
    113111#if defined key_agrif 
     
    152150      ! 
    153151      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
    154       REAL(wp) ::   z1_2dt       ! local scalars 
    155152      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   zhdiv 
    156153      !!---------------------------------------------------------------------- 
     
    168165      !                                           !     Now Vertical Velocity    ! 
    169166      !                                           !------------------------------! 
    170       z1_2dt = 1. / ( 2. * rdt )                         ! set time step size (Euler/Leapfrog) 
    171       IF( neuler == 0 .AND. kt == nit000 )   z1_2dt = 1. / rdt 
    172167      ! 
    173168      IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN      ! z_tilde and layer cases 
     
    187182            ! computation of w 
    188183            pww(:,:,jk) = pww(:,:,jk+1) - (  e3t(:,:,jk,Kmm) * hdiv(:,:,jk) + zhdiv(:,:,jk)    & 
    189                &                         + z1_2dt * ( e3t(:,:,jk,Kaa) - e3t(:,:,jk,Kbb) )     ) * tmask(:,:,jk) 
     184               &                         + r1_2dt * ( e3t(:,:,jk,Kaa) - e3t(:,:,jk,Kbb) )     ) * tmask(:,:,jk) 
    190185         END DO 
    191186         !          IF( ln_vvl_layer ) pww(:,:,:) = 0.e0 
     
    195190            ! computation of w 
    196191            pww(:,:,jk) = pww(:,:,jk+1) - (  e3t(:,:,jk,Kmm) * hdiv(:,:,jk)                 & 
    197                &                         + z1_2dt * ( e3t(:,:,jk,Kaa) - e3t(:,:,jk,Kbb) )  ) * tmask(:,:,jk) 
     192               &                         + r1_2dt * ( e3t(:,:,jk,Kaa) - e3t(:,:,jk,Kbb) )  ) * tmask(:,:,jk) 
    198193         END DO 
    199194      ENDIF 
     
    249244      ENDIF 
    250245      !              !==  Euler time-stepping: no filter, just swap  ==! 
    251       IF ( .NOT.( neuler == 0 .AND. kt == nit000 ) ) THEN   ! Only do time filtering for leapfrog timesteps 
     246      IF ( .NOT.( l_1st_euler ) ) THEN   ! Only do time filtering for leapfrog timesteps 
    252247         !                                                  ! filtered "now" field 
    253248         pssh(:,:,Kmm) = pssh(:,:,Kmm) + atfp * ( pssh(:,:,Kbb) - 2 * pssh(:,:,Kmm) + pssh(:,:,Kaa) ) 
Note: See TracChangeset for help on using the changeset viewer.