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 @ 10372

Last change on this file since 10372 was 10068, checked in by nicolasmartin, 6 years ago

First part of modifications to have a common default header : fix typos and SVN keywords properties

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