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.
trctrp.F90 in branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/TRP – NEMO

source: branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90 @ 6234

Last change on this file since 6234 was 6234, checked in by jpalmier, 8 years ago

JPALM -- 13-01-2016 -- add trn and tra stat print statement

File size: 6.8 KB
RevLine 
[941]1MODULE trctrp
2   !!======================================================================
3   !!                       ***  MODULE trctrp  ***
4   !! Ocean Physics    : manage the passive tracer transport
5   !!======================================================================
6   !! History :   1.0  !  2004-03 (C. Ethe) Original code
[2528]7   !!             3.3  !  2010-07 (C. Ethe) Merge TRA-TRC
[941]8   !!----------------------------------------------------------------------
9#if defined key_top
10   !!----------------------------------------------------------------------
11   !!   'key_top'                                                TOP models
12   !!----------------------------------------------------------------------
13   !!   trc_trp        : passive tracer transport
14   !!----------------------------------------------------------------------
15   USE oce_trc         ! ocean dynamics and active tracers variables
[2528]16   USE trc             ! ocean passive tracers variables
17   USE trcnam_trp      ! passive tracers transport namelist variables
18   USE trabbl          ! bottom boundary layer               (trc_bbl routine)
[941]19   USE trcbbl          ! bottom boundary layer               (trc_bbl routine)
[2528]20   USE zdfkpp          ! KPP non-local tracer fluxes         (trc_kpp routine)
[941]21   USE trcdmp          ! internal damping                    (trc_dmp routine)
[2528]22   USE trcldf          ! lateral mixing                      (trc_ldf routine)
23   USE trcadv          ! advection                           (trc_adv routine)
24   USE trczdf          ! vertical diffusion                  (trc_zdf routine)
[941]25   USE trcnxt          ! time-stepping                       (trc_nxt routine)
26   USE trcrad          ! positivity                          (trc_rad routine)
27   USE trcsbc          ! surface boundary condition          (trc_sbc routine)
[2528]28   USE zpshde          ! partial step: hor. derivative       (zps_hde routine)
[941]29
[1271]30#if defined key_agrif
[3680]31   USE agrif_top_sponge ! tracers sponges
32   USE agrif_top_update ! tracers updates
[1271]33#endif
34
[941]35   IMPLICIT NONE
36   PRIVATE
37
38   PUBLIC   trc_trp    ! called by trc_stp
39
40   !! * Substitutions
[1800]41#  include "top_substitute.h90"
[941]42   !!----------------------------------------------------------------------
[2528]43   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
[5729]44   !! $Id$
[2528]45   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
[941]46   !!----------------------------------------------------------------------
47
48CONTAINS
49
[2528]50   SUBROUTINE trc_trp( kstp )
[941]51      !!----------------------------------------------------------------------
52      !!                     ***  ROUTINE trc_trp  ***
53      !!                     
54      !! ** Purpose :   Management of passive tracers transport
55      !!
56      !! ** Method  : - Compute the passive tracers trends
57      !!              - Update the passive tracers
58      !!----------------------------------------------------------------------
[2528]59      INTEGER, INTENT( in ) ::  kstp  ! ocean time-step index
[941]60      !! ---------------------------------------------------------------------
[3294]61      !
62      IF( nn_timing == 1 )   CALL timing_start('trc_trp')
63      !
[2528]64      IF( .NOT. lk_c1d ) THEN
65         !
66                                CALL trc_sbc( kstp )            ! surface boundary condition
[6234]67# if defined key_debug_medusa
68         IF(lwp) WRITE(numout,*) ' MEDUSA trc_trp after trc_sbc at kt =', kt
69         CALL trc_rst_tra_stat
70         CALL flush(numout)
71# endif
[2528]72         IF( lk_trabbl )        CALL trc_bbl( kstp )            ! advective (and/or diffusive) bottom boundary layer scheme
[4148]73         IF( ln_trcdmp )        CALL trc_dmp( kstp )            ! internal damping trends
74         IF( ln_trcdmp_clo )    CALL trc_dmp_clo( kstp )        ! internal damping trends on closed seas only
[2528]75                                CALL trc_adv( kstp )            ! horizontal & vertical advection
[6234]76# if defined key_debug_medusa
77         IF(lwp) WRITE(numout,*) ' MEDUSA trc_trp after trc_adv at kt =', kt
78         CALL trc_rst_tra_stat
79         CALL flush(numout)
80# endif
[2528]81                                CALL trc_ldf( kstp )            ! lateral mixing
82         IF( .NOT. lk_offline .AND. lk_zdfkpp )    &
83            &                   CALL trc_kpp( kstp )            ! KPP non-local tracer fluxes
[1271]84#if defined key_agrif
[2528]85         IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc           ! tracers sponge
[1271]86#endif
[2528]87                                CALL trc_zdf( kstp )            ! vertical mixing and after tracer fields
[6234]88# if defined key_debug_medusa
89         IF(lwp) WRITE(numout,*) ' MEDUSA trc_trp after trc_zdf at kt =', kt
90         CALL trc_rst_tra_stat
91         CALL flush(numout)
92# endif
[2528]93                                CALL trc_nxt( kstp )            ! tracer fields at next time step     
[6234]94# if defined key_debug_medusa
95         IF(lwp) WRITE(numout,*) ' MEDUSA trc_trp after trc_nxt at kt =', kt
96         CALL trc_rst_tra_stat
97         CALL flush(numout)
98# endif
[2528]99         IF( ln_trcrad )        CALL trc_rad( kstp )            ! Correct artificial negative concentrations
[3680]100
101#if defined key_agrif
102      IF( .NOT. Agrif_Root())   CALL Agrif_Update_Trc( kstp )   ! Update tracer at AGRIF zoom boundaries : children only
103#endif
[5120]104
105         IF( ln_zps  .AND. .NOT. ln_isfcav)        &
106            &            CALL zps_hde    ( kstp, jptra, trn, gtru, gtrv )   ! Partial steps: now horizontal gradient of passive
107         IF( ln_zps .AND.        ln_isfcav)        &
108            &            CALL zps_hde_isf( kstp, jptra, trn, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi )  ! Partial steps: now horizontal gradient of passive
[2528]109                                                                ! tracers at the bottom ocean level
110         !
111      ELSE                                               ! 1D vertical configuration
112                                CALL trc_sbc( kstp )            ! surface boundary condition
113         IF( .NOT. lk_offline .AND. lk_zdfkpp )    &
114            &                   CALL trc_kpp( kstp )            ! KPP non-local tracer fluxes
115                                CALL trc_zdf( kstp )            ! vertical mixing and after tracer fields
116                                CALL trc_nxt( kstp )            ! tracer fields at next time step     
117          IF( ln_trcrad )       CALL trc_rad( kstp )            ! Correct artificial negative concentrations
118         !
119      END IF
[941]120      !
[3294]121      IF( nn_timing == 1 )   CALL timing_stop('trc_trp')
122      !
[941]123   END SUBROUTINE trc_trp
124
125#else
126   !!----------------------------------------------------------------------
127   !!   Dummy module :                                        No TOP models
128   !!----------------------------------------------------------------------
129CONTAINS
[3680]130   SUBROUTINE trc_trp( kstp )              ! Empty routine
131      INTEGER, INTENT(in) ::   kstp
132      WRITE(*,*) 'trc_trp: You should not have seen this print! error?', kstp
[941]133   END SUBROUTINE trc_trp
134#endif
135   
136   !!======================================================================
137END MODULE trctrp
Note: See TracBrowser for help on using the repository browser.