Changeset 467 for trunk/NEMO/OPA_SRC/step.F90
- Timestamp:
- 2006-05-10T19:44:38+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/step.F90
r445 r467 4 4 !! Time-stepping : manager of the ocean, tracer and ice time stepping 5 5 !!====================================================================== 6 6 !! History : 7 !! ! 91-03 () Original code 8 !! ! 91-11 (G. Madec) 9 !! ! 92-06 (M. Imbard) add a first output record 10 !! ! 96-04 (G. Madec) introduction of dynspg 11 !! ! 96-04 (M.A. Foujols) introduction of passive tracer 12 !! 8.0 ! 97-06 (G. Madec) new architecture of call 13 !! 8.2 ! 97-06 (G. Madec, M. Imbard, G. Roullet) free surface 14 !! 8.2 ! 99-02 (G. Madec, N. Grima) hpg implicit 15 !! 8.2 ! 00-07 (J-M Molines, M. Imbard) Open Bondary Conditions 16 !! 9.0 ! 02-06 (G. Madec) free form, suppress macro-tasking 17 !! " ! 04-08 (C. Talandier) New trends organization 18 !! " ! 05-01 (C. Ethe) Add the KPP closure scheme 19 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization 20 !! " ! 05-11 (G. Madec) Reorganisation of tra and dyn calls 7 21 !!---------------------------------------------------------------------- 8 22 !! stp : OPA system time-stepping … … 12 26 USE dom_oce ! ocean space and time domain variables 13 27 USE zdf_oce ! ocean vertical physics variables 14 USE ldftra_oce 15 USE ldfdyn_oce 28 USE ldftra_oce ! ocean tracer - trends 29 USE ldfdyn_oce ! ocean dynamics - trends 16 30 USE cpl_oce ! coupled ocean-atmosphere variables 17 31 USE in_out_manager ! I/O manager … … 34 48 USE trcstp ! passive tracer time-stepping (trc_stp routine) 35 49 36 USE dynhpg ! hydrostatic pressure grad. (dyn_hpg routine) 37 USE dynhpg_atsk ! hydrostatic pressure grad. (dyn_hpg_atsk routine) 38 USE dynspg_oce ! surface pressure gradient (dyn_spg routine) 39 USE dynspg ! surface pressure gradient (dyn_spg routine) 40 USE dynkeg ! kinetic energy gradient (dyn_keg routine) 41 USE dynvor ! vorticity term (dyn_vor_... routines) 42 USE dynzad ! vertical advection (dyn_adv routine) 43 USE dynldf_bilapg ! lateral mixing (dyn_ldf_bilapg routine) 44 USE dynldf_bilap ! lateral mixing (dyn_ldf_bilap routine) 45 USE dynldf_iso ! lateral mixing (dyn_ldf_iso routine) 46 USE dynldf_lap ! lateral mixing (dyn_ldf_lap routine) 47 USE dynzdf_imp ! vertical diffusion: implicit (dyn_zdf routine) 48 USE dynzdf_imp_atsk ! vertical diffusion: implicit (dyn_zdf routine) 49 USE dynzdf_iso ! vertical diffusion: isopycnal (dyn_zdf routine) 50 USE dynzdf_exp ! vertical diffusion: explicit (dyn_zdf_exp routine) 51 USE dynnxt ! time-stepping (dyn_nxt routine) 52 50 USE traqsr ! solar radiation penetration (tra_qsr routine) 51 USE trasbc ! surface boundary condition (tra_sbc routine) 53 52 USE trabbc ! bottom boundary condition (tra_bbc routine) 54 53 USE trabbl ! bottom boundary layer (tra_bbl routine) 55 54 USE tradmp ! internal damping (tra_dmp routine) 56 USE tra ldf_bilapg ! lateral mixing (tra_ldf_bilapgroutine)57 USE traldf _bilap ! lateral mixing (tra_ldf_bilaproutine)58 USE traldf_iso ! lateral mixing (tra_ldf_isoroutine)59 USE traldf_iso_zps ! lateral mixing (tra_ldf_iso_zpsroutine)60 USE tra ldf_lap ! lateral mixing (tra_ldf_laproutine)61 USE tra qsr ! solar radiation penetration (tra_qsrroutine)55 USE traadv ! advection scheme control (tra_adv_ctl routine) 56 USE traldf ! lateral mixing (tra_ldf routine) 57 USE cla ! cross land advection (tra_cla routine) 58 ! zdfkpp ! KPP non-local tracer fluxes (tra_kpp routine) 59 USE trazdf ! vertical mixing (tra_zdf routine) 60 USE tranxt ! time-stepping (tra_nxt routine) 62 61 USE tranpc ! non-penetrative convection (tra_npc routine) 63 USE tranxt ! time-stepping (tra_nxt routine)64 USE traadv_ctl ! advection scheme control (tra_adv_ctl routine)65 USE traadv_cen2 ! 2nd order centered scheme (tra_adv_cen2 routine)66 USE traadv_tvd ! TVD scheme (tra_adv_tvd routine)67 USE traadv_muscl ! MUSCL scheme (tra_adv_muscl routine)68 USE traadv_muscl2 ! MUSCL2 scheme (tra_adv_muscl2 routine)69 USE cla ! cross land advection (tra_cla routine)70 USE trazdf_exp ! vertical diffusion: explicit (tra_zdf_exp routine)71 USE trazdf_imp ! vertical diffusion: implicit (tra_zdf_imp routine)72 USE trazdf_iso ! vertical diffusion (tra_zdf_exp routine)73 USE trazdf_iso_vopt ! vertical diffusion (tra_zdf_exp routine)74 USE trasbc ! surface boundary condition (tra_sbc routine)75 62 76 63 USE eosbn2 ! equation of state (eos_bn2 routine) 64 65 USE dynhpg ! hydrostatic pressure grad. (dyn_hpg routine) 66 USE dynkeg ! kinetic energy gradient (dyn_keg routine) 67 USE dynvor ! vorticity term (dyn_vor routine) 68 USE dynzad ! vertical advection (dyn_adv routine) 69 USE dynldf ! lateral momentum diffusion (dyn_ldf routine) 70 USE dynzdf ! vertical diffusion (dyn_zdf routine) 71 USE dynspg_oce ! surface pressure gradient (dyn_spg routine) 72 USE dynspg ! surface pressure gradient (dyn_spg routine) 73 USE dynnxt ! time-stepping (dyn_nxt routine) 77 74 78 75 USE obc_par ! open boundary condition variables … … 91 88 USE zdfbfr ! bottom friction (zdf_bfr routine) 92 89 USE zdftke ! TKE vertical mixing (zdf_tke routine) 90 USE zdftke_jki ! TKE vertical mixing (zdf_tke routine) 93 91 USE zdfkpp ! KPP vertical mixing (zdf_kpp routine) 94 92 USE zdfddm ! double diffusion mixing (zdf_ddm routine) … … 140 138 CONTAINS 141 139 142 SUBROUTINE stp( &143 140 #if !defined key_agrif 144 kstp & 145 #endif 146 ) !!---------------------------------------------------------------------- 141 SUBROUTINE stp( kstp ) 142 #else 143 SUBROUTINE stp( ) 144 #endif 145 !!---------------------------------------------------------------------- 147 146 !! *** ROUTINE stp *** 148 147 !! … … 160 159 !! -8- Outputs and diagnostics 161 160 !! 162 !! History :163 !! ! 91-03 () Original code164 !! ! 91-11 (G. Madec)165 !! ! 92-06 (M. Imbard) add a first output record166 !! ! 96-04 (G. Madec) introduction of dynspg167 !! ! 96-04 (M.A. Foujols) introduction of passive tracer168 !! 8.0 ! 97-06 (G. Madec) new architecture of call169 !! 8.2 ! 97-06 (G. Madec, M. Imbard, G. Roullet) free surface170 !! 8.2 ! 99-02 (G. Madec, N. Grima) hpg implicit171 !! 8.2 ! 00-07 (J-M Molines, M. Imbard) Open Bondary Conditions172 !! 9.0 ! 02-06 (G. Madec) free form, suppress macro-tasking173 !! " ! 04-08 (C. Talandier) New trends organization174 !! " ! 05-01 (C. Ethe) Add the KPP closure scheme175 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization176 161 !!---------------------------------------------------------------------- 177 162 !! * Arguments 178 INTEGER &179 163 #if !defined key_agrif 180 , INTENT( in ) & 164 INTEGER, INTENT( in ) :: kstp ! ocean time-step index 165 #else 166 INTEGER :: kstp ! ocean time-step index 181 167 #endif 182 :: kstp ! ocean time-step index183 168 184 169 !! * local declarations … … 206 191 IF( lk_dtasst ) CALL dta_sst( kstp ) ! Sea Surface Temperature data 207 192 208 IF( lk_dtasss ) CALL dta_sss( kstp ) ! Sea Surface salinity data193 IF( lk_dtasss ) CALL dta_sss( kstp ) ! Sea Surface Salinity data 209 194 210 195 IF( lk_obc ) CALL obc_dta( kstp ) ! update dynamic and tracer data at open boundaries … … 258 243 ! ! Vertical eddy viscosity and diffusivity coefficients 259 244 IF( lk_zdfric ) CALL zdf_ric( kstp ) ! Richardson number dependent Kz 245 #if defined key_mpp_omp 246 IF( lk_zdftke ) CALL zdf_tke_jki( kstp ) ! TKE closure scheme for Kz - j-k-i loops 247 #else 260 248 IF( lk_zdftke ) CALL zdf_tke( kstp ) ! TKE closure scheme for Kz 249 #endif 261 250 IF( lk_zdfkpp ) CALL zdf_kpp( kstp ) ! KPP closure scheme for Kz 251 262 252 IF( lk_zdfcst ) avt (:,:,:) = avt0 * tmask(:,:,:) ! Constant Kz (reset avt to the background value) 263 253 … … 266 256 CASE ( 05 ) ! ORCA R2 configuration 267 257 avt (:,:,2) = avt (:,:,2) + 1.e-3 * upsrnfh(:,:) ! increase diffusivity of rivers mouths 258 CASE ( 025 ) ! ORCA R025 configuration 259 avt (:,:,2) = avt (:,:,2) + 2.e-3 * upsrnfh(:,:) ! increase diffusivity of rivers mouths 268 260 END SELECT 269 261 ENDIF … … 310 302 !----------------------------------------------------------------------- 311 303 312 ta(:,:,:) = 0.e0 ! set tracer trends to zero 313 sa(:,:,:) = 0.e0 314 315 CALL tra_sbc( kstp ) ! surface boundary condition 316 317 IF( ln_traqsr ) CALL tra_qsr( kstp ) ! penetrative solar radiation qsr 318 319 IF( lk_trabbc ) CALL tra_bbc( kstp ) ! bottom heat flux 320 321 IF( lk_trabbl_dif ) CALL tra_bbl_dif( kstp ) ! diffusive bottom boundary layer scheme 322 IF( lk_trabbl_adv ) CALL tra_bbl_adv( kstp ) ! advective (and/or diffusive) bottom boundary layer scheme 323 324 IF( lk_tradmp ) CALL tra_dmp( kstp ) ! internal damping trends 325 326 ! ! horizontal & vertical advection 327 IF( kstp == nit000 ) CALL tra_adv_ctl ! chose/control the scheme used 328 IF( ln_traadv_cen2 ) CALL tra_adv_cen2 ( kstp ) ! 2nd order centered scheme 329 IF( ln_traadv_tvd ) CALL tra_adv_tvd ( kstp ) ! TVD scheme 330 IF( ln_traadv_muscl ) CALL tra_adv_muscl ( kstp ) ! MUSCL scheme 331 IF( ln_traadv_muscl2 ) CALL tra_adv_muscl2( kstp ) ! MUSCL2 scheme 332 333 IF( n_cla == 1 ) CALL tra_cla( kstp ) ! Cross Land Advection (Update Hor. advection) 334 335 ! ! lateral mixing 336 IF( l_traldf_lap ) CALL tra_ldf_lap ( kstp ) ! iso-level laplacian 337 IF( l_traldf_bilap ) CALL tra_ldf_bilap ( kstp ) ! iso-level bilaplacian 338 IF( l_traldf_bilapg ) CALL tra_ldf_bilapg ( kstp ) ! s-coord. horizontal bilaplacian 339 IF( l_traldf_iso ) CALL tra_ldf_iso ( kstp ) ! iso-neutral/geopot. laplacian 340 IF( l_traldf_iso_zps ) CALL tra_ldf_iso_zps( kstp ) ! partial step iso-neutral/geopot. laplacian 341 304 ta(:,:,:) = 0.e0 ! set tracer trends to zero 305 sa(:,:,:) = 0.e0 306 307 CALL tra_sbc ( kstp ) ! surface boundary condition 308 309 IF( ln_traqsr ) CALL tra_qsr ( kstp ) ! penetrative solar radiation qsr 310 311 IF( lk_trabbc ) CALL tra_bbc ( kstp ) ! bottom heat flux 312 313 IF( lk_trabbl_dif ) CALL tra_bbl_dif( kstp ) ! diffusive bottom boundary layer scheme 314 IF( lk_trabbl_adv ) CALL tra_bbl_adv( kstp ) ! advective (and/or diffusive) bottom boundary layer scheme 315 316 IF( lk_tradmp ) CALL tra_dmp ( kstp ) ! internal damping trends 317 318 CALL tra_adv ( kstp ) ! horizontal & vertical advection 319 320 IF( n_cla == 1 ) CALL tra_cla ( kstp ) ! Cross Land Advection (Update Hor. advection) 321 322 IF( lk_zdfkpp ) CALL tra_kpp ( kstp ) ! KPP non-local tracer fluxes 323 324 CALL tra_ldf ( kstp ) ! lateral mixing 342 325 #if defined key_agrif 343 326 IF (.NOT. Agrif_Root()) CALL Agrif_Sponge_tra( kstp ) ! tracers sponge 344 327 #endif 345 ! ! vertical diffusion 346 IF( l_trazdf_exp ) CALL tra_zdf_exp ( kstp ) ! explicit time stepping (time splitting scheme) 347 IF( l_trazdf_imp ) CALL tra_zdf_imp ( kstp ) ! implicit time stepping (euler backward) 348 IF( l_trazdf_iso ) CALL tra_zdf_iso ( kstp ) ! isopycnal 349 IF( l_trazdf_iso_vo ) CALL tra_zdf_iso_vopt( kstp ) ! vector opt. isopycnal 350 351 CALL tra_nxt( kstp ) ! tracer fields at next time step 352 353 IF( ln_zdfnpc ) CALL tra_npc( kstp ) ! update the new (t,s) fields by non 354 ! ! penetrative convective adjustment 355 356 IF( ln_dynhpg_imp ) THEN ! semi-implicit hpg 357 CALL eos( ta, sa, rhd, rhop ) ! Time-filtered in situ density used in dynhpg module 358 IF( lk_zps ) CALL zps_hde( kstp, ta, sa, rhd, & ! Partial steps: time filtered hor. gradient 359 & gtu, gsu, gru, & ! of t, s, rd at the bottom ocean level 360 & gtv, gsv, grv ) 361 ELSE ! centered hpg (default case) 362 CALL eos( tb, sb, rhd, rhop ) ! now (swap=before) in situ density for dynhpg module 363 IF( lk_zps ) CALL zps_hde( kstp, tb, sb, rhd, & ! Partial steps: now horizontal gradient 364 & gtu, gsu, gru, & ! of t, s, rd at the bottom ocean level 365 & gtv, gsv, grv ) 328 CALL tra_zdf ( kstp ) ! vertical mixing 329 330 CALL tra_nxt( kstp ) ! tracer fields at next time step 331 332 IF( ln_zdfnpc ) CALL tra_npc( kstp ) ! update the new (t,s) fields by non 333 ! ! penetrative convective adjustment 334 335 IF( ln_dynhpg_imp ) THEN ! semi-implicit hpg 336 CALL eos( ta, sa, rhd, rhop ) ! Time-filtered in situ density used in dynhpg module 337 IF( ln_zps ) CALL zps_hde( kstp, ta, sa, rhd, & ! Partial steps: time filtered hor. gradient 338 & gtu, gsu, gru, & ! of t, s, rd at the bottom ocean level 339 & gtv, gsv, grv ) 340 ELSE ! centered hpg (default case) 341 CALL eos( tb, sb, rhd, rhop ) ! now (swap=before) in situ density for dynhpg module 342 IF( ln_zps ) CALL zps_hde( kstp, tb, sb, rhd, & ! Partial steps: now horizontal gradient 343 & gtu, gsu, gru, & ! of t, s, rd at the bottom ocean level 344 & gtv, gsv, grv ) 366 345 ENDIF 367 346 … … 371 350 ! N.B. ta, sa arrays are used as workspace in this section 372 351 !----------------------------------------------------------------------- 352 373 353 374 354 ua(:,:,:) = 0.e0 ! set dynamics trends to zero … … 377 357 CALL dyn_keg( kstp ) ! horizontal gradient of kinetic energy 378 358 379 ! ! vorticity term including Coriolis 380 IF( kstp == nit000 ) CALL dyn_vor_ctl ! chose/control the scheme used 381 IF( ln_dynvor_ens ) CALL dyn_vor_enstrophy( kstp ) ! enstrophy conserving scheme 382 IF( ln_dynvor_ene ) CALL dyn_vor_energy ( kstp ) ! energy conserving scheme 383 IF( ln_dynvor_mix ) CALL dyn_vor_mixed ( kstp ) ! mixed energy/enstrophy conserving scheme 384 IF( ln_dynvor_een ) CALL dyn_vor_ene_ens ( kstp ) ! combined energy/enstrophy conserving scheme 385 386 ! ! lateral mixing 387 IF( l_dynldf_lap ) CALL dyn_ldf_lap ( kstp ) ! iso-level laplacian 388 IF( l_dynldf_bilap ) CALL dyn_ldf_bilap ( kstp ) ! iso-level bilaplacian 389 IF( l_dynldf_bilapg ) CALL dyn_ldf_bilapg ( kstp ) ! s-coord. horizontal bilaplacian 390 IF( l_dynldf_iso ) CALL dyn_ldf_iso ( kstp ) ! iso-neutral laplacian 391 359 CALL dyn_vor( kstp ) ! vorticity term including Coriolis 360 361 CALL dyn_ldf( kstp ) ! lateral mixing 392 362 #if defined key_agrif 393 363 IF (.NOT. Agrif_Root()) CALL Agrif_Sponge_dyn( kstp ) ! momemtum sponge 394 364 #endif 395 ! ! horizontal gradient of Hydrostatic pressure 396 IF ( lk_jki ) THEN 397 CALL dyn_hpg_atsk( kstp ) ! autotask case (j-k-i loop) 398 ELSE 399 CALL dyn_hpg ( kstp ) ! default case (k-j-i loop) 400 ENDIF 401 402 CALL dyn_zad ( kstp ) ! vertical advection 403 404 ! ! vertical diffusion 405 IF( l_dynzdf_exp ) CALL dyn_zdf_exp ( kstp ) ! explicit time stepping (time splitting scheme) 406 IF( l_dynzdf_imp ) CALL dyn_zdf_imp ( kstp ) ! implicit time stepping (euler backward) 407 IF( l_dynzdf_imp_tsk ) CALL dyn_zdf_imp_tsk( kstp ) ! autotask implicit time stepping (euler backward) 408 IF( l_dynzdf_iso ) CALL dyn_zdf_iso ( kstp ) ! iso-neutral case 409 410 IF( lk_dynspg_rl ) THEN 365 CALL dyn_hpg( kstp ) ! horizontal gradient of Hydrostatic pressure 366 367 CALL dyn_zad( kstp ) ! vertical advection 368 369 CALL dyn_zdf( kstp ) ! vertical diffusion 370 371 IF( lk_dynspg_rl ) THEN 411 372 IF( lk_obc ) CALL obc_spg( kstp ) ! surface pressure gradient at open boundaries 412 373 ENDIF … … 417 378 CALL dyn_spg( kstp, indic ) ! surface pressure gradient 418 379 419 CALL dyn_nxt( kstp ) ! velocity at next time step380 CALL dyn_nxt( kstp ) ! lateral velocity at next time step 420 381 421 382
Note: See TracChangeset
for help on using the changeset viewer.