[3] | 1 | MODULE step |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE step *** |
---|
| 4 | !! Time-stepping : manager of the ocean, tracer and ice time stepping |
---|
| 5 | !!====================================================================== |
---|
[1438] | 6 | !! History : OPA ! 1991-03 (G. Madec) Original code |
---|
[1492] | 7 | !! - ! 1991-11 (G. Madec) |
---|
| 8 | !! - ! 1992-06 (M. Imbard) add a first output record |
---|
| 9 | !! - ! 1996-04 (G. Madec) introduction of dynspg |
---|
| 10 | !! - ! 1996-04 (M.A. Foujols) introduction of passive tracer |
---|
[1438] | 11 | !! 8.0 ! 1997-06 (G. Madec) new architecture of call |
---|
| 12 | !! 8.2 ! 1997-06 (G. Madec, M. Imbard, G. Roullet) free surface |
---|
| 13 | !! - ! 1999-02 (G. Madec, N. Grima) hpg implicit |
---|
| 14 | !! - ! 2000-07 (J-M Molines, M. Imbard) Open Bondary Conditions |
---|
| 15 | !! NEMO 1.0 ! 2002-06 (G. Madec) free form, suppress macro-tasking |
---|
| 16 | !! - ! 2004-08 (C. Talandier) New trends organization |
---|
[1492] | 17 | !! - ! 2005-01 (C. Ethe) Add the KPP closure scheme |
---|
| 18 | !! - ! 2005-11 (G. Madec) Reorganisation of tra and dyn calls |
---|
| 19 | !! - ! 2006-01 (L. Debreu, C. Mazauric) Agrif implementation |
---|
| 20 | !! - ! 2006-07 (S. Masson) restart using iom |
---|
[1438] | 21 | !! 3.2 ! 2009-02 (G. Madec, R. Benshila) reintroduicing z*-coordinate |
---|
[1533] | 22 | !! - ! 2009-06 (S. Masson, G. Madec) TKE restart compatible with key_cpl |
---|
[3] | 23 | !!---------------------------------------------------------------------- |
---|
[888] | 24 | |
---|
| 25 | !!---------------------------------------------------------------------- |
---|
[3] | 26 | !! stp : OPA system time-stepping |
---|
| 27 | !!---------------------------------------------------------------------- |
---|
| 28 | USE oce ! ocean dynamics and tracers variables |
---|
| 29 | USE dom_oce ! ocean space and time domain variables |
---|
| 30 | USE zdf_oce ! ocean vertical physics variables |
---|
[467] | 31 | USE ldftra_oce ! ocean tracer - trends |
---|
| 32 | USE ldfdyn_oce ! ocean dynamics - trends |
---|
[3] | 33 | USE in_out_manager ! I/O manager |
---|
[888] | 34 | USE iom ! |
---|
[3] | 35 | USE lbclnk |
---|
| 36 | |
---|
| 37 | USE daymod ! calendar (day routine) |
---|
| 38 | |
---|
| 39 | USE dtatem ! ocean temperature data (dta_tem routine) |
---|
| 40 | USE dtasal ! ocean salinity data (dta_sal routine) |
---|
[888] | 41 | USE sbcmod ! surface boundary condition (sbc routine) |
---|
| 42 | USE sbcrnf ! surface boundary condition: runoff variables |
---|
[1218] | 43 | USE sbccpl ! surface boundary condition: coupled formulation (call send at end of step) |
---|
| 44 | USE cpl_oasis3, ONLY : lk_cpl |
---|
[3] | 45 | |
---|
[1594] | 46 | #if defined key_top |
---|
[187] | 47 | USE trcstp ! passive tracer time-stepping (trc_stp routine) |
---|
[1594] | 48 | #endif |
---|
[3] | 49 | |
---|
[467] | 50 | USE traqsr ! solar radiation penetration (tra_qsr routine) |
---|
| 51 | USE trasbc ! surface boundary condition (tra_sbc routine) |
---|
[3] | 52 | USE trabbc ! bottom boundary condition (tra_bbc routine) |
---|
| 53 | USE trabbl ! bottom boundary layer (tra_bbl routine) |
---|
| 54 | USE tradmp ! internal damping (tra_dmp routine) |
---|
[467] | 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) |
---|
[3] | 61 | USE tranpc ! non-penetrative convection (tra_npc routine) |
---|
| 62 | |
---|
| 63 | USE eosbn2 ! equation of state (eos_bn2 routine) |
---|
| 64 | |
---|
[643] | 65 | USE dynadv ! advection (dyn_adv routine) |
---|
| 66 | USE dynvor ! vorticity term (dyn_vor routine) |
---|
[467] | 67 | USE dynhpg ! hydrostatic pressure grad. (dyn_hpg routine) |
---|
| 68 | USE dynldf ! lateral momentum diffusion (dyn_ldf routine) |
---|
| 69 | USE dynzdf ! vertical diffusion (dyn_zdf routine) |
---|
| 70 | USE dynspg_oce ! surface pressure gradient (dyn_spg routine) |
---|
| 71 | USE dynspg ! surface pressure gradient (dyn_spg routine) |
---|
| 72 | USE dynnxt ! time-stepping (dyn_nxt routine) |
---|
| 73 | |
---|
[3] | 74 | USE obc_par ! open boundary condition variables |
---|
| 75 | USE obcdta ! open boundary condition data (obc_dta routine) |
---|
| 76 | USE obcrst ! open boundary cond. restart (obc_rst routine) |
---|
| 77 | USE obcrad ! open boundary cond. radiation (obc_rad routine) |
---|
| 78 | |
---|
[911] | 79 | USE bdy_par ! unstructured open boundary data variables |
---|
| 80 | USE bdydta ! unstructured open boundary data (bdy_dta routine) |
---|
| 81 | |
---|
[1565] | 82 | USE sshwzv ! vertical velocity and ssh (ssh_wzv routine) |
---|
[3] | 83 | |
---|
| 84 | USE ldfslp ! iso-neutral slopes (ldf_slp routine) |
---|
| 85 | USE ldfeiv ! eddy induced velocity coef. (ldf_eiv routine) |
---|
| 86 | |
---|
[1417] | 87 | USE zdftmx ! tide-induced vertical mixing (zdf_tmx routine) |
---|
[3] | 88 | USE zdfbfr ! bottom friction (zdf_bfr routine) |
---|
[1531] | 89 | USE zdftke_old ! old TKE vertical mixing (zdf_tke_old routine) |
---|
[3] | 90 | USE zdftke ! TKE vertical mixing (zdf_tke routine) |
---|
[255] | 91 | USE zdfkpp ! KPP vertical mixing (zdf_kpp routine) |
---|
[3] | 92 | USE zdfddm ! double diffusion mixing (zdf_ddm routine) |
---|
| 93 | USE zdfevd ! enhanced vertical diffusion (zdf_evd routine) |
---|
| 94 | USE zdfric ! Richardson vertical mixing (zdf_ric routine) |
---|
| 95 | USE zdfmxl ! Mixed-layer depth (zdf_mxl routine) |
---|
| 96 | |
---|
| 97 | USE zpshde ! partial step: hor. derivative (zps_hde routine) |
---|
[888] | 98 | |
---|
[3] | 99 | USE diawri ! Standard run outputs (dia_wri routine) |
---|
[216] | 100 | USE trdicp ! Ocean momentum/tracers trends (trd_wri routine) |
---|
[3] | 101 | USE trdmld ! mixed-layer trends (trd_mld routine) |
---|
[503] | 102 | USE trdmld_rst ! restart for mixed-layer trends |
---|
| 103 | USE trdmod_oce ! ocean momentum/tracers trends |
---|
[108] | 104 | USE trdvor ! vorticity budget (trd_vor routine) |
---|
[216] | 105 | USE diagap ! hor. mean model-data gap (dia_gap routine) |
---|
[3] | 106 | USE diahdy ! dynamic height (dia_hdy routine) |
---|
[132] | 107 | USE diaptr ! poleward transports (dia_ptr routine) |
---|
[3] | 108 | USE diahth ! thermocline depth (dia_hth routine) |
---|
| 109 | USE diafwb ! freshwater budget (dia_fwb routine) |
---|
| 110 | USE flo_oce ! floats variables |
---|
| 111 | USE floats ! floats computation (flo_stp routine) |
---|
| 112 | |
---|
| 113 | USE stpctl ! time stepping control (stp_ctl routine) |
---|
[75] | 114 | USE restart ! ocean restart (rst_wri routine) |
---|
[258] | 115 | USE prtctl ! Print control (prt_ctl routine) |
---|
[3] | 116 | |
---|
[392] | 117 | #if defined key_agrif |
---|
[389] | 118 | USE agrif_opa_sponge ! Momemtum and tracers sponges |
---|
| 119 | #endif |
---|
| 120 | |
---|
[3] | 121 | IMPLICIT NONE |
---|
| 122 | PRIVATE |
---|
| 123 | |
---|
[1492] | 124 | PUBLIC stp ! called by opa.F90 |
---|
[3] | 125 | |
---|
| 126 | !! * Substitutions |
---|
| 127 | # include "domzgr_substitute.h90" |
---|
| 128 | # include "zdfddm_substitute.h90" |
---|
| 129 | !!---------------------------------------------------------------------- |
---|
[1492] | 130 | !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) |
---|
[888] | 131 | !! $Id$ |
---|
[508] | 132 | !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) |
---|
[3] | 133 | !!---------------------------------------------------------------------- |
---|
| 134 | |
---|
| 135 | CONTAINS |
---|
| 136 | |
---|
[508] | 137 | #if defined key_agrif |
---|
| 138 | SUBROUTINE stp( ) |
---|
[1438] | 139 | INTEGER :: kstp ! ocean time-step index |
---|
[508] | 140 | #else |
---|
[467] | 141 | SUBROUTINE stp( kstp ) |
---|
[1438] | 142 | INTEGER, INTENT(in) :: kstp ! ocean time-step index |
---|
[467] | 143 | #endif |
---|
| 144 | !!---------------------------------------------------------------------- |
---|
[3] | 145 | !! *** ROUTINE stp *** |
---|
| 146 | !! |
---|
| 147 | !! ** Purpose : - Time stepping of OPA (momentum and active tracer eqs.) |
---|
| 148 | !! - Time stepping of LIM (dynamic and thermodynamic eqs.) |
---|
| 149 | !! - Tme stepping of TRC (passive tracer eqs.) |
---|
| 150 | !! |
---|
| 151 | !! ** Method : -1- Update forcings and data |
---|
| 152 | !! -2- Update ocean physics |
---|
| 153 | !! -3- Compute the t and s trends |
---|
| 154 | !! -4- Update t and s |
---|
| 155 | !! -5- Compute the momentum trends |
---|
| 156 | !! -6- Update the horizontal velocity |
---|
| 157 | !! -7- Compute the diagnostics variables (rd,N2, div,cur,w) |
---|
| 158 | !! -8- Outputs and diagnostics |
---|
| 159 | !!---------------------------------------------------------------------- |
---|
[888] | 160 | INTEGER :: jk ! dummy loop indice |
---|
[3] | 161 | INTEGER :: indic ! error indicator if < 0 |
---|
| 162 | !! --------------------------------------------------------------------- |
---|
| 163 | |
---|
[392] | 164 | #if defined key_agrif |
---|
[389] | 165 | kstp = nit000 + Agrif_Nb_Step() |
---|
[445] | 166 | ! IF ( Agrif_Root() .and. lwp) Write(*,*) '---' |
---|
[508] | 167 | ! IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp |
---|
[389] | 168 | #endif |
---|
[3] | 169 | indic = 1 ! reset to no error condition |
---|
[508] | 170 | |
---|
[3] | 171 | CALL day( kstp ) ! Calendar |
---|
| 172 | |
---|
[1359] | 173 | CALL iom_setkt( kstp ) ! say to iom that we are at time step kstp |
---|
| 174 | |
---|
[508] | 175 | CALL rst_opn( kstp ) ! Open the restart file |
---|
| 176 | |
---|
[3] | 177 | !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
[888] | 178 | ! Update data, open boundaries, surface boundary condition (including sea-ice) |
---|
[3] | 179 | !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
---|
| 180 | IF( lk_dtatem ) CALL dta_tem( kstp ) ! update 3D temperature data |
---|
[888] | 181 | IF( lk_dtasal ) CALL dta_sal( kstp ) ! update 3D salinity data |
---|
| 182 | CALL sbc ( kstp ) ! Sea Boundary Condition (including sea-ice) |
---|
[35] | 183 | IF( lk_obc ) CALL obc_dta( kstp ) ! update dynamic and tracer data at open boundaries |
---|
[3] | 184 | IF( lk_obc ) CALL obc_rad( kstp ) ! compute phase velocities at open boundaries |
---|
[911] | 185 | IF( lk_bdy ) CALL bdy_dta( kstp ) ! update dynamic and tracer data at unstructured open boundary |
---|
| 186 | |
---|
[1438] | 187 | !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
[1492] | 188 | ! Ocean dynamics : ssh, wn, hdiv, rot ! |
---|
[1438] | 189 | !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
---|
[1492] | 190 | CALL ssh_wzv( kstp ) ! after ssh & vertical velocity |
---|
[3] | 191 | |
---|
| 192 | !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
[1492] | 193 | ! Ocean physics update (ua, va, ta, sa used as workspace) |
---|
[3] | 194 | !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
---|
[1492] | 195 | CALL bn2( tb, sb, rn2b ) ! before Brunt-Vaisala frequency |
---|
| 196 | CALL bn2( tn, sn, rn2 ) ! now Brunt-Vaisala frequency |
---|
| 197 | ! |
---|
| 198 | ! VERTICAL PHYSICS |
---|
| 199 | ! ! Vertical eddy viscosity and diffusivity coefficients |
---|
[1531] | 200 | IF( lk_zdfric ) CALL zdf_ric ( kstp ) ! Richardson number dependent Kz |
---|
| 201 | IF( lk_zdftke_old ) CALL zdf_tke_old( kstp ) ! TKE closure scheme for Kz (old scheme) |
---|
| 202 | IF( lk_zdftke ) CALL zdf_tke ( kstp ) ! TKE closure scheme for Kz |
---|
| 203 | IF( lk_zdfkpp ) CALL zdf_kpp ( kstp ) ! KPP closure scheme for Kz |
---|
| 204 | IF( lk_zdfcst ) THEN ! Constant Kz (reset avt, avm[uv] to the background value) |
---|
[1537] | 205 | avt (:,:,:) = rn_avt0 * tmask(:,:,:) |
---|
| 206 | avmu(:,:,:) = rn_avm0 * umask(:,:,:) |
---|
| 207 | avmv(:,:,:) = rn_avm0 * vmask(:,:,:) |
---|
[677] | 208 | ENDIF |
---|
[1492] | 209 | IF( ln_rnf_mouth ) THEN ! increase diffusivity at rivers mouths |
---|
[1246] | 210 | DO jk = 2, nkrnf ; avt(:,:,jk) = avt(:,:,jk) + 2.e0 * rn_avt_rnf * rnfmsk(:,:) * tmask(:,:,jk) ; END DO |
---|
[3] | 211 | ENDIF |
---|
[1492] | 212 | IF( ln_zdfevd ) CALL zdf_evd( kstp ) ! enhanced vertical eddy diffusivity |
---|
[3] | 213 | |
---|
[1492] | 214 | IF( lk_zdftmx ) CALL zdf_tmx( kstp ) ! tidal vertical mixing |
---|
[3] | 215 | |
---|
[888] | 216 | IF( lk_zdfddm .AND. .NOT. lk_zdfkpp ) & |
---|
[1492] | 217 | & CALL zdf_ddm( kstp ) ! double diffusive mixing |
---|
[3] | 218 | |
---|
[1492] | 219 | CALL zdf_bfr( kstp ) ! bottom friction |
---|
[1417] | 220 | |
---|
[1492] | 221 | CALL zdf_mxl( kstp ) ! mixed layer depth |
---|
[3] | 222 | |
---|
[1531] | 223 | ! write tke information in the restart file |
---|
| 224 | IF( lrst_oce .AND. lk_zdftke ) CALL tke_rst( kstp, 'WRITE' ) |
---|
[1492] | 225 | ! |
---|
| 226 | ! LATERAL PHYSICS |
---|
| 227 | ! |
---|
| 228 | IF( lk_ldfslp ) THEN ! slope of lateral mixing |
---|
[1546] | 229 | CALL eos( tb, sb, rhd ) ! before in situ density |
---|
[1492] | 230 | IF( ln_zps ) CALL zps_hde( kstp, tb, sb, rhd, & ! Partial steps: before horizontal gradient |
---|
| 231 | & gtu, gsu, gru, & ! of t, s, rd at the last ocean level |
---|
| 232 | & gtv, gsv, grv ) |
---|
| 233 | CALL ldf_slp( kstp, rhd, rn2b ) ! before slope of the lateral mixing |
---|
[1481] | 234 | ENDIF |
---|
[3] | 235 | #if defined key_traldf_c2d |
---|
[1492] | 236 | IF( lk_traldf_eiv ) CALL ldf_eiv( kstp ) ! eddy induced velocity coefficient |
---|
[1239] | 237 | # endif |
---|
[3] | 238 | |
---|
[1482] | 239 | !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
[1492] | 240 | ! diagnostics and outputs (ua, va, ta, sa used as workspace) |
---|
[1482] | 241 | !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
---|
[1561] | 242 | CALL dia_wri( kstp ) ! ocean model: outputs |
---|
[1492] | 243 | IF( lk_floats ) CALL flo_stp( kstp ) ! drifting Floats |
---|
| 244 | IF( lk_diahth ) CALL dia_hth( kstp ) ! Thermocline depth (20 degres isotherm depth) |
---|
| 245 | IF( lk_diagap ) CALL dia_gap( kstp ) ! basin averaged diagnostics |
---|
| 246 | IF( lk_diahdy ) CALL dia_hdy( kstp ) ! dynamical heigh diagnostics |
---|
| 247 | IF( lk_diafwb ) CALL dia_fwb( kstp ) ! Fresh water budget diagnostics |
---|
| 248 | IF( ln_diaptr ) CALL dia_ptr( kstp ) ! Poleward TRansports diagnostics |
---|
[1482] | 249 | |
---|
[923] | 250 | #if defined key_top |
---|
[3] | 251 | !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
| 252 | ! Passive Tracer Model |
---|
| 253 | !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
---|
[1492] | 254 | CALL trc_stp( kstp ) ! time-stepping |
---|
[3] | 255 | #endif |
---|
| 256 | |
---|
| 257 | !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
[1492] | 258 | ! Active tracers (ua, va used as workspace) |
---|
[3] | 259 | !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
---|
[467] | 260 | ta(:,:,:) = 0.e0 ! set tracer trends to zero |
---|
| 261 | sa(:,:,:) = 0.e0 |
---|
[3] | 262 | |
---|
[467] | 263 | CALL tra_sbc ( kstp ) ! surface boundary condition |
---|
| 264 | IF( ln_traqsr ) CALL tra_qsr ( kstp ) ! penetrative solar radiation qsr |
---|
| 265 | IF( lk_trabbc ) CALL tra_bbc ( kstp ) ! bottom heat flux |
---|
| 266 | IF( lk_trabbl_dif ) CALL tra_bbl_dif( kstp ) ! diffusive bottom boundary layer scheme |
---|
| 267 | IF( lk_trabbl_adv ) CALL tra_bbl_adv( kstp ) ! advective (and/or diffusive) bottom boundary layer scheme |
---|
| 268 | IF( lk_tradmp ) CALL tra_dmp ( kstp ) ! internal damping trends |
---|
| 269 | CALL tra_adv ( kstp ) ! horizontal & vertical advection |
---|
| 270 | IF( n_cla == 1 ) CALL tra_cla ( kstp ) ! Cross Land Advection (Update Hor. advection) |
---|
| 271 | IF( lk_zdfkpp ) CALL tra_kpp ( kstp ) ! KPP non-local tracer fluxes |
---|
| 272 | CALL tra_ldf ( kstp ) ! lateral mixing |
---|
[392] | 273 | #if defined key_agrif |
---|
[782] | 274 | IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_tra ! tracers sponge |
---|
[389] | 275 | #endif |
---|
[1111] | 276 | CALL tra_zdf ( kstp ) ! vertical mixing and after tracer fields |
---|
[1239] | 277 | |
---|
[1492] | 278 | IF( ln_dynhpg_imp ) THEN ! semi-implicit hpg (time stepping then eos) |
---|
| 279 | IF( ln_zdfnpc ) CALL tra_npc ( kstp ) ! update after fields by non-penetrative convection |
---|
| 280 | CALL tra_nxt ( kstp ) ! tracer fields at next time step |
---|
| 281 | CALL eos( ta, sa, rhd, rhop ) ! Time-filtered in situ density for hpg computation |
---|
| 282 | IF( ln_zps ) CALL zps_hde( kstp, ta, sa, rhd, & ! Partial steps: time filtered hor. derivative |
---|
| 283 | & gtu, gsu, gru, & ! of t, s, rd at the bottom ocean level |
---|
| 284 | & gtv, gsv, grv ) |
---|
| 285 | |
---|
| 286 | ELSE ! centered hpg (eos then time stepping) |
---|
| 287 | CALL eos( tn, sn, rhd, rhop ) ! now in situ density for hpg computation |
---|
| 288 | IF( ln_zps ) CALL zps_hde( kstp, tn, sn, rhd, & ! Partial steps: now horizontal derivative |
---|
| 289 | & gtu, gsu, gru, & ! of t, s, rd at the bottom ocean level |
---|
| 290 | & gtv, gsv, grv ) |
---|
| 291 | IF( ln_zdfnpc ) CALL tra_npc ( kstp ) ! update after fields by non-penetrative convection |
---|
| 292 | CALL tra_nxt ( kstp ) ! tracer fields at next time step |
---|
[1239] | 293 | ENDIF |
---|
[1481] | 294 | |
---|
[3] | 295 | !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
[1492] | 296 | ! Dynamics (ta, sa used as workspace) |
---|
[3] | 297 | !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
---|
[1492] | 298 | ua(:,:,:) = 0.e0 ! set dynamics trends to zero |
---|
[75] | 299 | va(:,:,:) = 0.e0 |
---|
[3] | 300 | |
---|
[1492] | 301 | CALL dyn_adv( kstp ) ! advection (vector or flux form) |
---|
| 302 | CALL dyn_vor( kstp ) ! vorticity term including Coriolis |
---|
| 303 | CALL dyn_ldf( kstp ) ! lateral mixing |
---|
[392] | 304 | #if defined key_agrif |
---|
[1492] | 305 | IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_dyn ! momemtum sponge |
---|
[389] | 306 | #endif |
---|
[1492] | 307 | CALL dyn_hpg( kstp ) ! horizontal gradient of Hydrostatic pressure |
---|
| 308 | CALL dyn_zdf( kstp ) ! vertical diffusion |
---|
[888] | 309 | indic=0 |
---|
[1492] | 310 | CALL dyn_spg( kstp, indic ) ! surface pressure gradient |
---|
| 311 | CALL dyn_nxt( kstp ) ! lateral velocity at next time step |
---|
[3] | 312 | |
---|
[1492] | 313 | CALL ssh_nxt( kstp ) ! sea surface height at next time step |
---|
[593] | 314 | |
---|
[3] | 315 | !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
[888] | 316 | ! Control and restarts |
---|
[3] | 317 | !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
---|
[1492] | 318 | CALL stp_ctl( kstp, indic ) |
---|
| 319 | IF( indic < 0 ) THEN |
---|
| 320 | CALL ctl_stop( 'step: indic < 0' ) |
---|
| 321 | CALL dia_wri_state( 'output.abort', kstp ) |
---|
[1482] | 322 | ENDIF |
---|
[1492] | 323 | IF( kstp == nit000 ) CALL iom_close( numror ) ! close input ocean restart file |
---|
| 324 | IF( lrst_oce ) CALL rst_write ( kstp ) ! write output ocean restart file |
---|
| 325 | IF( lk_obc ) CALL obc_rst_write( kstp ) ! write open boundary restart file |
---|
[3] | 326 | |
---|
[508] | 327 | !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
[1492] | 328 | ! Trends (ua, va, ta, sa used as workspace) |
---|
[508] | 329 | !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
---|
[1492] | 330 | IF( nstop == 0 ) THEN |
---|
| 331 | IF( lk_trddyn ) CALL trd_dwr( kstp ) ! trends: dynamics |
---|
| 332 | IF( lk_trdtra ) CALL trd_twr( kstp ) ! trends: active tracers |
---|
| 333 | IF( lk_trdmld ) CALL trd_mld( kstp ) ! trends: Mixed-layer |
---|
| 334 | IF( lk_trdvor ) CALL trd_vor( kstp ) ! trends: vorticity budget |
---|
[75] | 335 | ENDIF |
---|
[3] | 336 | |
---|
[75] | 337 | !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
| 338 | ! Coupled mode |
---|
| 339 | !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
---|
[1492] | 340 | IF( lk_cpl ) CALL sbc_cpl_snd( kstp ) ! coupled mode : field exchanges |
---|
[508] | 341 | ! |
---|
[1481] | 342 | ! |
---|
[3] | 343 | END SUBROUTINE stp |
---|
| 344 | |
---|
| 345 | !!====================================================================== |
---|
| 346 | END MODULE step |
---|