source: NEMO/branches/2019/fix_sn_cfctl_ticket2328/src/TOP/TRP/trczdf.F90 @ 11872

Last change on this file since 11872 was 11872, checked in by acc, 11 months ago

Branch 2019/fix_sn_cfctl_ticket2328. See #2328. Replacement of ln_ctl and activation of full functionality with
sn_cfctl structure. These changes rename structure components l_mppout and l_mpptop as l_prtctl and l_prttrc
and introduce l_glochk to activate former ln_ctl code in stpctl.F90 to perform global location of min and max
checks. Also added is l_allon which can be used to activate all output (much like the former ln_ctl). If l_allon
is .false. then l_config decides whether or not the suboptions are used.

   sn_cfctl%l_glochk = .FALSE.    ! Range sanity checks are local (F) or global (T). Set T for debugging only
   sn_cfctl%l_allon  = .FALSE.    ! IF T activate all options. If F deactivate all unless l_config is T
   sn_cfctl%l_config = .TRUE.     ! IF .true. then control which reports are written with the remaining options

Note, these changes pass SETTE tests but all references to ln_ctl need to be removed from the sette scripts.

  • Property svn:keywords set to Id
File size: 3.8 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 )
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      !
47      INTEGER               ::  jk, jn
48      CHARACTER (len=22)    :: charout
49      REAL(wp), DIMENSION(jpi,jpj,jpk,jptra) ::   ztrtrd   ! 4D workspace
50      !!---------------------------------------------------------------------
51      !
52      IF( ln_timing )   CALL timing_start('trc_zdf')
53      !
54      IF( l_trdtrc )   ztrtrd(:,:,:,:)  = tra(:,:,:,:)
55      !
56      CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dttrc, trb, tra, jptra )    !   implicit scheme         
57      !
58      IF( l_trdtrc )   THEN                      ! save the vertical diffusive trends for further diagnostics
59         DO jn = 1, jptra
60            DO jk = 1, jpkm1
61               ztrtrd(:,:,jk,jn) = ( ( tra(:,:,jk,jn) - trb(:,:,jk,jn) ) / r2dttrc ) - ztrtrd(:,:,jk,jn)
62            END DO
63            CALL trd_tra( kt, 'TRC', jn, jptra_zdf, ztrtrd(:,:,:,jn) )
64         END DO
65      ENDIF
66      !                                          ! print mean trends (used for debugging)
67      IF( sn_cfctl%l_prttrc )   THEN
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' )
71      END IF
72      !
73      IF( ln_timing )  CALL timing_stop('trc_zdf')
74      !
75   END SUBROUTINE trc_zdf
76   
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.