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 NEMO/trunk/src/TOP/TRP – NEMO

source: NEMO/trunk/src/TOP/TRP/trctrp.F90 @ 14032

Last change on this file since 14032 was 14032, checked in by rlod, 3 years ago

merging r13541_TOP-01_rlod_Antarctic_ice_Sheet_Fe_Source into trunk@14031

  • Property svn:keywords set to Id
File size: 6.9 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 trcatf          ! time filtering                      (trc_atf routine)
23   USE trcrad          ! positivity                          (trc_rad routine)
24   USE trcsbc          ! surface boundary condition          (trc_sbc routine)
25   USE trcbc           ! Tracers boundary condtions          ( trc_bc routine)
26   USE trcais          ! Antarctic Ice Sheet tracers         (trc_ais routine)
27   USE zpshde          ! partial step: hor. derivative       (zps_hde routine)
28   USE bdy_oce   , ONLY: ln_bdy
29   USE trcbdy          ! BDY open boundaries
30
31#if defined key_agrif
32   USE agrif_top_sponge ! tracers sponges
33#endif
34
35   IMPLICIT NONE
36   PRIVATE
37
38   PUBLIC   trc_trp    ! called by trc_stp
39
40   !!----------------------------------------------------------------------
41   !! NEMO/TOP 4.0 , NEMO Consortium (2018)
42   !! $Id$
43   !! Software governed by the CeCILL license (see ./LICENSE)
44   !!----------------------------------------------------------------------
45
46CONTAINS
47
48   SUBROUTINE trc_trp( kt, Kbb, Kmm, Krhs, Kaa )
49      !!----------------------------------------------------------------------
50      !!                     ***  ROUTINE trc_trp  ***
51      !!                     
52      !! ** Purpose :   Management of passive tracers transport
53      !!
54      !! ** Method  : - Compute the passive tracers trends
55      !!              - Update the passive tracers
56      !!----------------------------------------------------------------------
57      INTEGER, INTENT( in ) :: kt                  ! ocean time-step index
58      INTEGER, INTENT( in ) :: Kbb, Kmm, Krhs, Kaa ! time level indices (not swapped in this routine)
59      !! ---------------------------------------------------------------------
60      !
61      IF( ln_timing )   CALL timing_start('trc_trp')
62      !
63      IF( .NOT. lk_c1d ) THEN
64         !
65                                CALL trc_sbc    ( kt,      Kmm, tr, Krhs )      ! surface boundary condition
66         IF( ln_trcbc .AND. lltrcbc .AND. kt /= nit000 )  &
67                                CALL trc_bc     ( kt,      Kmm, tr, Krhs )      ! tracers: surface and lateral Boundary Conditions
68         IF( ln_trcais )        CALL trc_ais    ( kt,      Kmm, tr, Krhs )      ! tracers from Antarctic Ice Sheet (icb, isf)               
69         IF( ln_trabbl )        CALL trc_bbl    ( kt, Kbb, Kmm, tr, Krhs )      ! advective (and/or diffusive) bottom boundary layer scheme
70         IF( ln_trcdmp )        CALL trc_dmp    ( kt, Kbb, Kmm, tr, Krhs )      ! internal damping trends
71         IF( ln_bdy )           CALL trc_bdy_dmp( kt, Kbb,      Krhs )      ! BDY damping trends
72                                CALL trc_adv    ( kt, Kbb, Kmm, tr, Krhs )      ! horizontal & vertical advection
73         !                                                         ! Partial top/bottom cell: GRADh( trb ) 
74         IF( ln_zps ) THEN
75           IF( ln_isfcav ) THEN ; CALL zps_hde_isf( kt, Kmm, jptra, tr(:,:,:,:,Kbb), pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi )  ! both top & bottom
76           ELSE                 ; CALL zps_hde    ( kt, Kmm, jptra, tr(:,:,:,:,Kbb), gtru, gtrv )                                      !  only bottom
77           ENDIF
78         ENDIF
79         !                                                     
80                                CALL trc_ldf    ( kt, Kbb, Kmm,       tr, Krhs )  ! lateral mixing
81#if defined key_agrif
82         IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc       ! tracers sponge
83#endif
84                                CALL trc_zdf    ( kt, Kbb, Kmm, Krhs, tr, Kaa  )  ! vert. mixing & after tracer   ==> after
85                                CALL trc_atf    ( kt, Kbb, Kmm, Kaa , tr )        ! time filtering of "now" tracer fields   
86         !
87         ! Subsequent calls use the filtered values: Kmm and Kaa
88         ! These are used explicitly here since time levels will not be swapped until after tra_atf/dyn_atf/ssh_atf in stp
89         !
90         IF( ln_trcrad )        CALL trc_rad    ( kt, Kmm, Kaa, tr       )    ! Correct artificial negative concentrations
91         IF( ln_trcdmp_clo )    CALL trc_dmp_clo( kt, Kmm, Kaa )              ! internal damping trends on closed seas only
92
93         !
94      ELSE                                               ! 1D vertical configuration
95                                CALL trc_sbc( kt,      Kmm,       tr, Krhs )  ! surface boundary condition
96         IF( ln_trcdmp )        CALL trc_dmp( kt, Kbb, Kmm,       tr, Krhs )  ! internal damping trends
97                                CALL trc_zdf( kt, Kbb, Kmm, Krhs, tr, Kaa  )  ! vert. mixing & after tracer ==> after
98                                CALL trc_atf( kt, Kbb, Kmm, Kaa , tr )        ! time filtering of "now" tracer fields
99         !
100         ! Subsequent calls use the filtered values: Kmm and Kaa
101         ! These are used explicitly here since time levels will not be swapped until after tra_atf/dyn_atf/ssh_atf in stp
102         !
103         IF( ln_trcrad )       CALL trc_rad( kt, Kmm, Kaa, tr       )  ! Correct artificial negative concentrations
104         !
105      END IF
106      !
107      IF( ln_timing )   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( kt )              ! Empty routine
117      INTEGER, INTENT(in) ::   kt
118      WRITE(*,*) 'trc_trp: You should not have seen this print! error?', kt
119   END SUBROUTINE trc_trp
120#endif
121   
122   !!======================================================================
123END MODULE trctrp
Note: See TracBrowser for help on using the repository browser.