source: trunk/NEMOGCM/NEMO/SAS_SRC/step.F90 @ 6140

Last change on this file since 6140 was 6140, checked in by timgraham, 5 years ago

Merge of branches/2015/dev_merge_2015 back into trunk. Merge excludes NEMOGCM/TOOLS/OBSTOOLS/ for now due to issues with the change of file type. Will sort these manually with further commits.

Branch merged as follows:
In the working copy of branch ran:
svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk@HEAD
Small conflicts due to bug fixes applied to trunk since the dev_merge_2015 was copied. Bug fixes were applied to the branch as well so these were easy to resolve.
Branch committed at this stage

In working copy run:
svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
to switch working copy

Run:
svn merge —reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2015/dev_merge_2015
to merge the branch into the trunk and then commit - no conflicts at this stage.

  • Property svn:keywords set to Id
File size: 5.2 KB
Line 
1MODULE step
2   !!======================================================================
3   !!                       ***  MODULE step  ***
4   !! Time-stepping    : manager of the ocean, tracer and ice time stepping
5   !!                    version for standalone surface scheme
6   !!======================================================================
7   !! History :  OPA  !  1991-03  (G. Madec)  Original code
8   !!             .   !    .                                                     
9   !!             .   !    .                                                     
10   !!   NEMO     3.5  !  2012-03  (S. Alderson)
11   !!----------------------------------------------------------------------
12
13   !!----------------------------------------------------------------------
14   !!   stp             : OPA system time-stepping
15   !!----------------------------------------------------------------------
16   USE oce              ! ocean dynamics and tracers variables
17   USE dom_oce          ! ocean space and time domain variables
18   USE daymod           ! calendar                         (day     routine)
19   USE sbc_oce          ! surface boundary condition: fields
20   USE sbcmod           ! surface boundary condition       (sbc     routine)
21   USE sbcrnf           ! surface boundary condition: runoff variables
22   USE sbccpl           ! surface boundary condition: coupled interface
23   USE eosbn2           ! equation of state                (eos_bn2 routine)
24   USE diawri           ! Standard run outputs             (dia_wri routine)
25   USE bdy_par          ! clem: mandatory for LIM3
26#if defined key_bdy
27   USE bdydta           ! clem: mandatory for LIM3
28#endif
29   USE stpctl           ! time stepping control            (stp_ctl routine)
30   !
31   USE in_out_manager   ! I/O manager
32   USE prtctl           ! Print control                    (prt_ctl routine)
33   USE iom              !
34   USE lbclnk           !
35   USE timing           ! Timing           
36#if defined key_iomput
37   USE xios
38#endif
39
40   IMPLICIT NONE
41   PRIVATE
42
43   PUBLIC   stp   ! called by nemogcm.F90
44
45   !!----------------------------------------------------------------------
46   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
47   !! $Id$
48   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
49   !!----------------------------------------------------------------------
50CONTAINS
51
52#if defined key_agrif
53   SUBROUTINE stp( )
54      INTEGER             ::   kstp   ! ocean time-step index
55#else
56   SUBROUTINE stp( kstp )
57      INTEGER, INTENT(in) ::   kstp   ! ocean time-step index
58#endif
59      !!----------------------------------------------------------------------
60      !!                     ***  ROUTINE stp  ***
61      !!                     
62      !! ** Purpose : - Time stepping of SBC (surface boundary)
63      !!
64      !! ** Method  : -1- Update forcings and data 
65      !!              -2- Outputs and diagnostics
66      !!----------------------------------------------------------------------
67      INTEGER ::   indic    ! error indicator if < 0
68      !! ---------------------------------------------------------------------
69
70#if defined key_agrif
71      kstp = nit000 + Agrif_Nb_Step()
72# if defined key_iomput
73      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap( cxios_context )
74# endif   
75#endif   
76      IF( kstp == nit000 )   CALL iom_init( cxios_context ) ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS)
77      IF( kstp /= nit000 )   CALL day( kstp )             ! Calendar (day was already called at nit000 in day_init)
78                             CALL iom_setkt( kstp - nit000 + 1, cxios_context )   ! tell iom we are at time step kstp
79
80      ! ==> clem: open boundaries is mandatory for LIM3 because ice BDY is not decoupled from 
81      !           the environment of ocean BDY. Therefore bdy is called in both OPA and SAS modules.
82      !           From SAS: ocean bdy data are wrong  (but we do not care) and ice bdy data are OK. 
83      !           This is not clean and should be changed in the future.
84#if defined key_bdy
85      IF( lk_bdy     )       CALL bdy_dta ( kstp, time_offset=+1 )   ! update dynamic & tracer data at open boundaries
86#endif
87      ! ==>
88                             CALL sbc    ( kstp )         ! Sea Boundary Condition (including sea-ice)
89
90                             CALL dia_wri( kstp )         ! ocean model: outputs
91
92                             indic = 0                    ! although indic is not changed in stp_ctl
93                                                          ! need to keep the same interface
94                             CALL stp_ctl( kstp, indic )
95      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
96      ! Coupled mode
97      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
98      IF( lk_oasis    )  CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges if OASIS-coupled ice
99
100#if defined key_iomput
101      IF( kstp == nitend .OR. indic < 0 ) THEN
102                             CALL iom_context_finalize( cxios_context ) ! needed for XIOS+AGRIF
103      ENDIF
104#endif
105      !
106      IF( nn_timing == 1 .AND.  kstp == nit000  )   CALL timing_reset
107      !
108   END SUBROUTINE stp
109
110   !!======================================================================
111END MODULE step
Note: See TracBrowser for help on using the repository browser.