- Timestamp:
- 2018-10-29T15:20:26+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_AMM15_package/NEMOGCM/NEMO/OPA_SRC/step.F90
r10249 r10251 50 50 51 51 #if defined key_agrif 52 RECURSIVESUBROUTINE stp( )52 SUBROUTINE stp( ) 53 53 INTEGER :: kstp ! ocean time-step index 54 54 #else … … 79 79 #if defined key_agrif 80 80 kstp = nit000 + Agrif_Nb_Step() 81 IF ( lk_agrif_debug ) THEN 82 IF ( Agrif_Root() .and. lwp) Write(*,*) '---' 83 IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp, 'int tstep',Agrif_NbStepint() 84 ENDIF 85 81 ! IF ( Agrif_Root() .and. lwp) Write(*,*) '---' 82 ! IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp 86 83 IF ( kstp == (nit000 + 1) ) lk_agrif_fstep = .FALSE. 87 88 84 # if defined key_iomput 89 85 IF( Agrif_Nbstepint() == 0 ) CALL iom_swap( cxios_context ) … … 114 110 ! Update stochastic parameters and random T/S fluctuations 115 111 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 116 IF( ln_sto_eos ) CALL sto_par( kstp ) ! Stochastic parameters 117 IF( ln_sto_eos ) CALL sto_pts( tsn ) ! Random T/S fluctuations 112 CALL sto_par( kstp ) ! Stochastic parameters 118 113 119 114 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 157 152 ! 158 153 IF( lk_ldfslp ) THEN ! slope of lateral mixing 154 IF(ln_sto_eos ) CALL sto_pts( tsn ) ! Random T/S fluctuations 159 155 CALL eos( tsb, rhd, gdept_0(:,:,:) ) ! before in situ density 160 156 IF( ln_zps .AND. .NOT. ln_isfcav) & … … 192 188 ! Note that the computation of vertical velocity above, hence "after" sea level 193 189 ! is necessary to compute momentum advection for the rhs of barotropic loop: 190 IF(ln_sto_eos ) CALL sto_pts( tsn ) ! Random T/S fluctuations 194 191 CALL eos ( tsn, rhd, rhop, fsdept_n(:,:,:) ) ! now in situ density for hpg computation 195 192 IF( ln_zps .AND. .NOT. ln_isfcav) & … … 203 200 ua(:,:,:) = 0.e0 ! set dynamics trends to zero 204 201 va(:,:,:) = 0.e0 205 IF( l k_asminc .AND. ln_asmiau .AND. &202 IF( ln_asmiau .AND. & 206 203 & ln_dyninc ) CALL dyn_asm_inc ( kstp ) ! apply dynamics assimilation increment 207 204 IF( ln_neptsimp ) CALL dyn_nept_cor ( kstp ) ! subtract Neptune velocities (simplified) … … 225 222 ENDIF 226 223 227 ! Cool skin228 IF ( ln_diurnal ) THEN229 IF ( ln_blk_core ) THEN230 CALL diurnal_sst_coolskin_step( &231 qns(:,:)+(rn_abs*qsr(:,:)), taum, rhop(:,:,1), rdt)232 ELSE233 CALL diurnal_sst_coolskin_step( &234 qns, taum, rhop(:,:,1), rdt)235 ENDIF236 ENDIF237 238 224 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 239 225 ! diagnostics and outputs (ua, va, tsa used as workspace) … … 249 235 IF( ln_crs ) CALL crs_fld( kstp ) ! ocean model: online field coarsening & output 250 236 251 !Diurnal warm layer model252 IF ( ln_diurnal ) THEN253 IF ( ln_blk_core ) THEN254 IF( kstp == nit000 )THEN255 CALL diurnal_sst_takaya_step( &256 & qsr(:,:)-(rn_abs*qsr(:,:)), qns(:,:)+(rn_abs*qsr(:,:)), &257 & taum, rhop(:,:,1), &258 & rdt, ld_calcfrac = .TRUE.)259 ELSE260 CALL diurnal_sst_takaya_step( &261 & qsr(:,:)-(rn_abs*qsr(:,:)), qns(:,:)+(rn_abs*qsr(:,:)), &262 & taum, rhop(:,:,1), rdt )263 ENDIF264 ELSE265 IF( kstp == nit000 )THEN266 CALL diurnal_sst_takaya_step( &267 & qsr, qns, taum, rhop(:,:,1), &268 & rdt, ld_calcfrac = .TRUE.)269 ELSE270 CALL diurnal_sst_takaya_step( &271 & qsr, qns, taum, rhop(:,:,1), rdt )272 ENDIF273 ENDIF274 ENDIF275 276 237 #if defined key_top 277 238 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 287 248 tsa(:,:,:,:) = 0.e0 ! set tracer trends to zero 288 249 289 IF( l k_asminc .AND. ln_asmiau .AND. &250 IF( ln_asmiau .AND. & 290 251 & ln_trainc ) CALL tra_asm_inc( kstp ) ! apply tracer assimilation increment 291 252 CALL tra_sbc ( kstp ) ! surface boundary condition 292 253 IF( ln_traqsr ) CALL tra_qsr ( kstp ) ! penetrative solar radiation qsr 293 IF( ln_tradwl ) CALL tra_dwl ( kstp ) ! Polcoms Style Short Wave Radiation294 254 IF( ln_trabbc ) CALL tra_bbc ( kstp ) ! bottom heat flux 295 255 IF( lk_trabbl ) CALL tra_bbl ( kstp ) ! advective (and/or diffusive) bottom boundary layer scheme … … 310 270 IF( ln_zdfnpc ) CALL tra_npc( kstp ) ! update after fields by non-penetrative convection 311 271 CALL tra_nxt( kstp ) ! tracer fields at next time step 272 IF( ln_sto_eos ) CALL sto_pts( tsn ) ! Random T/S fluctuations 312 273 CALL eos ( tsa, rhd, rhop, fsdept_n(:,:,:) ) ! Time-filtered in situ density for hpg computation 313 274 IF( ln_zps .AND. .NOT. ln_isfcav) & … … 320 281 ELSE ! centered hpg (eos then time stepping) 321 282 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 fluctuations 322 284 CALL eos ( tsn, rhd, rhop, fsdept_n(:,:,:) ) ! now in situ density for hpg computation 323 285 IF( ln_zps .AND. .NOT. ln_isfcav) & … … 336 298 ! Dynamics (tsa used as workspace) 337 299 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 338 339 IF( ln_bkgwri ) CALL asm_bkg_wri( kstp ) ! output background fields340 341 300 IF( lk_dynspg_ts ) THEN 342 301 ! revert to previously computed momentum tendencies … … 355 314 va(:,:,:) = 0.e0 356 315 357 IF( l k_asminc .AND. ln_asmiau .AND. &316 IF( ln_asmiau .AND. & 358 317 & ln_dyninc ) CALL dyn_asm_inc( kstp ) ! apply dynamics assimilation increment 318 IF( ln_bkgwri ) CALL asm_bkg_wri( kstp ) ! output background fields 359 319 IF( ln_neptsimp ) CALL dyn_nept_cor( kstp ) ! subtract Neptune velocities (simplified) 360 320 IF( lk_bdy ) CALL bdy_dyn3d_dmp(kstp ) ! bdy damping trends … … 376 336 IF( lk_vvl ) CALL dom_vvl_sf_swp( kstp ) ! swap of vertical scale factors 377 337 378 #if defined key_agrif379 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>380 ! AGRIF381 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<382 CALL Agrif_Integrate_ChildGrids( stp )383 384 IF ( Agrif_NbStepint().EQ.0 ) THEN385 CALL Agrif_Update_Tra() ! Update active tracers386 CALL Agrif_Update_Dyn() ! Update momentum387 ENDIF388 #endif389 338 IF( ln_diahsb ) CALL dia_hsb( kstp ) ! - ML - global conservation diagnostics 390 339 IF( lk_diaobs ) CALL dia_obs( kstp ) ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 391 340 392 341 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 393 ! Control 342 ! Control and restarts 394 343 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 395 344 CALL stp_ctl( kstp, indic ) … … 398 347 CALL dia_wri_state( 'output.abort', kstp ) 399 348 ENDIF 400 IF( ln_harm_ana_store ) CALL harm_ana( kstp ) ! Harmonic analysis of tides401 349 IF( kstp == nit000 ) THEN 402 350 CALL iom_close( numror ) ! close input ocean restart file … … 419 367 ! 420 368 IF( nn_timing == 1 .AND. kstp == nit000 ) CALL timing_reset 421 !422 369 ! 423 370 END SUBROUTINE stp
Note: See TracChangeset
for help on using the changeset viewer.