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/2017/dev_r7963_nemo_v3_6_AGRIF-3_AGRIFVVL/NEMOGCM/NEMO/TOP_SRC/TRP – NEMO

source: branches/2017/dev_r7963_nemo_v3_6_AGRIF-3_AGRIFVVL/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90 @ 8010

Last change on this file since 8010 was 8010, checked in by jchanut, 7 years ago

AGRIF vvl add on

  • Property svn:keywords set to Id
File size: 5.8 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
30#if defined key_agrif
31   USE agrif_top_sponge ! tracers sponges
32#endif
33
34   IMPLICIT NONE
35   PRIVATE
36
37   PUBLIC   trc_trp    ! called by trc_stp
38
39   !! * Substitutions
40#  include "top_substitute.h90"
41   !!----------------------------------------------------------------------
42   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
43   !! $Id$
44   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
45   !!----------------------------------------------------------------------
46
47CONTAINS
48
49   SUBROUTINE trc_trp( kstp )
50      !!----------------------------------------------------------------------
51      !!                     ***  ROUTINE trc_trp  ***
52      !!                     
53      !! ** Purpose :   Management of passive tracers transport
54      !!
55      !! ** Method  : - Compute the passive tracers trends
56      !!              - Update the passive tracers
57      !!----------------------------------------------------------------------
58      INTEGER, INTENT( in ) ::  kstp  ! ocean time-step index
59      !! ---------------------------------------------------------------------
60      !
61      IF( nn_timing == 1 )   CALL timing_start('trc_trp')
62      !
63      IF( .NOT. lk_c1d ) THEN
64         !
65                                CALL trc_sbc( kstp )            ! surface boundary condition
66         IF( lk_trabbl )        CALL trc_bbl( kstp )            ! advective (and/or diffusive) bottom boundary layer scheme
67         IF( ln_trcdmp )        CALL trc_dmp( kstp )            ! internal damping trends
68                                CALL trc_adv( kstp )            ! horizontal & vertical advection
69         IF( ln_zps ) THEN
70           IF( ln_isfcav ) THEN ; CALL zps_hde_isf( kstp, jptra, trb, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi )  ! both top & bottom
71           ELSE                 ; CALL zps_hde    ( kstp, jptra, trb, gtru, gtrv )                                      !  only bottom
72           ENDIF
73         ENDIF
74                                CALL trc_ldf( kstp )            ! lateral mixing
75         IF( .NOT. lk_offline .AND. lk_zdfkpp )    &
76            &                   CALL trc_kpp( kstp )            ! KPP non-local tracer fluxes
77#if defined key_agrif
78         IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc           ! tracers sponge
79#endif
80                                CALL trc_zdf( kstp )            ! vertical mixing and after tracer fields
81         !
82                                CALL trc_nxt( kstp )            ! tracer fields at next time step     
83         IF( ln_trcrad )        CALL trc_rad( kstp )            ! Correct artificial negative concentrations
84         IF( ln_trcdmp_clo )    CALL trc_dmp_clo( kstp )        ! internal damping trends on closed seas only
85
86      ELSE                                               ! 1D vertical configuration
87                                CALL trc_sbc( kstp )            ! surface boundary condition
88         IF( .NOT. lk_offline .AND. lk_zdfkpp )    &
89            &                   CALL trc_kpp( kstp )            ! KPP non-local tracer fluxes
90                                CALL trc_zdf( kstp )            ! vertical mixing and after tracer fields
91                                CALL trc_nxt( kstp )            ! tracer fields at next time step     
92          IF( ln_trcrad )       CALL trc_rad( kstp )            ! Correct artificial negative concentrations
93         !
94      END IF
95      !
96      IF( nn_timing == 1 )   CALL timing_stop('trc_trp')
97      !
989400  FORMAT(a25,i4,D23.16)
99      !
100   END SUBROUTINE trc_trp
101
102#else
103   !!----------------------------------------------------------------------
104   !!   Dummy module :                                        No TOP models
105   !!----------------------------------------------------------------------
106CONTAINS
107   SUBROUTINE trc_trp( kstp )              ! Empty routine
108      INTEGER, INTENT(in) ::   kstp
109      WRITE(*,*) 'trc_trp: You should not have seen this print! error?', kstp
110   END SUBROUTINE trc_trp
111#endif
112   
113   !!======================================================================
114END MODULE trctrp
Note: See TracBrowser for help on using the repository browser.