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/UKMO/AMM15_v3_6_STABLE_package_collate_coupling/NEMOGCM/NEMO/TOP_SRC/TRP – NEMO

source: branches/UKMO/AMM15_v3_6_STABLE_package_collate_coupling/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90 @ 11186

Last change on this file since 11186 was 11186, checked in by kingr, 5 years ago

Merging changes from AMM15_v3_6_STABLE_package_collate r10728:11063

File size: 6.5 KB
Line 
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
7   !!             3.3  !  2010-07 (C. Ethe) Merge TRA-TRC
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
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)
19   USE trcbbl          ! bottom boundary layer               (trc_bbl routine)
20   USE zdfkpp          ! KPP non-local tracer fluxes         (trc_kpp routine)
21   USE trcdmp          ! internal damping                    (trc_dmp routine)
22   USE trcldf          ! lateral mixing                      (trc_ldf routine)
23   USE trcadv          ! advection                           (trc_adv routine)
24   USE trczdf          ! vertical diffusion                  (trc_zdf routine)
25   USE trcnxt          ! time-stepping                       (trc_nxt routine)
26   USE trcrad          ! positivity                          (trc_rad routine)
27   USE trcsbc          ! surface boundary condition          (trc_sbc routine)
28   USE zpshde          ! partial step: hor. derivative       (zps_hde routine)
29   USE trcbdy          ! BDY open boundaries
30   USE bdy_par, only: lk_bdy
31   USE trcsbcssr
32
33#if defined key_agrif
34   USE agrif_top_sponge ! tracers sponges
35   USE agrif_top_update ! tracers updates
36#endif
37
38   IMPLICIT NONE
39   PRIVATE
40
41   PUBLIC   trc_trp    ! called by trc_stp
42
43   !! * Substitutions
44#  include "top_substitute.h90"
45   !!----------------------------------------------------------------------
46   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
47   !! $Id$
48   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
49   !!----------------------------------------------------------------------
50
51CONTAINS
52
53   SUBROUTINE trc_trp( kstp )
54      !!----------------------------------------------------------------------
55      !!                     ***  ROUTINE trc_trp  ***
56      !!                     
57      !! ** Purpose :   Management of passive tracers transport
58      !!
59      !! ** Method  : - Compute the passive tracers trends
60      !!              - Update the passive tracers
61      !!----------------------------------------------------------------------
62      INTEGER, INTENT( in ) ::  kstp  ! ocean time-step index
63      !! ---------------------------------------------------------------------
64      !
65      IF( nn_timing == 1 )   CALL timing_start('trc_trp')
66      !
67      IF( .NOT. lk_c1d ) THEN
68         !
69         IF( nn_chldmp > 0 )    CALL trc_sbc_ssr( kstp )        ! add Chl damping term
70                                CALL trc_sbc( kstp )            ! surface boundary condition
71         IF( lk_trabbl )        CALL trc_bbl( kstp )            ! advective (and/or diffusive) bottom boundary layer scheme
72         IF( ln_trcdmp )        CALL trc_dmp( kstp )            ! internal damping trends
73         IF( ln_trcdmp_clo )    CALL trc_dmp_clo( kstp )        ! internal damping trends on closed seas only
74         IF( lk_bdy )           CALL trc_bdy_dmp( kstp )        ! BDY damping trends
75                                CALL trc_adv( kstp )            ! horizontal & vertical advection
76                                CALL trc_ldf( kstp )            ! lateral mixing
77         IF( .NOT. lk_offline .AND. lk_zdfkpp )    &
78            &                   CALL trc_kpp( kstp )            ! KPP non-local tracer fluxes
79#if defined key_agrif
80         IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc           ! tracers sponge
81#endif
82                                CALL trc_zdf( kstp )            ! vertical mixing and after tracer fields
83                                CALL trc_nxt( kstp )            ! tracer fields at next time step     
84         IF( ln_trcrad )        CALL trc_rad( kstp )            ! Correct artificial negative concentrations
85
86#if defined key_agrif
87      IF( .NOT. Agrif_Root())   CALL Agrif_Update_Trc( kstp )   ! Update tracer at AGRIF zoom boundaries : children only
88#endif
89
90         IF( ln_zps  .AND. .NOT. ln_isfcav)        &
91            &            CALL zps_hde    ( kstp, jptra, trn, gtru, gtrv )   ! Partial steps: now horizontal gradient of passive
92         IF( ln_zps .AND.        ln_isfcav)        &
93            &            CALL zps_hde_isf( kstp, jptra, trn, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi )  ! Partial steps: now horizontal gradient of passive
94                                                                ! tracers at the bottom ocean level
95         !
96      ELSE                                               ! 1D vertical configuration
97         IF( nn_chldmp > 0 )    CALL trc_sbc_ssr( kstp )        ! add Chl damping term
98                                CALL trc_sbc( kstp )            ! surface boundary condition
99         IF( .NOT. lk_offline .AND. lk_zdfkpp )    &
100            &                   CALL trc_kpp( kstp )            ! KPP non-local tracer fluxes
101                                CALL trc_zdf( kstp )            ! vertical mixing and after tracer fields
102                                CALL trc_nxt( kstp )            ! tracer fields at next time step     
103          IF( ln_trcrad )       CALL trc_rad( kstp )            ! Correct artificial negative concentrations
104         !
105      END IF
106      !
107      IF( nn_timing == 1 )   CALL timing_stop('trc_trp')
108      !
109   END SUBROUTINE trc_trp
110
111#else
112   !!----------------------------------------------------------------------
113   !!   Dummy module :                                        No TOP models
114   !!----------------------------------------------------------------------
115CONTAINS
116   SUBROUTINE trc_trp( kstp )              ! Empty routine
117      INTEGER, INTENT(in) ::   kstp
118      WRITE(*,*) 'trc_trp: You should not have seen this print! error?', kstp
119   END SUBROUTINE trc_trp
120#endif
121   
122   !!======================================================================
123END MODULE trctrp
Note: See TracBrowser for help on using the repository browser.