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

source: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90 @ 9019

Last change on this file since 9019 was 9019, checked in by timgraham, 6 years ago

Merge of dev_CNRS_2017 into branch

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