New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
step.F90 in trunk/NEMO/OPA_SRC – NEMO

source: trunk/NEMO/OPA_SRC/step.F90 @ 827

Last change on this file since 827 was 789, checked in by rblod, 17 years ago

Suppress jki routines and associated key_mpp_omp

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 23.2 KB
RevLine 
[3]1MODULE step
2   !!======================================================================
3   !!                       ***  MODULE step  ***
4   !! Time-stepping    : manager of the ocean, tracer and ice time stepping
5   !!======================================================================
[719]6   !! History :        !  91-03  ()  Original code
7   !!                  !  91-11  (G. Madec)
[508]8   !!                  !  92-06  (M. Imbard)  add a first output record
9   !!                  !  96-04  (G. Madec)  introduction of dynspg
10   !!                  !  96-04  (M.A. Foujols)  introduction of passive tracer
11   !!             8.0  !  97-06  (G. Madec)  new architecture of call
12   !!             8.2  !  97-06  (G. Madec, M. Imbard, G. Roullet)  free surface
13   !!             8.2  !  99-02  (G. Madec, N. Grima)  hpg implicit
14   !!             8.2  !  00-07  (J-M Molines, M. Imbard)  Open Bondary Conditions
15   !!             9.0  !  02-06  (G. Madec)  free form, suppress macro-tasking
16   !!             " "  !  04-08  (C. Talandier) New trends organization
17   !!             " "  !  05-01  (C. Ethe) Add the KPP closure scheme
18   !!             " "  !  05-11  (V. Garnier) Surface pressure gradient organization
19   !!             " "  !  05-11  (G. Madec)  Reorganisation of tra and dyn calls
20   !!             " "  !  06-01  (L. Debreu, C. Mazauric)  Agrif implementation
21   !!             " "  !  06-07  (S. Masson)  restart using iom
[3]22   !!----------------------------------------------------------------------
23   !!   stp            : OPA system time-stepping
24   !!----------------------------------------------------------------------
25   USE oce             ! ocean dynamics and tracers variables
26   USE dom_oce         ! ocean space and time domain variables
27   USE zdf_oce         ! ocean vertical physics variables
[467]28   USE ldftra_oce      ! ocean tracer   - trends
29   USE ldfdyn_oce      ! ocean dynamics - trends
[216]30   USE cpl_oce         ! coupled ocean-atmosphere variables
[3]31   USE in_out_manager  ! I/O manager
[719]32   USE iom
[3]33   USE lbclnk
34
35   USE daymod          ! calendar                         (day     routine)
36
37   USE dtatem          ! ocean temperature data           (dta_tem routine)
38   USE dtasal          ! ocean salinity    data           (dta_sal routine)
[719]39   USE dtasst          ! ocean sea surface temperature    (dta_sst routine)
40   USE dtasss          ! ocean sea surface salinity       (dta_sss routine)
41   USE taumod          ! surface stress                   (tau     routine)
42   USE flxmod          ! thermohaline fluxes              (flx     routine)
43   USE ocesbc          ! thermohaline fluxes              (oce_sbc routine)
44   USE flxrnf          ! runoffs                          (flx_rnf routine)
45   USE flxfwb          ! freshwater budget correction     (flx_fwb routine)
46   USE closea          ! closed sea freshwater budget     (flx_clo routine)
[3]47   USE ocfzpt          ! surface ocean freezing point    (oc_fz_pt routine)
48
[187]49   USE trcstp          ! passive tracer time-stepping      (trc_stp routine)
[3]50
[467]51   USE traqsr          ! solar radiation penetration      (tra_qsr routine)
52   USE trasbc          ! surface boundary condition       (tra_sbc routine)
[3]53   USE trabbc          ! bottom boundary condition        (tra_bbc routine)
54   USE trabbl          ! bottom boundary layer            (tra_bbl routine)
55   USE tradmp          ! internal damping                 (tra_dmp routine)
[467]56   USE traadv          ! advection scheme control     (tra_adv_ctl routine)
57   USE traldf          ! lateral mixing                   (tra_ldf routine)
58   USE cla             ! cross land advection             (tra_cla routine)
59   !   zdfkpp          ! KPP non-local tracer fluxes      (tra_kpp routine)
60   USE trazdf          ! vertical mixing                  (tra_zdf routine)
61   USE tranxt          ! time-stepping                    (tra_nxt routine)
[3]62   USE tranpc          ! non-penetrative convection       (tra_npc routine)
63
64   USE eosbn2          ! equation of state                (eos_bn2 routine)
65
[643]66   USE dynadv          ! advection                        (dyn_adv routine)
67   USE dynvor          ! vorticity term                   (dyn_vor routine)
[467]68   USE dynhpg          ! hydrostatic pressure grad.       (dyn_hpg 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)
74
[3]75   USE obc_par         ! open boundary condition variables
76   USE obcdta          ! open boundary condition data     (obc_dta routine)
77   USE obcrst          ! open boundary cond. restart      (obc_rst routine)
78   USE obcrad          ! open boundary cond. radiation    (obc_rad routine)
79   USE obcspg          ! open boundary cond  spg          (obc_spg routine)
80
81   USE divcur          ! hor. divergence and curl      (div & cur routines)
82   USE cla_div         ! cross land: hor. divergence      (div_cla routine)
83   USE wzvmod          ! vertical velocity                (wzv     routine)
84
85   USE ldfslp          ! iso-neutral slopes               (ldf_slp routine)
86   USE ldfeiv          ! eddy induced velocity coef.      (ldf_eiv routine)
87
88   USE zdfbfr          ! bottom friction                  (zdf_bfr routine)
89   USE zdftke          ! TKE vertical mixing              (zdf_tke routine)
[255]90   USE zdfkpp          ! KPP vertical mixing              (zdf_kpp routine)
[3]91   USE zdfddm          ! double diffusion mixing          (zdf_ddm routine)
92   USE zdfevd          ! enhanced vertical diffusion      (zdf_evd routine)
93   USE zdfric          ! Richardson vertical mixing       (zdf_ric routine)
94   USE zdfmxl          ! Mixed-layer depth                (zdf_mxl routine)
95
96   USE zpshde          ! partial step: hor. derivative     (zps_hde routine)
97   USE ice_oce         ! sea-ice variable
[719]98   USE icestp          ! sea-ice time-stepping             (ice_stp routine)
[3]99
100   USE diawri          ! Standard run outputs             (dia_wri routine)
[216]101   USE trdicp          ! Ocean momentum/tracers trends    (trd_wri routine)
[3]102   USE trdmld          ! mixed-layer trends               (trd_mld routine)
[503]103   USE trdmld_rst      ! restart for mixed-layer trends
104   USE trdmod_oce      ! ocean momentum/tracers trends
[108]105   USE trdvor          ! vorticity budget                 (trd_vor routine)
[216]106   USE diagap          ! hor. mean model-data gap         (dia_gap routine)
[3]107   USE diahdy          ! dynamic height                   (dia_hdy routine)
[132]108   USE diaptr          ! poleward transports              (dia_ptr routine)
[3]109   USE diahth          ! thermocline depth                (dia_hth routine)
110   USE diafwb          ! freshwater budget                (dia_fwb routine)
111   USE diaspr          ! suface pressure (rigid-lid)      (dia_spr routine)
112   USE flo_oce         ! floats variables
113   USE floats          ! floats computation               (flo_stp routine)
114
115   USE stpctl          ! time stepping control            (stp_ctl routine)
[75]116   USE restart         ! ocean restart                    (rst_wri routine)
[719]117   USE cpl             ! exchanges in coupled mode        (cpl_stp routine)
[258]118   USE prtctl          ! Print control                    (prt_ctl routine)
[593]119   USE domvvl          ! variable volume                  (dom_vvl routine)
[3]120
[392]121#if defined key_agrif
[389]122   USE agrif_opa_sponge ! Momemtum and tracers sponges
123#endif
124
[3]125   IMPLICIT NONE
126   PRIVATE
127
128   PUBLIC stp            ! called by opa.F90
129
130   !! * Substitutions
131#  include "domzgr_substitute.h90"
132#  include "zdfddm_substitute.h90"
133   !!----------------------------------------------------------------------
[247]134   !!   OPA 9.0 , LOCEAN-IPSL (2005)
[782]135   !! $Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/step.F90,v 1.35 2007/06/01 16:55:39 opalod Exp $
[508]136   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
[3]137   !!----------------------------------------------------------------------
138
139CONTAINS
140
[508]141#if defined key_agrif
142   SUBROUTINE stp( )
143#else
[467]144   SUBROUTINE stp( kstp )
145#endif
146      !!----------------------------------------------------------------------
[3]147      !!                     ***  ROUTINE stp  ***
148      !!                     
149      !! ** Purpose : - Time stepping of OPA (momentum and active tracer eqs.)
150      !!              - Time stepping of LIM (dynamic and thermodynamic eqs.)
151      !!              - Tme stepping  of TRC (passive tracer eqs.)
152      !!
153      !! ** Method  : -1- Update forcings and data 
154      !!              -2- Update ocean physics
155      !!              -3- Compute the t and s trends
156      !!              -4- Update t and s
157      !!              -5- Compute the momentum trends
158      !!              -6- Update the horizontal velocity
159      !!              -7- Compute the diagnostics variables (rd,N2, div,cur,w)
160      !!              -8- Outputs and diagnostics
161      !!----------------------------------------------------------------------
[719]162      !! * Arguments
[508]163#if defined key_agrif   
[719]164      INTEGER               :: kstp   ! ocean time-step index
[508]165#else
[719]166      INTEGER, INTENT( in ) :: kstp   ! ocean time-step index
[389]167#endif     
[719]168
169      !! * local declarations
[3]170      INTEGER ::   indic    ! error indicator if < 0
171      !! ---------------------------------------------------------------------
172
[392]173#if defined key_agrif
[389]174      kstp = nit000 + Agrif_Nb_Step()
[445]175!      IF ( Agrif_Root() .and. lwp) Write(*,*) '---'
[508]176!      IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp
[389]177#endif   
[3]178      indic = 1                    ! reset to no error condition
[508]179
[3]180      adatrj = adatrj + rdt/86400._wp
181
182      CALL day( kstp )             ! Calendar
183
[508]184      CALL rst_opn( kstp )         ! Open the restart file
185
[3]186      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[719]187      ! Update data, open boundaries and Forcings
[3]188      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
189
190      IF( lk_dtatem  )   CALL dta_tem( kstp )         ! update 3D temperature data
191
[719]192      IF( lk_dtasal  )   CALL dta_sal( kstp )         ! Salinity data
[3]193
[719]194      IF( lk_dtasst  )   CALL dta_sst( kstp )         ! Sea Surface Temperature data
195
196      IF( lk_dtasss  )   CALL dta_sss( kstp )         ! Sea Surface Salinity data
197
[35]198      IF( lk_obc     )   CALL obc_dta( kstp )         ! update dynamic and tracer data at open boundaries
[719]199
[3]200      IF( lk_obc     )   CALL obc_rad( kstp )         ! compute phase velocities at open boundaries
201
[719]202      IF( .NOT. lk_core )    CALL tau( kstp )         ! wind stress
203
204                         CALL flx_rnf( kstp )         ! runoff data
205
206                         CALL flx( kstp )             ! heat and freshwater fluxes
207
208      IF( lk_ice_lim )   CALL ice_stp( kstp )         ! sea-ice model (Update stress & fluxes)
209
210                         CALL oce_sbc( kstp )         ! ocean surface boudaries
211
212      IF( ln_fwb     )   CALL flx_fwb( kstp )         ! freshwater budget
213
214      IF( nclosea == 1 ) CALL flx_clo( kstp )         ! closed sea in the domain (update freshwater fluxes)
215
216      IF( kstp == nit000 ) THEN
217         IF( ninist == 1 ) THEN                       ! Output the initial state and forcings
218            CALL dia_wri_state( 'output.init' )
219         ENDIF
[3]220      ENDIF
221
[719]222      IF(ln_ctl) THEN         ! print mean trends (used for debugging)
223         CALL prt_ctl(tab2d_1=emp    , clinfo1=' emp  -   : ', mask1=tmask, ovlap=1)
224         CALL prt_ctl(tab2d_1=emps   , clinfo1=' emps -   : ', mask1=tmask, ovlap=1)
225         CALL prt_ctl(tab2d_1=qt     , clinfo1=' qt   -   : ', mask1=tmask, ovlap=1)
226         CALL prt_ctl(tab2d_1=qsr    , clinfo1=' qsr  -   : ', mask1=tmask, ovlap=1)
227         CALL prt_ctl(tab2d_1=runoff , clinfo1=' runoff   : ', mask1=tmask, ovlap=1)
228         CALL prt_ctl(tab3d_1=tmask  , clinfo1=' tmask    : ', mask1=tmask, ovlap=1, kdim=jpk)
229         CALL prt_ctl(tab3d_1=tn     , clinfo1=' sst  -   : ', mask1=tmask, ovlap=1, kdim=1)
230         CALL prt_ctl(tab3d_1=sn     , clinfo1=' sss  -   : ', mask1=tmask, ovlap=1, kdim=1)
231         CALL prt_ctl(tab2d_1=taux   , clinfo1=' tau  - x : ', mask1=umask, &
232            &         tab2d_2=tauy   , clinfo2='      - y : ', mask2=vmask,ovlap=1)
233      ENDIF
[3]234
[719]235
[3]236      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
237      ! Ocean physics update
238      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
239      !-----------------------------------------------------------------------
240      !  VERTICAL PHYSICS
241      !-----------------------------------------------------------------------
242      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
243      !-----------------------------------------------------------------------
244
[719]245                       CALL bn2( tb, sb, rn2 )              ! before Brunt-Vaisala frequency
[3]246     
247      !                                                     ! Vertical eddy viscosity and diffusivity coefficients
248      IF( lk_zdfric )   CALL zdf_ric( kstp )                       ! Richardson number dependent Kz
[789]249
[3]250      IF( lk_zdftke )   CALL zdf_tke( kstp )                       ! TKE closure scheme for Kz
[789]251
[255]252      IF( lk_zdfkpp )   CALL zdf_kpp( kstp )                       ! KPP closure scheme for Kz
[467]253
[677]254      IF( lk_zdfcst )   THEN                                       ! Constant Kz (reset avt, avm[uv] to the background value)
255         avt (:,:,:) = avt0 * tmask(:,:,:)
256         avmu(:,:,:) = avm0 * umask(:,:,:)
257         avmv(:,:,:) = avm0 * vmask(:,:,:)
258      ENDIF
[3]259
[719]260      IF( cp_cfg == "orca" ) THEN                           ! ORCA: Reduce vertical mixing in some specific areas
261         SELECT CASE ( jp_cfg )
262            CASE ( 05 )                         ! ORCA R2 configuration
263               avt  (:,:,2) = avt  (:,:,2) + 1.e-3 * upsrnfh(:,:)   ! increase diffusivity of rivers mouths
264            CASE ( 025 )                         ! ORCA R025 configuration
265               avt  (:,:,2) = avt  (:,:,2) + 2.e-3 * upsrnfh(:,:)   ! increase diffusivity of rivers mouths
266         END SELECT
[3]267      ENDIF
268
269      IF( ln_zdfevd )   CALL zdf_evd( kstp )                 ! enhanced vertical eddy diffusivity
270
[719]271      IF( lk_zdfddm .AND. .NOT. lk_zdfkpp)   &
[255]272         &              CALL zdf_ddm( kstp )                 ! double diffusive mixing
[3]273
[75]274                        CALL zdf_bfr( kstp )                 ! bottom friction
[3]275
276                        CALL zdf_mxl( kstp )                 ! mixed layer depth
277
278
279      !-----------------------------------------------------------------------
280      !  LATERAL PHYSICS
281      !-----------------------------------------------------------------------
282      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
283      !-----------------------------------------------------------------------
[719]284
[3]285      IF( lk_ldfslp     )   CALL ldf_slp( kstp, rhd, rn2 )       ! before slope of the lateral mixing
[719]286
[3]287#if defined key_traldf_c2d
288      IF( lk_traldf_eiv )   CALL ldf_eiv( kstp )                 ! eddy induced velocity coefficient
289#endif
290
[719]291
[3]292#if defined key_passivetrc
293      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
294      ! Passive Tracer Model
295      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
296      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
297      !-----------------------------------------------------------------------
[719]298
[345]299                             CALL trc_stp( kstp, indic )            ! time-stepping
[719]300
[3]301#endif
302
[719]303
[3]304      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
305      ! Active tracers
306      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
307      ! N.B. ua, va arrays are used as workspace in this section
308      !-----------------------------------------------------------------------
[719]309
[467]310                             ta(:,:,:) = 0.e0               ! set tracer trends to zero
311                             sa(:,:,:) = 0.e0
[3]312
[467]313                             CALL tra_sbc    ( kstp )       ! surface boundary condition
[719]314
[467]315      IF( ln_traqsr      )   CALL tra_qsr    ( kstp )       ! penetrative solar radiation qsr
[719]316
[467]317      IF( lk_trabbc      )   CALL tra_bbc    ( kstp )       ! bottom heat flux
[719]318
[467]319      IF( lk_trabbl_dif  )   CALL tra_bbl_dif( kstp )       ! diffusive bottom boundary layer scheme
320      IF( lk_trabbl_adv  )   CALL tra_bbl_adv( kstp )       ! advective (and/or diffusive) bottom boundary layer scheme
[719]321
[467]322      IF( lk_tradmp      )   CALL tra_dmp    ( kstp )       ! internal damping trends
[719]323
[467]324                             CALL tra_adv    ( kstp )       ! horizontal & vertical advection
[719]325
[467]326      IF( n_cla == 1     )   CALL tra_cla    ( kstp )       ! Cross Land Advection (Update Hor. advection)
[719]327
[467]328      IF( lk_zdfkpp )        CALL tra_kpp    ( kstp )       ! KPP non-local tracer fluxes
[719]329
[467]330                             CALL tra_ldf    ( kstp )       ! lateral mixing
[392]331#if defined key_agrif
[782]332      IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_tra          ! tracers sponge
[389]333#endif
[467]334                             CALL tra_zdf    ( kstp )       ! vertical mixing
[719]335
[467]336                             CALL tra_nxt( kstp )           ! tracer fields at next time step
[719]337
[467]338      IF( ln_zdfnpc      )   CALL tra_npc( kstp )           ! update the new (t,s) fields by non
339      !                                                     ! penetrative convective adjustment
[3]340
[467]341      IF( ln_dynhpg_imp  ) THEN                             ! semi-implicit hpg
342                               CALL eos( ta, sa, rhd, rhop )          ! Time-filtered in situ density used in dynhpg module
343         IF( ln_zps    )       CALL zps_hde( kstp, ta, sa, rhd,   &   ! Partial steps: time filtered hor. gradient
344            &                                     gtu, gsu, gru,  &   ! of t, s, rd at the bottom ocean level
345            &                                     gtv, gsv, grv )
346      ELSE                                                  ! centered hpg (default case)
347                               CALL eos( tb, sb, rhd, rhop )          ! now (swap=before) in situ density for dynhpg module
348         IF( ln_zps    )       CALL zps_hde( kstp, tb, sb, rhd,   &   ! Partial steps: now horizontal gradient
349            &                                     gtu, gsu, gru,  &   ! of t, s, rd at the bottom ocean level
350            &                                     gtv, gsv, grv )
[3]351      ENDIF
352
353      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
354      ! Dynamics
355      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
356      ! N.B. ta, sa arrays are used as workspace in this section
357      !-----------------------------------------------------------------------
[719]358
359
[75]360                               ua(:,:,:) = 0.e0               ! set dynamics trends to zero
361                               va(:,:,:) = 0.e0
[3]362
[643]363                               CALL dyn_adv( kstp )           ! advection (vector or flux form)
[719]364
[467]365                               CALL dyn_vor( kstp )           ! vorticity term including Coriolis
[719]366
[467]367                               CALL dyn_ldf( kstp )           ! lateral mixing
[392]368#if defined key_agrif
[782]369      IF(.NOT. Agrif_Root())   CALL Agrif_Sponge_dyn          ! momemtum sponge
[389]370#endif
[467]371                               CALL dyn_hpg( kstp )           ! horizontal gradient of Hydrostatic pressure
[719]372
[467]373                               CALL dyn_zdf( kstp )           ! vertical diffusion
[719]374
[467]375      IF( lk_dynspg_rl ) THEN
[75]376         IF( lk_obc    )       CALL obc_spg( kstp )           ! surface pressure gradient at open boundaries
[3]377      ENDIF
[719]378                       indic=0
379!i bug lbc sur emp
380      CALL lbc_lnk( emp, 'T', 1. )
381!i
[359]382                               CALL dyn_spg( kstp, indic )    ! surface pressure gradient
[719]383
[467]384                               CALL dyn_nxt( kstp )           ! lateral velocity at next time step
[719]385
[593]386      IF( lk_vvl )             CALL dom_vvl                   ! vertical mesh at next time step
[3]387
[593]388
[3]389      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
390      ! Computation of diagnostic variables
391      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
392      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
393      !-----------------------------------------------------------------------
[719]394
[3]395                       CALL oc_fz_pt                        ! ocean surface freezing temperature
[719]396
[3]397                       CALL div_cur( kstp )                 ! Horizontal divergence & Relative vorticity
[719]398
[3]399      IF( n_cla == 1 ) CALL div_cla( kstp )                 ! Cross Land Advection (Update Hor. divergence)
[719]400
[3]401                       CALL wzv( kstp )                     ! Vertical velocity
402
[719]403
404
[3]405      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[719]406      ! Control, and restarts
[3]407      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
[719]408      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
409      !-----------------------------------------------------------------------
410      !                                                     ! Time loop: control and print
[508]411                                 CALL stp_ctl( kstp, indic )
412      IF( indic < 0          )   CALL ctl_stop( 'step: indic < 0' )
[719]413
[508]414      IF( kstp == nit000     )   CALL iom_close( numror )             ! close input  ocean restart file
415      IF( lrst_oce           )   CALL rst_write  ( kstp )             ! write output ocean restart file
416      IF( lk_obc             )   CALL obc_rst_wri( kstp )             ! write open boundary restart file
[3]417
[508]418      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
419      ! diagnostics and outputs
420      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
421      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
422      !-----------------------------------------------------------------------
423
[719]424      IF ( nstop == 0 ) THEN                                ! Diagnostics
[75]425         IF( lk_floats  )   CALL flo_stp( kstp )                 ! drifting Floats
[216]426         IF( lk_trddyn  )   CALL trd_dwr( kstp )                 ! trends: dynamics
427         IF( lk_trdtra  )   CALL trd_twr( kstp )                 ! trends: active tracers
[75]428         IF( lk_trdmld  )   CALL trd_mld( kstp )                 ! trends: Mixed-layer
[108]429         IF( lk_trdvor  )   CALL trd_vor( kstp )                 ! trends: vorticity budget
[75]430         IF( lk_diaspr  )   CALL dia_spr( kstp )                 ! Surface pressure diagnostics
431         IF( lk_diahth  )   CALL dia_hth( kstp )                 ! Thermocline depth (20 degres isotherm depth)
432         IF( lk_diagap  )   CALL dia_gap( kstp )                 ! basin averaged diagnostics
433         IF( lk_diahdy  )   CALL dia_hdy( kstp )                 ! dynamical heigh diagnostics
434         IF( lk_diafwb  )   CALL dia_fwb( kstp )                 ! Fresh water budget diagnostics
[414]435         IF( ln_diaptr  )   CALL dia_ptr( kstp )                 ! Poleward TRansports diagnostics
[719]436
437         !                                                 ! Outputs
438                            CALL dia_wri    ( kstp, indic )      ! ocean model: outputs
[75]439      ENDIF
[3]440
[75]441      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
442      ! Coupled mode
443      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
[3]444
[75]445      IF( lk_cpl    )   CALL cpl_stp( kstp )                 ! coupled mode : field exchanges
[508]446      !
[3]447   END SUBROUTINE stp
448
449   !!======================================================================
450END MODULE step
Note: See TracBrowser for help on using the repository browser.