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 9863 for NEMO/branches/2018/dev_r9838_ENHANCE04_MLF/src/TOP/trcsub.F90 – NEMO

Ignore:
Timestamp:
2018-06-30T12:51:02+02:00 (6 years ago)
Author:
gm
Message:

#1911 (ENHANCE-04): simplified implementation of the Euler stepping at nit000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2018/dev_r9838_ENHANCE04_MLF/src/TOP/trcsub.F90

    r9598 r9863  
    466466      ! 
    467467      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
    468       REAL(wp) ::   zcoefu, zcoefv, zcoeff, z2dt, z1_2dt, z1_rau0   ! local scalars 
     468      REAL(wp) ::   zcoefu, zcoefv, zcoeff, z1_2rau0   ! local scalars 
    469469      REAL(wp), DIMENSION(jpi,jpj) :: zhdiv 
    470470      !!--------------------------------------------------------------------- 
     
    486486      CALL div_hor( kt )                              ! Horizontal divergence & Relative vorticity 
    487487      ! 
    488       z2dt = 2._wp * rdt                              ! set time step size (Euler/Leapfrog) 
    489       IF( neuler == 0 .AND. kt == nittrc000 )   z2dt = rdt 
    490  
    491488      !                                           !------------------------------! 
    492489      !                                           !   After Sea Surface Height   ! 
     
    499496      ! In forward Euler time stepping case, the same formulation as in the leap-frog case can be used 
    500497      ! because emp_b field is initialized with the vlaues of emp field. Hence, 0.5 * ( emp + emp_b ) = emp 
    501       z1_rau0 = 0.5 / rau0 
    502       ssha(:,:) = (  sshb(:,:) - z2dt * ( z1_rau0 * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) )  ) * tmask(:,:,1) 
     498      z1_2rau0 = 0.5 * r1_rau0 
     499      ssha(:,:) = (  sshb(:,:) - r2dt * ( z1_2rau0 * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) )  ) * tmask(:,:,1) 
    503500 
    504501      IF( .NOT.ln_dynspg_ts ) THEN 
     
    517514      !                                           !     Now Vertical Velocity    ! 
    518515      !                                           !------------------------------! 
    519       z1_2dt = 1.e0 / z2dt 
    520516      DO jk = jpkm1, 1, -1                             ! integrate from the bottom the hor. divergence 
    521517         ! - ML - need 3 lines here because replacement of e3t by its expression yields too long lines otherwise 
    522518         wn(:,:,jk) = wn(:,:,jk+1) -   e3t_n(:,:,jk) * hdivn(:,:,jk)        & 
    523519            &                      - ( e3t_a(:,:,jk) - e3t_b(:,:,jk) )    & 
    524             &                         * tmask(:,:,jk) * z1_2dt 
     520            &                         * tmask(:,:,jk) * r1_2dt 
    525521         IF( ln_bdy ) wn(:,:,jk) = wn(:,:,jk) * bdytmask(:,:) 
    526522      END DO 
Note: See TracChangeset for help on using the changeset viewer.