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/dynspg_ts.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/dynspg_ts.F90

    r12377 r12397  
    180180!     zwdramp = 1._wp / (rn_wdmin2 - rn_wdmin1) ! more general ramp 
    181181      !                                         ! inverse of baroclinic time step  
    182       IF( kt == nit000 .AND. neuler == 0 ) THEN   ;   r1_2dt_b = 1._wp / (         rdt ) 
    183       ELSE                                        ;   r1_2dt_b = 1._wp / ( 2._wp * rdt ) 
    184       ENDIF 
     182      r1_2dt_b = 1._wp / r2dt  
    185183      ! 
    186184      ll_init     = ln_bt_av                    ! if no time averaging, then no specific restart  
     
    198196         IF(lwp) WRITE(numout,*) 
    199197         ! 
    200          IF( neuler == 0 )   ll_init=.TRUE. 
    201          ! 
    202          IF( ln_bt_fw .OR. neuler == 0 ) THEN 
     198         IF( l_1st_euler )   ll_init=.TRUE. 
     199         ! 
     200         IF( ln_bt_fw .OR. l_1st_euler ) THEN 
    203201            ll_fw_start =.TRUE. 
    204202            noffset     = 0 
     
    209207         CALL ts_wgt( ln_bt_av, ll_fw_start, icycle, wgtbtp1, wgtbtp2 ) 
    210208         ! 
    211       ENDIF 
    212       ! 
    213       ! If forward start at previous time step, and centered integration,  
    214       ! then update averaging weights: 
    215       IF (.NOT.ln_bt_fw .AND.( neuler==0 .AND. kt==nit000+1 ) ) THEN 
    216          ll_fw_start=.FALSE. 
    217          CALL ts_wgt( ln_bt_av, ll_fw_start, icycle, wgtbtp1, wgtbtp2 ) 
    218       ENDIF 
    219       ! 
    220                            
     209      ELSEIF( kt == nit000 + 1 ) THEN           !* initialisation 2nd time-step 
     210         ! 
     211         IF( .NOT.ln_bt_fw ) THEN 
     212            ! If we did an Euler timestep on the first timestep we need to reset ll_fw_start 
     213            ! and the averaging weights. We don't have an easy way of telling whether we did 
     214            ! an Euler timestep on the first timestep (because l_1st_euler is reset to .false. 
     215            ! at the end of the first timestep) so just do this in all cases.  
     216            ll_fw_start = .FALSE. 
     217            CALL ts_wgt( ln_bt_av, ll_fw_start, icycle, wgtbtp1, wgtbtp2 ) 
     218         ENDIF 
     219         ! 
     220      ENDIF 
     221      ! 
    221222      ! ----------------------------------------------------------------------------- 
    222223      !  Phase 1 : Coupling between general trend and barotropic estimates (1st step) 
     
    701702      ! Set advection velocity correction: 
    702703      IF (ln_bt_fw) THEN 
    703          IF( .NOT.( kt == nit000 .AND. neuler==0 ) ) THEN 
     704         IF( .NOT.( kt == nit000 .AND. l_1st_euler ) ) THEN 
    704705            DO_2D_11_11 
    705706               zun_save = un_adv(ji,jj) 
     
    889890      IF( TRIM(cdrw) == 'READ' ) THEN        ! Read/initialise  
    890891         !                                   ! --------------- 
    891          IF( ln_rstart .AND. ln_bt_fw .AND. (neuler/=0) ) THEN    !* Read the restart file 
     892         IF( ln_rstart .AND. ln_bt_fw .AND. (.NOT.l_1st_euler) ) THEN    !* Read the restart file 
    892893            CALL iom_get( numror, jpdom_autoglo, 'ub2_b'  , ub2_b  (:,:), ldxios = lrxios )    
    893894            CALL iom_get( numror, jpdom_autoglo, 'vb2_b'  , vb2_b  (:,:), ldxios = lrxios )  
Note: See TracChangeset for help on using the changeset viewer.