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/branches/2020/dev_r12563_ASINTER-06_ABL_improvement/src/TOP/TRP – NEMO

source: NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement/src/TOP/TRP/trctrp.F90 @ 12808

Last change on this file since 12808 was 12377, checked in by acc, 4 years ago

The big one. Merging all 2019 developments from the option 1 branch back onto the trunk.

This changeset reproduces 2019/dev_r11943_MERGE_2019 on the trunk using a 2-URL merge
onto a working copy of the trunk. I.e.:

svn merge --ignore-ancestry \

svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/trunk \
svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/branches/2019/dev_r11943_MERGE_2019 ./

The --ignore-ancestry flag avoids problems that may otherwise arise from the fact that
the merge history been trunk and branch may have been applied in a different order but
care has been taken before this step to ensure that all applicable fixes and updates
are present in the merge branch.

The trunk state just before this step has been branched to releases/release-4.0-HEAD
and that branch has been immediately tagged as releases/release-4.0.2. Any fixes
or additions in response to tickets on 4.0, 4.0.1 or 4.0.2 should be done on
releases/release-4.0-HEAD. From now on future 'point' releases (e.g. 4.0.2) will
remain unchanged with periodic releases as needs demand. Note release-4.0-HEAD is a
transitional naming convention. Future full releases, say 4.2, will have a release-4.2
branch which fulfills this role and the first point release (e.g. 4.2.0) will be made
immediately following the release branch creation.

2020 developments can be started from any trunk revision later than this one.

  • Property svn:keywords set to Id
File size: 6.7 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 zpshde          ! partial step: hor. derivative       (zps_hde routine)
27   USE bdy_oce   , ONLY: ln_bdy
28   USE trcbdy          ! BDY open boundaries
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   !!----------------------------------------------------------------------
40   !! NEMO/TOP 4.0 , NEMO Consortium (2018)
41   !! $Id$
42   !! Software governed by the CeCILL license (see ./LICENSE)
43   !!----------------------------------------------------------------------
44
45CONTAINS
46
47   SUBROUTINE trc_trp( kt, Kbb, Kmm, Krhs, Kaa )
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      INTEGER, INTENT( in ) :: Kbb, Kmm, Krhs, Kaa ! time level indices (not swapped in this routine)
58      !! ---------------------------------------------------------------------
59      !
60      IF( ln_timing )   CALL timing_start('trc_trp')
61      !
62      IF( .NOT. lk_c1d ) THEN
63         !
64                                CALL trc_sbc    ( kt,      Kmm, tr, Krhs )      ! surface boundary condition
65         IF( ln_trcbc .AND. lltrcbc .AND. kt /= nit000 )  &
66                                CALL trc_bc     ( kt,      Kmm, tr, Krhs )      ! tracers: surface and lateral Boundary Conditions
67         IF( ln_trabbl )        CALL trc_bbl    ( kt, Kbb, Kmm, tr, Krhs )      ! advective (and/or diffusive) bottom boundary layer scheme
68         IF( ln_trcdmp )        CALL trc_dmp    ( kt, Kbb, Kmm, tr, Krhs )      ! internal damping trends
69         IF( ln_bdy )           CALL trc_bdy_dmp( kt, Kbb,      Krhs )      ! BDY damping trends
70                                CALL trc_adv    ( kt, Kbb, Kmm, tr, Krhs )      ! horizontal & vertical advection
71         !                                                         ! Partial top/bottom cell: GRADh( trb ) 
72         IF( ln_zps ) THEN
73           IF( ln_isfcav ) THEN ; CALL zps_hde_isf( kt, Kmm, jptra, tr(:,:,:,:,Kbb), pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi )  ! both top & bottom
74           ELSE                 ; CALL zps_hde    ( kt, Kmm, jptra, tr(:,:,:,:,Kbb), gtru, gtrv )                                      !  only bottom
75           ENDIF
76         ENDIF
77         !                                                     
78                                CALL trc_ldf    ( kt, Kbb, Kmm,       tr, Krhs )  ! lateral mixing
79#if defined key_agrif
80         IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc       ! tracers sponge
81#endif
82                                CALL trc_zdf    ( kt, Kbb, Kmm, Krhs, tr, Kaa  )  ! vert. mixing & after tracer   ==> after
83                                CALL trc_atf    ( kt, Kbb, Kmm, Kaa , tr )        ! time filtering of "now" tracer fields   
84         !
85         ! Subsequent calls use the filtered values: Kmm and Kaa
86         ! These are used explicitly here since time levels will not be swapped until after tra_atf/dyn_atf/ssh_atf in stp
87         !
88         IF( ln_trcrad )        CALL trc_rad    ( kt, Kmm, Kaa, tr       )    ! Correct artificial negative concentrations
89         IF( ln_trcdmp_clo )    CALL trc_dmp_clo( kt, Kmm, Kaa )              ! internal damping trends on closed seas only
90
91         !
92      ELSE                                               ! 1D vertical configuration
93                                CALL trc_sbc( kt,      Kmm,       tr, Krhs )  ! surface boundary condition
94         IF( ln_trcdmp )        CALL trc_dmp( kt, Kbb, Kmm,       tr, Krhs )  ! internal damping trends
95                                CALL trc_zdf( kt, Kbb, Kmm, Krhs, tr, Kaa  )  ! vert. mixing & after tracer ==> after
96                                CALL trc_atf( kt, Kbb, Kmm, Kaa , tr )        ! time filtering of "now" tracer fields
97         !
98         ! Subsequent calls use the filtered values: Kmm and Kaa
99         ! These are used explicitly here since time levels will not be swapped until after tra_atf/dyn_atf/ssh_atf in stp
100         !
101         IF( ln_trcrad )       CALL trc_rad( kt, Kmm, Kaa, tr       )  ! Correct artificial negative concentrations
102         !
103      END IF
104      !
105      IF( ln_timing )   CALL timing_stop('trc_trp')
106      !
107   END SUBROUTINE trc_trp
108
109#else
110   !!----------------------------------------------------------------------
111   !!   Dummy module :                                        No TOP models
112   !!----------------------------------------------------------------------
113CONTAINS
114   SUBROUTINE trc_trp( kt )              ! Empty routine
115      INTEGER, INTENT(in) ::   kt
116      WRITE(*,*) 'trc_trp: You should not have seen this print! error?', kt
117   END SUBROUTINE trc_trp
118#endif
119   
120   !!======================================================================
121END MODULE trctrp
Note: See TracBrowser for help on using the repository browser.