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/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/TRP – NEMO

source: NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/TRP/trczdf.F90 @ 10946

Last change on this file since 10946 was 10946, checked in by acc, 5 years ago

2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps : Convert STO, TRD and USR modules and all knock on effects of these conversions. Note change to USR module may have implications for the TEST CASES (not tested yet). Standard SETTE tested only

  • 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( ln_ctl )   THEN
70         WRITE(charout, FMT="('zdf ')")
71         CALL prt_ctl_trc_info(charout)
72         CALL prt_ctl_trc( tab4d=tra, 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.