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_cpd.F90 in branches/TAM_V3_0/NEMOTAM/OPATAM_SRC – NEMO

source: branches/TAM_V3_0/NEMOTAM/OPATAM_SRC/step_cpd.F90 @ 2587

Last change on this file since 2587 was 2587, checked in by vidard, 13 years ago

refer to ticket #798

File size: 22.8 KB
Line 
1MODULE step_cpd
2   !!======================================================================
3   !!                       ***  MODULE step  ***
4   !! Time-stepping    : manager of the ocean, tracer and ice time stepping
5   !!======================================================================
6   !! History :        !  91-03  (G. Madec)  Original code
7   !!                  !  92-06  (M. Imbard)  add a first output record
8   !!                  !  96-04  (G. Madec)  introduction of dynspg
9   !!                  !  96-04  (M.A. Foujols)  introduction of passive tracer
10   !!             8.0  !  97-06  (G. Madec)  new architecture of call
11   !!             8.2  !  97-06  (G. Madec, M. Imbard, G. Roullet)  free surface
12   !!             8.2  !  99-02  (G. Madec, N. Grima)  hpg implicit
13   !!             8.2  !  00-07  (J-M Molines, M. Imbard)  Open Bondary Conditions
14   !!             9.0  !  02-06  (G. Madec)  free form, suppress macro-tasking
15   !!             " "  !  04-08  (C. Talandier) New trends organization
16   !!             " "  !  05-01  (C. Ethe) Add the KPP closure scheme
17   !!             " "  !  05-11  (V. Garnier) Surface pressure gradient organization
18   !!             " "  !  05-11  (G. Madec)  Reorganisation of tra and dyn calls
19   !!             " "  !  06-01  (L. Debreu, C. Mazauric)  Agrif implementation
20   !!             " "  !  06-07  (S. Masson)  restart using iom
21   !!             " "  !  06-08  (G. Madec)  surface module
22   !!    "        " "  !  07-04  (K. Mogensen, A. Weaver, M. Martin) Assimilation interface
23   !!             " "  !  07-07  (J. Chanut, A. Sellar) Unstructured open boundaries (BDY)
24   !!----------------------------------------------------------------------
25
26   !!----------------------------------------------------------------------
27   !!   stp            : OPA system time-stepping
28   !!----------------------------------------------------------------------
29   USE oce             ! ocean dynamics and tracers variables
30   USE dom_oce         ! ocean space and time domain variables
31   USE zdf_oce         ! ocean vertical physics variables
32   USE ldftra_oce      ! ocean tracer   - trends
33   USE ldfdyn_oce      ! ocean dynamics - trends
34   USE cpl_oce         ! coupled ocean-atmosphere variables
35   USE in_out_manager  ! I/O manager
36   USE iom             !
37   USE lbclnk
38
39   USE daymod          ! calendar                         (day     routine)
40
41   USE dtatem          ! ocean temperature data           (dta_tem routine)
42   USE dtasal          ! ocean salinity    data           (dta_sal routine)
43   USE sbcmod          ! surface boundary condition       (sbc     routine)
44   USE sbcrnf          ! surface boundary condition: runoff variables
45
46   USE trcstp          ! passive tracer time-stepping      (trc_stp routine)
47
48   USE traqsr          ! solar radiation penetration      (tra_qsr routine)
49   USE trasbc          ! surface boundary condition       (tra_sbc routine)
50   USE trabbc          ! bottom boundary condition        (tra_bbc routine)
51   USE trabbl          ! bottom boundary layer            (tra_bbl routine)
52   USE tradmp          ! internal damping                 (tra_dmp routine)
53   USE traadv          ! advection scheme control     (tra_adv_ctl routine)
54   USE traldf          ! lateral mixing                   (tra_ldf routine)
55   USE cla             ! cross land advection             (tra_cla routine)
56   !   zdfkpp          ! KPP non-local tracer fluxes      (tra_kpp routine)
57   USE trazdf          ! vertical mixing                  (tra_zdf routine)
58   USE tranxt          ! time-stepping                    (tra_nxt routine)
59   USE tranpc          ! non-penetrative convection       (tra_npc routine)
60   USE trachk          ! check values of salinity         (tra_chk routine)
61
62   USE eosbn2          ! equation of state                (eos_bn2 routine)
63
64   USE dynadv          ! advection                        (dyn_adv routine)
65   USE dynvor          ! vorticity term                   (dyn_vor routine)
66   USE dynhpg          ! hydrostatic pressure grad.       (dyn_hpg routine)
67   USE dynldf          ! lateral momentum diffusion       (dyn_ldf routine)
68   USE dynzdf          ! vertical diffusion               (dyn_zdf routine)
69   USE dynspg_oce      ! surface pressure gradient        (dyn_spg routine)
70   USE dynspg          ! surface pressure gradient        (dyn_spg routine)
71   USE dynnxt          ! time-stepping                    (dyn_nxt routine)
72
73   USE obc_par         ! open boundary condition variables
74   USE obcdta          ! open boundary condition data     (obc_dta routine)
75   USE obcrst          ! open boundary cond. restart      (obc_rst routine)
76   USE obcrad          ! open boundary cond. radiation    (obc_rad routine)
77   USE obcspg          ! open boundary cond  spg          (obc_spg routine)
78
79   USE bdy_par         ! unstructured open boundary data variables
80   USE bdydta          ! unstructured open boundary data  (bdy_dta routine)
81
82   USE divcur          ! hor. divergence and curl      (div & cur routines)
83   USE cla_div         ! cross land: hor. divergence      (div_cla routine)
84   USE wzvmod          ! vertical velocity                (wzv     routine)
85
86   USE ldfslp          ! iso-neutral slopes               (ldf_slp routine)
87   USE ldfeiv          ! eddy induced velocity coef.      (ldf_eiv routine)
88
89   USE zdfbfr          ! bottom friction                  (zdf_bfr routine)
90   USE zdftke          ! TKE vertical mixing              (zdf_tke routine)
91   USE zdfkpp          ! KPP vertical mixing              (zdf_kpp routine)
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)
98   USE ice_oce         ! sea-ice variable
99
100   USE diawri          ! Standard run outputs             (dia_wri routine)
101   USE trdicp          ! Ocean momentum/tracers trends    (trd_wri routine)
102   USE trdmld          ! mixed-layer trends               (trd_mld routine)
103   USE trdmld_rst      ! restart for mixed-layer trends
104   USE trdmod_oce      ! ocean momentum/tracers trends
105   USE trdvor          ! vorticity budget                 (trd_vor routine)
106   USE diagap          ! hor. mean model-data gap         (dia_gap routine)
107   USE diahdy          ! dynamic height                   (dia_hdy routine)
108   USE diaptr          ! poleward transports              (dia_ptr routine)
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 diaobs          ! obs-minus-model (assimilation)   (dia_obs routine)
113   USE flo_oce         ! floats variables
114   USE floats          ! floats computation               (flo_stp routine)
115   USE asminc          ! assimilation increments         
116   USE asmbkg          ! writing out background term   
117   USE tamtrj          ! writing out state trajectory       
118   USE stpctl          ! time stepping control            (stp_ctl routine)
119   USE restart         ! ocean restart                    (rst_wri routine)
120   USE prtctl          ! Print control                    (prt_ctl routine)
121   USE domvvl          ! variable volume                  (dom_vvl routine)
122
123#if defined key_agrif
124   USE agrif_opa_sponge ! Momemtum and tracers sponges
125#endif
126
127   IMPLICIT NONE
128   PRIVATE
129
130   PUBLIC stp_cpd            ! called by opa.F90
131
132   !! * Substitutions
133#  include "domzgr_substitute.h90"
134#  include "zdfddm_substitute.h90"
135   !!----------------------------------------------------------------------
136   !!   OPA 9.0 , LOCEAN-IPSL (2005)
137   !! $Id$
138   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
139   !!----------------------------------------------------------------------
140
141CONTAINS
142
143#if defined key_agrif
144   SUBROUTINE stp_cpd( )
145#else
146   SUBROUTINE stp_cpd( kstp )
147#endif
148      !!----------------------------------------------------------------------
149      !!                     ***  ROUTINE stp  ***
150      !!                     
151      !! ** Purpose : - Time stepping of OPA (momentum and active tracer eqs.)
152      !!              - Time stepping of LIM (dynamic and thermodynamic eqs.)
153      !!              - Tme stepping  of TRC (passive tracer eqs.)
154      !!
155      !! ** Method  : -1- Update forcings and data 
156      !!              -2- Update ocean physics
157      !!              -3- Compute the t and s trends
158      !!              -4- Update t and s
159      !!              -5- Compute the momentum trends
160      !!              -6- Update the horizontal velocity
161      !!              -7- Compute the diagnostics variables (rd,N2, div,cur,w)
162      !!              -8- Outputs and diagnostics
163      !!----------------------------------------------------------------------
164      !! * Arguments
165#if defined key_agrif   
166      INTEGER             ::   kstp   ! ocean time-step index
167#else
168      INTEGER, INTENT(in) ::   kstp   ! ocean time-step index
169#endif     
170      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zta_tmp, zsa_tmp
171      INTEGER ::   jk       ! dummy loop indice
172      INTEGER ::   indic    ! error indicator if < 0
173      !! ---------------------------------------------------------------------
174
175#if defined key_agrif
176      kstp = nit000 + Agrif_Nb_Step()
177!      IF ( Agrif_Root() .and. lwp) Write(*,*) '---'
178!      IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp
179#endif   
180      indic = 1                    ! reset to no error condition
181
182      CALL day( kstp )             ! Calendar
183
184      CALL rst_opn( kstp )         ! Open the restart file
185
186      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
187      ! Update data, open boundaries, surface boundary condition (including sea-ice)
188      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
189
190      IF( lk_dtatem  )   CALL dta_tem( kstp )         ! update 3D temperature data
191      IF( lk_dtasal  )   CALL dta_sal( kstp )         ! update 3D salinity data
192
193                         CALL sbc    ( kstp )         ! Sea Boundary Condition (including sea-ice)
194
195      IF( lk_obc     )   CALL obc_dta( kstp )         ! update dynamic and tracer data at open boundaries
196      IF( lk_obc     )   CALL obc_rad( kstp )         ! compute phase velocities at open boundaries
197
198      IF( lk_bdy     )   CALL bdy_dta( kstp )         ! update dynamic and tracer data at unstructured open boundary
199
200      IF( ninist == 1 ) THEN                       ! Output the initial state and forcings
201                        CALL dia_wri_state( 'output.init' )
202                        ninist = 0
203      ENDIF
204
205
206      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
207      ! Ocean physics update
208      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
209      !-----------------------------------------------------------------------
210      !  VERTICAL PHYSICS
211      !-----------------------------------------------------------------------
212      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
213      !-----------------------------------------------------------------------
214
215                        CALL bn2( tb, sb, rn2 )              ! before Brunt-Vaisala frequency
216     
217      !                                                     ! Vertical eddy viscosity and diffusivity coefficients
218      IF( lk_zdfric )   CALL zdf_ric( kstp )                       ! Richardson number dependent Kz
219
220      IF( lk_zdftke )   CALL zdf_tke( kstp )                       ! TKE closure scheme for Kz
221      IF( lk_zdfkpp )   CALL zdf_kpp( kstp )                       ! KPP closure scheme for Kz
222
223      IF( lk_zdfcst )   THEN                                       ! Constant Kz (reset avt, avm[uv] to the background value)
224         avt (:,:,:) = avt0 * tmask(:,:,:)
225         avmu(:,:,:) = avm0 * umask(:,:,:)
226         avmv(:,:,:) = avm0 * vmask(:,:,:)
227      ENDIF
228
229      IF( ln_rnf_mouth ) THEN                                ! increase diffusivity at rivers mouths
230         DO jk = 2, nkrnf   ;   avt(:,:,jk) = avt(:,:,jk) + 2.e0 * rn_avt_rnf * rnfmsk(:,:)   ;   END DO
231      ENDIF
232
233      IF( ln_zdfevd )   CALL zdf_evd( kstp )                 ! enhanced vertical eddy diffusivity
234
235      IF( lk_zdfddm .AND. .NOT. lk_zdfkpp )   &
236         &              CALL zdf_ddm( kstp )                 ! double diffusive mixing
237
238                        CALL zdf_bfr( kstp )                 ! bottom friction
239
240                        CALL zdf_mxl( kstp )                 ! mixed layer depth
241
242
243      !-----------------------------------------------------------------------
244      !  LATERAL PHYSICS
245      !-----------------------------------------------------------------------
246      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
247      !-----------------------------------------------------------------------
248      IF( lk_ldfslp     )   CALL ldf_slp( kstp, rhd, rn2 )       ! before slope of the lateral mixing
249#if defined key_traldf_c2d
250      IF( lk_traldf_eiv )   CALL ldf_eiv( kstp )                 ! eddy induced velocity coefficient
251#endif
252
253#if defined key_top
254      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
255      ! Passive Tracer Model
256      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
257      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
258      !-----------------------------------------------------------------------
259                             CALL trc_stp( kstp, indic )            ! time-stepping
260#endif
261
262      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
263      ! Active tracers
264      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
265      ! N.B. ua, va arrays are used as workspace in this section
266      !-----------------------------------------------------------------------
267                             ta(:,:,:) = 0.e0               ! set tracer trends to zero
268                             sa(:,:,:) = 0.e0
269
270      IF(  ln_asmiau .AND. &
271         & ln_trainc     )   CALL tra_asm_inc( kstp )       ! apply tracer assimilation increment
272                             CALL tra_sbc    ( kstp )       ! surface boundary condition
273      IF( ln_traqsr      )   CALL tra_qsr    ( kstp )       ! penetrative solar radiation qsr
274      IF( lk_trabbc      )   CALL tra_bbc    ( kstp )       ! bottom heat flux
275      IF( lk_trabbl_dif  )   CALL tra_bbl_dif( kstp )       ! diffusive bottom boundary layer scheme
276      IF( lk_trabbl_adv  )   CALL tra_bbl_adv( kstp )       ! advective (and/or diffusive) bottom boundary layer scheme
277      IF( lk_tradmp      )   CALL tra_dmp    ( kstp )       ! internal damping trends
278!                             CALL tra_adv    ( kstp )       ! horizontal & vertical advection
279!      IF( n_cla == 1     )   CALL tra_cla    ( kstp )       ! Cross Land Advection (Update Hor. advection)
280      IF( lk_zdfkpp )        CALL tra_kpp    ( kstp )       ! KPP non-local tracer fluxes
281!                             CALL tra_ldf    ( kstp )       ! lateral mixing
282#if defined key_agrif
283      IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_tra          ! tracers sponge
284#endif
285!                             CALL tra_zdf    ( kstp )       ! vertical mixing and after tracer fields
286      IF( ln_zdfnpc      )   CALL tra_npc    ( kstp )       ! update after fields by non-penetrative convection
287!                             CALL tra_nxt    ( kstp )       ! tracer fields at next time step
288      IF( ln_dynhpg_imp  ) THEN                             ! semi-implicit hpg
289                               CALL eos( ta, sa, rhd, rhop )          ! Time-filtered in situ density used in dynhpg module
290         IF( ln_zps    )       CALL zps_hde( kstp, ta, sa, rhd,   &   ! Partial steps: time filtered hor. gradient
291            &                                     gtu, gsu, gru,  &   ! of t, s, rd at the bottom ocean level
292            &                                     gtv, gsv, grv )
293      ELSE                                                  ! centered hpg (default case)
294                               CALL eos( tb, sb, rhd, rhop )          ! now (swap=before) in situ density for dynhpg module
295         IF( ln_zps    )       CALL zps_hde( kstp, tb, sb, rhd,   &   ! Partial steps: now horizontal gradient
296            &                                     gtu, gsu, gru,  &   ! of t, s, rd at the bottom ocean level
297            &                                     gtv, gsv, grv )
298      ENDIF
299
300      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
301      ! saving ta and sa (temporary fix, please do not remove)
302      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
303                               zta_tmp(:,:,:) = ta(:,:,:)
304                               zsa_tmp(:,:,:) = sa(:,:,:)
305
306      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
307      ! Dynamics
308      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
309      ! N.B. ta, sa arrays are used as workspace in this section
310      !-----------------------------------------------------------------------
311                               ua(:,:,:) = 0.e0               ! set dynamics trends to zero
312                               va(:,:,:) = 0.e0
313
314      IF(  ln_asmiau .AND. &
315         & ln_dyninc     )     CALL dyn_asm_inc( kstp )       ! apply dynamics assimilation increment
316
317                               CALL dyn_adv( kstp )           ! advection (vector or flux form)
318                               CALL dyn_vor( kstp )           ! vorticity term including Coriolis
319                               CALL dyn_ldf( kstp )           ! lateral mixing
320#if defined key_agrif
321      IF(.NOT. Agrif_Root())   CALL Agrif_Sponge_dyn          ! momemtum sponge
322#endif
323                               CALL dyn_hpg( kstp )           ! horizontal gradient of Hydrostatic pressure
324                               CALL dyn_zdf( kstp )           ! vertical diffusion
325      IF( lk_dynspg_rl ) THEN
326         IF( lk_obc    )       CALL obc_spg( kstp )           ! surface pressure gradient at open boundaries
327      ENDIF
328                               indic=0
329                               CALL dyn_spg( kstp, indic )    ! surface pressure gradient
330                               CALL dyn_nxt( kstp )           ! lateral velocity at next time step
331      IF( lk_vvl )             CALL dom_vvl                   ! vertical mesh at next time step
332
333
334      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
335      ! Computation of diagnostic variables
336      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
337      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
338      !-----------------------------------------------------------------------
339                       CALL div_cur( kstp )                 ! Horizontal divergence & Relative vorticity
340      IF( n_cla == 1 ) CALL div_cla( kstp )                 ! Cross Land Advection (Update Hor. divergence)
341                       CALL wzv( kstp )                     ! Vertical velocity
342
343      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
344      ! Control and restarts
345      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
346                                 CALL stp_ctl( kstp, indic )
347      IF( indic < 0          )   CALL ctl_stop( 'step: indic < 0' )
348      IF( kstp == nit000     )   CALL iom_close( numror )             ! close input  ocean restart file
349      IF( lrst_oce           )   CALL rst_write  ( kstp )             ! write output ocean restart file
350      IF( lk_obc             )   CALL obc_rst_write( kstp )           ! write open boundary restart file
351
352      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
353      ! diagnostics and outputs
354      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
355      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
356      !-----------------------------------------------------------------------
357
358      IF( nstop == 0 ) THEN                                 ! Diagnostics:
359         IF( lk_floats  )   CALL flo_stp( kstp )                 ! drifting Floats
360         IF( lk_trddyn  )   CALL trd_dwr( kstp )                 ! trends: dynamics
361         IF( lk_trdtra  )   CALL trd_twr( kstp )                 ! trends: active tracers
362         IF( lk_trdmld  )   CALL trd_mld( kstp )                 ! trends: Mixed-layer
363         IF( lk_trdvor  )   CALL trd_vor( kstp )                 ! trends: vorticity budget
364         IF( lk_diaspr  )   CALL dia_spr( kstp )                 ! Surface pressure diagnostics
365         IF( lk_diahth  )   CALL dia_hth( kstp )                 ! Thermocline depth (20 degres isotherm depth)
366         IF( lk_diagap  )   CALL dia_gap( kstp )                 ! basin averaged diagnostics
367         IF( lk_diahdy  )   CALL dia_hdy( kstp )                 ! dynamical heigh diagnostics
368         IF( lk_diafwb  )   CALL dia_fwb( kstp )                 ! Fresh water budget diagnostics
369         IF( lk_diaobs  )   CALL dia_obs( kstp )                 ! obs-minus-model (assimilation) diagnostics
370         IF( ln_diaptr  )   CALL dia_ptr( kstp )                 ! Poleward TRansports diagnostics
371
372         !                                                 ! Outputs
373 
374
375      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
376      ! restoring ta and sa (temporary fix, please do not remove)
377      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
378                            ta(:,:,:) = zta_tmp(:,:,:)
379                            sa(:,:,:) = zsa_tmp(:,:,:)
380
381         !                                                 ! Outputs
382                            CALL dia_wri    ( kstp, indic )      ! ocean model: outputs
383
384      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
385      ! Assimilation mode
386      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
387
388         IF( lk_asminc ) THEN
389            IF( ln_bkgwri ) CALL asm_bkg_wri( kstp )       ! Output background fields
390            IF( ln_trjwri ) CALL tam_trj_wri( kstp )       ! Output trajectory fields
391            IF( ln_asmdin ) THEN                           ! Direct initialization
392               IF( ln_trainc ) CALL tra_asm_inc( kstp )        ! Tracers
393               IF( ln_dyninc ) CALL dyn_asm_inc( kstp )        ! Dynamics
394               IF( ln_sshinc ) CALL ssh_asm_inc( kstp )        ! SSH
395            ENDIF
396         ENDIF
397
398      ENDIF
399
400      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
401      ! Coupled mode
402      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
403
404#if defined key_oasis3
405      IF( lk_cpl    )   CALL cpl_stp( kstp )                 ! coupled mode : field exchanges
406#endif
407      !
408   END SUBROUTINE stp_cpd
409
410   !!======================================================================
411END MODULE step_cpd
Note: See TracBrowser for help on using the repository browser.