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.
trczdf.F90 in NEMO/trunk/src/TOP/TRP – NEMO

source: NEMO/trunk/src/TOP/TRP/trczdf.F90 @ 12377

Last change on this file since 12377 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: 4.2 KB
Line 
1MODULE trczdf
2   !!==============================================================================
3   !!                 ***  MODULE  trczdf  ***
4   !! Ocean Passive tracers : vertical diffusive trends
5   !!=====================================================================
6   !! History :  9.0  ! 2005-11  (G. Madec)  Original code
7   !!       NEMO 3.0  ! 2008-01  (C. Ethe, G. Madec)  merge TRC-TRA
8   !!            4.0  ! 2017-04  (G. Madec)  remove the explicit case
9   !!----------------------------------------------------------------------
10#if defined key_top
11   !!----------------------------------------------------------------------
12   !!   'key_top'                                                TOP models
13   !!----------------------------------------------------------------------
14   !!   trc_zdf      : update the tracer trend with the vertical diffusion
15   !!----------------------------------------------------------------------
16   USE trc           ! ocean passive tracers variables
17   USE oce_trc       ! ocean dynamics and active tracers
18   USE trd_oce       ! trends: ocean variables
19   USE trazdf        ! tracer: vertical diffusion
20!!gm do we really need this ?
21   USE trcldf        ! passive tracers: lateral diffusion
22!!gm
23   USE trdtra        ! trends manager: tracers
24   USE prtctl_trc    ! Print control
25
26   IMPLICIT NONE
27   PRIVATE
28
29   PUBLIC   trc_zdf         ! called by step.F90
30   
31   !!----------------------------------------------------------------------
32   !! NEMO/TOP 4.0 , NEMO Consortium (2018)
33   !! $Id$
34   !! Software governed by the CeCILL license (see ./LICENSE)
35   !!----------------------------------------------------------------------
36CONTAINS
37
38   SUBROUTINE trc_zdf( kt, Kbb, Kmm, Krhs, ptr, Kaa )
39      !!----------------------------------------------------------------------
40      !!                  ***  ROUTINE trc_zdf  ***
41      !!
42      !! ** Purpose :   compute the vertical ocean tracer physics using
43      !!              an implicit time-stepping scheme.
44      !!---------------------------------------------------------------------
45      INTEGER                                   , INTENT(in   ) ::   kt                   ! ocean time-step index
46      INTEGER                                   , INTENT(in   ) ::   Kbb, Kmm, Krhs, Kaa  ! ocean time level indices
47      REAL(wp), DIMENSION(jpi,jpj,jpk,jptra,jpt), INTENT(inout) ::   ptr                  ! passive tracers and RHS of tracer equation
48      !
49      INTEGER               ::  jk, jn
50      CHARACTER (len=22)    :: charout
51      REAL(wp), DIMENSION(jpi,jpj,jpk,jptra) ::   ztrtrd   ! 4D workspace
52      !!---------------------------------------------------------------------
53      !
54      IF( ln_timing )   CALL timing_start('trc_zdf')
55      !
56      IF( l_trdtrc )   ztrtrd(:,:,:,:)  = ptr(:,:,:,:,Krhs)
57      !
58      CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dttrc, Kbb, Kmm, Krhs, ptr, Kaa, jptra )    !   implicit scheme         
59      !
60      IF( l_trdtrc )   THEN                      ! save the vertical diffusive trends for further diagnostics
61         DO jn = 1, jptra
62            DO jk = 1, jpkm1
63               ztrtrd(:,:,jk,jn) = ( ( ptr(:,:,jk,jn,Kaa) - ptr(:,:,jk,jn,Kbb) ) / r2dttrc ) - ztrtrd(:,:,jk,jn)
64            END DO
65            CALL trd_tra( kt, Kmm, Krhs, 'TRC', jn, jptra_zdf, ztrtrd(:,:,:,jn) )
66         END DO
67      ENDIF
68      !                                          ! print mean trends (used for debugging)
69      IF( sn_cfctl%l_prttrc )   THEN
70         WRITE(charout, FMT="('zdf ')")
71         CALL prt_ctl_trc_info(charout)
72         CALL prt_ctl_trc( tab4d=tr(:,:,:,:,Kaa), mask=tmask, clinfo=ctrcnm, clinfo2='trd' )
73      END IF
74      !
75      IF( ln_timing )  CALL timing_stop('trc_zdf')
76      !
77   END SUBROUTINE trc_zdf
78   
79#else
80   !!----------------------------------------------------------------------
81   !!   Default option                                         Empty module
82   !!----------------------------------------------------------------------
83CONTAINS
84   SUBROUTINE trc_zdf( kt )
85      INTEGER, INTENT(in) :: kt 
86      WRITE(*,*) 'trc_zdf: You should not have seen this print! error?', kt
87   END SUBROUTINE trc_zdf
88#endif
89   !!==============================================================================
90END MODULE trczdf
Note: See TracBrowser for help on using the repository browser.