Changeset 12397 for NEMO/branches/2020/KERNEL-03_Storkey_Coward_RK3_stage2/src/OCE/DYN/dynspg_ts.F90
- Timestamp:
- 2020-02-18T11:58:37+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/KERNEL-03_Storkey_Coward_RK3_stage2/src/OCE/DYN/dynspg_ts.F90
r12377 r12397 180 180 ! zwdramp = 1._wp / (rn_wdmin2 - rn_wdmin1) ! more general ramp 181 181 ! ! 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 185 183 ! 186 184 ll_init = ln_bt_av ! if no time averaging, then no specific restart … … 198 196 IF(lwp) WRITE(numout,*) 199 197 ! 200 IF( neuler == 0) ll_init=.TRUE.201 ! 202 IF( ln_bt_fw .OR. neuler == 0) THEN198 IF( l_1st_euler ) ll_init=.TRUE. 199 ! 200 IF( ln_bt_fw .OR. l_1st_euler ) THEN 203 201 ll_fw_start =.TRUE. 204 202 noffset = 0 … … 209 207 CALL ts_wgt( ln_bt_av, ll_fw_start, icycle, wgtbtp1, wgtbtp2 ) 210 208 ! 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 ! 221 222 ! ----------------------------------------------------------------------------- 222 223 ! Phase 1 : Coupling between general trend and barotropic estimates (1st step) … … 701 702 ! Set advection velocity correction: 702 703 IF (ln_bt_fw) THEN 703 IF( .NOT.( kt == nit000 .AND. neuler==0) ) THEN704 IF( .NOT.( kt == nit000 .AND. l_1st_euler ) ) THEN 704 705 DO_2D_11_11 705 706 zun_save = un_adv(ji,jj) … … 889 890 IF( TRIM(cdrw) == 'READ' ) THEN ! Read/initialise 890 891 ! ! --------------- 891 IF( ln_rstart .AND. ln_bt_fw .AND. ( neuler/=0) ) THEN !* Read the restart file892 IF( ln_rstart .AND. ln_bt_fw .AND. (.NOT.l_1st_euler) ) THEN !* Read the restart file 892 893 CALL iom_get( numror, jpdom_autoglo, 'ub2_b' , ub2_b (:,:), ldxios = lrxios ) 893 894 CALL iom_get( numror, jpdom_autoglo, 'vb2_b' , vb2_b (:,:), ldxios = lrxios )
Note: See TracChangeset
for help on using the changeset viewer.