Changeset 14072 for NEMO/trunk/src/OCE/step.F90
- Timestamp:
- 2020-12-04T08:48:38+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/step.F90
r14053 r14072 27 27 !! 3.6 ! 2014-04 (F. Roquet, G. Madec) New equations of state 28 28 !! 3.6 ! 2014-10 (E. Clementi, P. Oddo) Add Qiao vertical mixing in case of waves 29 !! 3.7 ! 2014-10 (G. Madec) LDF simplication 29 !! 3.7 ! 2014-10 (G. Madec) LDF simplication 30 30 !! - ! 2014-12 (G. Madec) remove KPP scheme 31 31 !! - ! 2015-11 (J. Chanut) free surface simplification (remove filtered free surface) … … 109 109 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 110 110 ! 111 IF( l_1st_euler ) THEN 111 IF( l_1st_euler ) THEN 112 112 ! start or restart with Euler 1st time-step 113 rDt = rn_Dt 113 rDt = rn_Dt 114 114 r1_Dt = 1._wp / rDt 115 115 ENDIF 116 116 ! 117 117 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 118 ! update I/O and calendar 118 ! update I/O and calendar 119 119 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 120 120 IF( kstp == nit000 ) THEN ! initialize IOM context (must be done after nemo_init for AGRIF+XIOS+OASIS) … … 149 149 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 150 150 IF( ln_tide ) CALL tide_update( kstp ) ! update tide potential 151 IF( ln_apr_dyn ) CALL sbc_apr ( kstp ) ! atmospheric pressure (NB: call before bdy_dta which needs ssh_ib) 151 IF( ln_apr_dyn ) CALL sbc_apr ( kstp ) ! atmospheric pressure (NB: call before bdy_dta which needs ssh_ib) 152 152 IF( ln_bdy ) CALL bdy_dta ( kstp, Nnn ) ! update dynamic & tracer data at open boundaries 153 153 IF( ln_isf ) CALL isf_stp ( kstp, Nnn ) … … 184 184 & CALL zps_hde_isf( kstp, Nnn, jpts, ts(:,:,:,:,Nbb), gtsu, gtsv, gtui, gtvi, & ! Partial steps for top cell (ISF) 185 185 & rhd, gru , grv , grui, grvi ) ! of t, s, rd at the first ocean level 186 IF( ln_traldf_triad ) THEN 186 IF( ln_traldf_triad ) THEN 187 187 CALL ldf_slp_triad( kstp, Nbb, Nnn ) ! before slope for triad operator 188 ELSE 188 ELSE 189 189 CALL ldf_slp ( kstp, rhd, rn2b, Nbb, Nnn ) ! before slope for standard operator 190 190 ENDIF … … 192 192 ! ! eddy diffusivity coeff. 193 193 IF( l_ldftra_time .OR. l_ldfeiv_time ) CALL ldf_tra( kstp, Nbb, Nnn ) ! and/or eiv coeff. 194 IF( l_ldfdyn_time ) CALL ldf_dyn( kstp, Nbb ) ! eddy viscosity coeff. 194 IF( l_ldfdyn_time ) CALL ldf_dyn( kstp, Nbb ) ! eddy viscosity coeff. 195 195 196 196 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 199 199 200 200 CALL ssh_nxt ( kstp, Nbb, Nnn, ssh, Naa ) ! after ssh (includes call to div_hor) 201 IF( .NOT.ln_linssh ) CALL dom_vvl_sf_nxt( kstp, Nbb, Nnn, Naa ) ! after vertical scale factors 202 CALL wzv ( kstp, Nbb, Nnn, Naa, ww ) ! now cross-level velocity 201 IF( .NOT.ln_linssh ) CALL dom_vvl_sf_nxt( kstp, Nbb, Nnn, Naa ) ! after vertical scale factors 202 CALL wzv ( kstp, Nbb, Nnn, Naa, ww ) ! now cross-level velocity 203 203 IF( ln_zad_Aimp ) CALL wAimp ( kstp, Nnn ) ! Adaptive-implicit vertical advection partitioning 204 204 CALL eos ( ts(:,:,:,:,Nnn), rhd, rhop, gdept(:,:,:,Nnn) ) ! now in situ density for hpg computation 205 206 205 206 207 207 uu(:,:,:,Nrhs) = 0._wp ! set dynamics trends to zero 208 208 vv(:,:,:,Nrhs) = 0._wp … … 212 212 IF( ln_bdy ) CALL bdy_dyn3d_dmp ( kstp, Nbb, uu, vv, Nrhs ) ! bdy damping trends 213 213 #if defined key_agrif 214 IF(.NOT. Agrif_Root()) & 214 IF(.NOT. Agrif_Root()) & 215 215 & CALL Agrif_Sponge_dyn ! momentum sponge 216 216 #endif … … 229 229 CALL dyn_zdf ( kstp, Nbb, Nnn, Nrhs, uu, vv, Naa ) ! vertical diffusion 230 230 IF( ln_dynspg_ts ) THEN ! vertical scale factors and vertical velocity need to be updated 231 CALL wzv ( kstp, Nbb, Nnn, Naa, ww ) ! now cross-level velocity 231 CALL wzv ( kstp, Nbb, Nnn, Naa, ww ) ! now cross-level velocity 232 232 IF( ln_zad_Aimp ) CALL wAimp ( kstp, Nnn ) ! Adaptive-implicit vertical advection partitioning 233 233 ENDIF 234 234 235 235 236 236 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 237 237 ! cool skin 238 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 238 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 239 239 IF ( ln_diurnal ) CALL diurnal_layers( kstp ) 240 240 241 241 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 242 242 ! diagnostics and outputs … … 252 252 IF( lk_diadetide ) CALL dia_detide( kstp ) ! Weights computation for daily detiding of model diagnostics 253 253 IF( lk_diamlr ) CALL dia_mlr ! Update time used in multiple-linear-regression analysis 254 254 255 255 #if defined key_top 256 256 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 261 261 262 262 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 263 ! Active tracers 263 ! Active tracers 264 264 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 265 265 ! Loop over tile domains … … 294 294 295 295 CALL tra_adv ( kstp, Nbb, Nnn, ts, Nrhs ) ! hor. + vert. advection ==> RHS 296 IF( ln_zdfmfc ) CALL tra_mfc ( kstp, Nbb, ts, Nrhs ) ! Mass Flux Convection 296 IF( ln_zdfmfc ) CALL tra_mfc ( kstp, Nbb, ts, Nrhs ) ! Mass Flux Convection 297 297 IF( ln_zdfosm ) CALL tra_osm ( kstp, Nnn, ts, Nrhs ) ! OSMOSIS non-local tracer fluxes ==> RHS 298 298 IF( lrst_oce .AND. ln_zdfosm ) & … … 308 308 ! Set boundary conditions, time filter and swap time levels 309 309 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 310 !!jc1: For agrif, it would be much better to finalize tracers/momentum here (e.g. bdy conditions) and move the swap 311 !! (and time filtering) after Agrif update. Then restart would be done after and would contain updated fields. 312 !! If so: 310 !!jc1: For agrif, it would be much better to finalize tracers/momentum here (e.g. bdy conditions) and move the swap 311 !! (and time filtering) after Agrif update. Then restart would be done after and would contain updated fields. 312 !! If so: 313 313 !! (i) no need to call agrif update at initialization time 314 !! (ii) no need to update "before" fields 314 !! (ii) no need to update "before" fields 315 315 !! 316 !! Apart from creating new tra_swp/dyn_swp routines, this however: 317 !! (i) makes boundary conditions at initialization time computed from updated fields which is not the case between 318 !! two restarts => restartability issue. One can circumvent this, maybe, by assuming "interface separation", 319 !! e.g. a shift of the feedback interface inside child domain. 316 !! Apart from creating new tra_swp/dyn_swp routines, this however: 317 !! (i) makes boundary conditions at initialization time computed from updated fields which is not the case between 318 !! two restarts => restartability issue. One can circumvent this, maybe, by assuming "interface separation", 319 !! e.g. a shift of the feedback interface inside child domain. 320 320 !! (ii) requires that all restart outputs of updated variables by agrif (e.g. passive tracers/tke/barotropic arrays) are done at the same 321 321 !! place. 322 !! 322 !! 323 323 !!jc2: dynnxt must be the latest call. e3t(:,:,:,Nbb) are indeed updated in that routine 324 324 CALL tra_atf ( kstp, Nbb, Nnn, Naa, ts ) ! time filtering of "now" tracer arrays … … 347 347 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 348 348 ! AGRIF recursive integration 349 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 349 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 350 350 Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs ! agrif_oce module copies of time level indices 351 351 CALL Agrif_Integrate_ChildGrids( stp ) ! allows to finish all the Child Grids before updating … … 360 360 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 361 361 ! AGRIF update 362 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 362 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 363 363 IF( Agrif_NbStepint() == 0 .AND. nstop == 0 ) THEN 364 364 CALL Agrif_update_all( ) ! Update all components … … 370 370 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 371 371 ! File manipulation at the end of the first time step 372 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 372 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 373 373 IF( kstp == nit000 ) THEN ! 1st time step only 374 374 CALL iom_close( numror ) ! close input ocean restart file … … 386 386 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 387 387 ! Finalize contextes if end of simulation or error detected 388 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 389 IF( kstp == nitend .OR. nstop > 0 ) THEN 388 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 389 IF( kstp == nitend .OR. nstop > 0 ) THEN 390 390 CALL iom_context_finalize( cxios_context ) ! needed for XIOS+AGRIF 391 IF( ln_crs ) CALL iom_context_finalize( trim(cxios_context)//"_crs" ) ! 391 IF( ln_crs ) CALL iom_context_finalize( trim(cxios_context)//"_crs" ) ! 392 392 ENDIF 393 393 #endif 394 394 ! 395 395 IF( l_1st_euler ) THEN ! recover Leap-frog timestep 396 rDt = 2._wp * rn_Dt 396 rDt = 2._wp * rn_Dt 397 397 r1_Dt = 1._wp / rDt 398 l_1st_euler = .FALSE. 398 l_1st_euler = .FALSE. 399 399 ENDIF 400 400 !
Note: See TracChangeset
for help on using the changeset viewer.