MODULE step !!====================================================================== !! *** MODULE step *** !! Time-stepping : manager of the ocean, tracer and ice time stepping !! version for standalone surface scheme !!====================================================================== !! History : OPA ! 1991-03 (G. Madec) Original code !! - ! 1991-11 (G. Madec) !! - ! 1992-06 (M. Imbard) add a first output record !! - ! 1996-04 (G. Madec) introduction of dynspg !! - ! 1996-04 (M.A. Foujols) introduction of passive tracer !! 8.0 ! 1997-06 (G. Madec) new architecture of call !! 8.2 ! 1997-06 (G. Madec, M. Imbard, G. Roullet) free surface !! - ! 1999-02 (G. Madec, N. Grima) hpg implicit !! - ! 2000-07 (J-M Molines, M. Imbard) Open Bondary Conditions !! NEMO 1.0 ! 2002-06 (G. Madec) free form, suppress macro-tasking !! - ! 2004-08 (C. Talandier) New trends organization !! - ! 2005-01 (C. Ethe) Add the KPP closure scheme !! - ! 2005-11 (G. Madec) Reorganisation of tra and dyn calls !! - ! 2006-01 (L. Debreu, C. Mazauric) Agrif implementation !! - ! 2006-07 (S. Masson) restart using iom !! 3.2 ! 2009-02 (G. Madec, R. Benshila) reintroduicing z*-coordinate !! - ! 2009-06 (S. Masson, G. Madec) TKE restart compatible with key_cpl !! 3.3 ! 2010-05 (K. Mogensen, A. Weaver, M. Martin, D. Lea) Assimilation interface !! - ! 2010-10 (C. Ethe, G. Madec) reorganisation of initialisation phase + merge TRC-TRA !! 3.4 ! 2011-04 (G. Madec, C. Ethe) Merge of dtatem and dtasal !! 3.5 ! 2012-03 (S. Alderson) !!---------------------------------------------------------------------- !!---------------------------------------------------------------------- !! stp : OPA system time-stepping !!---------------------------------------------------------------------- USE oce ! ocean dynamics and tracers variables USE dom_oce ! ocean space and time domain variables USE in_out_manager ! I/O manager USE iom ! USE lbclnk USE daymod ! calendar (day routine) USE sbcmod ! surface boundary condition (sbc routine) USE sbcrnf ! surface boundary condition: runoff variables USE eosbn2 ! equation of state (eos_bn2 routine) USE diawri ! Standard run outputs (dia_wri routine) USE stpctl ! time stepping control (stp_ctl routine) USE prtctl ! Print control (prt_ctl routine) USE timing ! Timing IMPLICIT NONE PRIVATE PUBLIC stp ! called by opa.F90 !! * Substitutions # include "domzgr_substitute.h90" # include "zdfddm_substitute.h90" !!---------------------------------------------------------------------- !! NEMO/OPA 3.3 , NEMO Consortium (2010) !! $Id: step.F90 3294 2012-01-28 16:44:18Z rblod $ !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) !!---------------------------------------------------------------------- CONTAINS #if defined key_agrif SUBROUTINE stp( ) INTEGER :: kstp ! ocean time-step index #else SUBROUTINE stp( kstp ) INTEGER, INTENT(in) :: kstp ! ocean time-step index #endif !!---------------------------------------------------------------------- !! *** ROUTINE stp *** !! !! ** Purpose : - Time stepping of OPA (momentum and active tracer eqs.) !! - Time stepping of LIM (dynamic and thermodynamic eqs.) !! - Tme stepping of TRC (passive tracer eqs.) !! !! ** Method : -1- Update forcings and data !! -2- Update ocean physics !! -3- Compute the t and s trends !! -4- Update t and s !! -5- Compute the momentum trends !! -6- Update the horizontal velocity !! -7- Compute the diagnostics variables (rd,N2, div,cur,w) !! -8- Outputs and diagnostics !!---------------------------------------------------------------------- INTEGER :: jk ! dummy loop indice INTEGER :: indic ! error indicator if < 0 !! --------------------------------------------------------------------- #if defined key_agrif kstp = nit000 + Agrif_Nb_Step() # if defined key_iomput IF( Agrif_Nbstepint() == 0 ) CALL iom_swap # endif #endif indic = 0 ! reset to no error condition IF( kstp /= nit000 ) CALL day( kstp ) ! Calendar (day was already called at nit000 in day_init) CALL iom_setkt( kstp ) ! say to iom that we are at time step kstp CALL sbc ( kstp ) ! Sea Boundary Condition (including sea-ice) CALL dia_wri( kstp ) ! ocean model: outputs indic = 0 CALL stp_ctl( kstp, indic ) IF( indic < 0 ) THEN CALL ctl_stop( 'step: indic < 0' ) CALL dia_wri_state( 'output.abort', kstp ) ENDIF ! IF( nn_timing == 1 .AND. kstp == nit000 ) CALL timing_reset ! END SUBROUTINE stp !!====================================================================== END MODULE step