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/OFF/nemogcm.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/OFF/nemogcm.F90

    r9751 r9863  
    100100      !                            !==   time stepping   ==! 
    101101      !                            !-----------------------! 
     102      !                                               !== set the model time-step  ==! 
     103      ! 
     104      IF( l_1st_euler ) THEN   ;   r2dt =         rn_rdt   ;   l_1st_euler = .TRUE.    ! start or restart with Euler 1st time-step 
     105      ELSE                     ;   r2dt = 2._wp * rn_rdt   ;   l_1st_euler = .FALSE.   ! restart with leapfrog 
     106      ENDIF 
     107      r1_2dt = 1._wp / r2dt 
     108      ! NB: if l_1st_euler=T, r2dt will be set to 2*rdt at the end of the 1st time-step (in step.F90) 
     109      !     Done here (not in domain.F90) as in ASM initialization an Euler 1st time step can be forced 
     110      ! 
     111      ! 
    102112      istp = nit000 
    103113      ! 
     
    115125                                CALL trc_stp    ( istp )         ! time-stepping 
    116126                                CALL stp_ctl    ( istp, indic )  ! Time loop: control and print 
     127         IF( l_1st_euler ) THEN 
     128            r2dt   = 2._wp * rn_rdt                              ! recover Leap-frog time-step 
     129            r1_2dt = 1._wp / r2dt 
     130            l_1st_euler = .FALSE. 
     131         ENDIF 
     132         ! 
    117133         istp = istp + 1 
    118134      END DO 
Note: See TracChangeset for help on using the changeset viewer.