- Timestamp:
- 2018-06-21T11:58:42+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_nemo2cice_prints/NEMOGCM/NEMO/OPA_SRC/step.F90
r9816 r9817 33 33 USE step_oce ! time stepping definition modules 34 34 USE iom 35 USE lbclnk 35 36 36 37 IMPLICIT NONE … … 50 51 51 52 #if defined key_agrif 52 SUBROUTINE stp( )53 RECURSIVE SUBROUTINE stp( ) 53 54 INTEGER :: kstp ! ocean time-step index 54 55 #else … … 73 74 !!---------------------------------------------------------------------- 74 75 INTEGER :: jk ! dummy loop indice 76 INTEGER :: tind ! tracer loop index 75 77 INTEGER :: indic ! error indicator if < 0 76 78 INTEGER :: kcall ! optional integer argument (dom_vvl_sf_nxt) … … 79 81 #if defined key_agrif 80 82 kstp = nit000 + Agrif_Nb_Step() 81 ! IF ( Agrif_Root() .and. lwp) Write(*,*) '---' 82 ! IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp 83 IF ( lk_agrif_debug ) THEN 84 IF ( Agrif_Root() .and. lwp) Write(*,*) '---' 85 IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp, 'int tstep',Agrif_NbStepint() 86 ENDIF 87 83 88 IF ( kstp == (nit000 + 1) ) lk_agrif_fstep = .FALSE. 89 84 90 # if defined key_iomput 85 91 IF( Agrif_Nbstepint() == 0 ) CALL iom_swap( cxios_context ) … … 105 111 CALL bdy_dta ( kstp, time_offset=+1 ) ! update dynamic & tracer data at open boundaries 106 112 ENDIF 113 114 ! We must ensure that tsb halos are up to date on EVERY timestep. 115 DO tind = 1, jpts 116 CALL lbc_lnk( tsb(:,:,:,tind), 'T', 1. ) 117 END DO 118 107 119 CALL sbc ( kstp ) ! Sea Boundary Condition (including sea-ice) 108 120 ! clem: moved here for bdy ice purpose … … 110 122 ! Update stochastic parameters and random T/S fluctuations 111 123 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 112 CALL sto_par( kstp ) ! Stochastic parameters 124 IF( ln_sto_eos ) CALL sto_par( kstp ) ! Stochastic parameters 125 IF( ln_sto_eos ) CALL sto_pts( tsn ) ! Random T/S fluctuations 113 126 114 127 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 152 165 ! 153 166 IF( lk_ldfslp ) THEN ! slope of lateral mixing 154 IF(ln_sto_eos ) CALL sto_pts( tsn ) ! Random T/S fluctuations155 167 CALL eos( tsb, rhd, gdept_0(:,:,:) ) ! before in situ density 156 168 IF( ln_zps .AND. .NOT. ln_isfcav) & … … 188 200 ! Note that the computation of vertical velocity above, hence "after" sea level 189 201 ! is necessary to compute momentum advection for the rhs of barotropic loop: 190 IF(ln_sto_eos ) CALL sto_pts( tsn ) ! Random T/S fluctuations191 202 CALL eos ( tsn, rhd, rhop, fsdept_n(:,:,:) ) ! now in situ density for hpg computation 192 203 IF( ln_zps .AND. .NOT. ln_isfcav) & … … 200 211 ua(:,:,:) = 0.e0 ! set dynamics trends to zero 201 212 va(:,:,:) = 0.e0 202 IF( l n_asmiau .AND. &213 IF( lk_asminc .AND. ln_asmiau .AND. & 203 214 & ln_dyninc ) CALL dyn_asm_inc ( kstp ) ! apply dynamics assimilation increment 204 215 IF( ln_neptsimp ) CALL dyn_nept_cor ( kstp ) ! subtract Neptune velocities (simplified) … … 231 242 IF( lk_diaar5 ) CALL dia_ar5( kstp ) ! ar5 diag 232 243 IF( lk_diaharm ) CALL dia_harm( kstp ) ! Tidal harmonic analysis 244 CALL dia_prod( kstp ) ! ocean model: product diagnostics 233 245 CALL dia_wri( kstp ) ! ocean model: outputs 234 246 ! … … 248 260 tsa(:,:,:,:) = 0.e0 ! set tracer trends to zero 249 261 250 IF( l n_asmiau .AND. &262 IF( lk_asminc .AND. ln_asmiau .AND. & 251 263 & ln_trainc ) CALL tra_asm_inc( kstp ) ! apply tracer assimilation increment 252 264 CALL tra_sbc ( kstp ) ! surface boundary condition … … 270 282 IF( ln_zdfnpc ) CALL tra_npc( kstp ) ! update after fields by non-penetrative convection 271 283 CALL tra_nxt( kstp ) ! tracer fields at next time step 272 IF( ln_sto_eos ) CALL sto_pts( tsn ) ! Random T/S fluctuations273 284 CALL eos ( tsa, rhd, rhop, fsdept_n(:,:,:) ) ! Time-filtered in situ density for hpg computation 274 285 IF( ln_zps .AND. .NOT. ln_isfcav) & … … 281 292 ELSE ! centered hpg (eos then time stepping) 282 293 IF ( .NOT. lk_dynspg_ts ) THEN ! eos already called in time-split case 283 IF( ln_sto_eos ) CALL sto_pts( tsn ) ! Random T/S fluctuations284 294 CALL eos ( tsn, rhd, rhop, fsdept_n(:,:,:) ) ! now in situ density for hpg computation 285 295 IF( ln_zps .AND. .NOT. ln_isfcav) & … … 314 324 va(:,:,:) = 0.e0 315 325 316 IF( l n_asmiau .AND. &326 IF( lk_asminc .AND. ln_asmiau .AND. & 317 327 & ln_dyninc ) CALL dyn_asm_inc( kstp ) ! apply dynamics assimilation increment 318 328 IF( ln_bkgwri ) CALL asm_bkg_wri( kstp ) ! output background fields … … 335 345 CALL ssh_swp( kstp ) ! swap of sea surface height 336 346 IF( lk_vvl ) CALL dom_vvl_sf_swp( kstp ) ! swap of vertical scale factors 337 347 ! 348 IF( lrst_oce ) CALL rst_write( kstp ) ! write output ocean restart file 349 IF( ln_sto_eos ) CALL sto_rst_write( kstp ) ! write restart file for stochastic parameters 350 351 #if defined key_agrif 352 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 353 ! AGRIF 354 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 355 CALL Agrif_Integrate_ChildGrids( stp ) 356 357 IF ( Agrif_NbStepint().EQ.0 ) THEN 358 CALL Agrif_Update_Tra() ! Update active tracers 359 CALL Agrif_Update_Dyn() ! Update momentum 360 ENDIF 361 #endif 338 362 IF( ln_diahsb ) CALL dia_hsb( kstp ) ! - ML - global conservation diagnostics 339 363 IF( lk_diaobs ) CALL dia_obs( kstp ) ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 340 364 341 365 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 342 ! Control and restarts366 ! Control 343 367 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 344 368 CALL stp_ctl( kstp, indic ) … … 352 376 IF( lwm.AND.numoni /= -1 ) CALL FLUSH ( numoni ) ! flush output namelist ice 353 377 ENDIF 354 IF( lrst_oce ) CALL rst_write ( kstp ) ! write output ocean restart file355 378 356 379 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 357 380 ! Coupled mode 358 381 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 359 IF( lk_oasis ) CALL sbc_cpl_snd( kstp ) ! coupled mode : field exchanges382 !IF( lk_oasis ) CALL sbc_cpl_snd( kstp ) ! coupled mode : field exchanges 360 383 ! 361 384 #if defined key_iomput … … 367 390 ! 368 391 IF( nn_timing == 1 .AND. kstp == nit000 ) CALL timing_reset 392 ! 369 393 ! 370 394 END SUBROUTINE stp
Note: See TracChangeset
for help on using the changeset viewer.