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.
trcsms.F90 in branches/UKMO/dev_r5518_GO6_under_ice_relax_dr_hook/NEMOGCM/NEMO/TOP_SRC – NEMO

source: branches/UKMO/dev_r5518_GO6_under_ice_relax_dr_hook/NEMOGCM/NEMO/TOP_SRC/trcsms.F90 @ 11738

Last change on this file since 11738 was 11738, checked in by marc, 5 years ago

The Dr Hook changes from my perl code.

File size: 4.4 KB
Line 
1MODULE trcsms
2   !!======================================================================
3   !!                         ***  MODULE trcsms  ***
4   !! TOP :   Time loop of passive tracers sms
5   !!======================================================================
6   !! History :   1.0  !  2005-03 (O. Aumont, A. El Moussaoui) F90
7   !!             2.0  !  2007-12  (C. Ethe, G. Madec)  revised architecture
8   !!----------------------------------------------------------------------
9#if defined key_top
10   !!----------------------------------------------------------------------
11   !!   'key_top'                                                TOP models
12   !!----------------------------------------------------------------------
13   !!   trc_sms        :  Time loop of passive tracers sms
14   !!----------------------------------------------------------------------
15   USE oce_trc            !
16   USE trc                !
17   USE trcsms_pisces      ! PISCES biogeo-model
18   USE trcsms_cfc         ! CFC 11 & 12
19   USE trcsms_c14b        ! C14b tracer
20   USE trcsms_age         ! AGE tracer
21   USE trcsms_my_trc      ! MY_TRC  tracers
22   USE trcsms_idtra       ! Idealize Tracer
23   USE trcsms_medusa      ! MEDUSA tracers
24   USE prtctl_trc         ! Print control for debbuging
25
26   USE yomhook, ONLY: lhook, dr_hook
27   USE parkind1, ONLY: jprb, jpim
28
29   IMPLICIT NONE
30   PRIVATE
31
32   PUBLIC   trc_sms    ! called in trcstp.F90
33
34   !!----------------------------------------------------------------------
35   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
36   !! $Id$
37   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
38   !!----------------------------------------------------------------------
39CONTAINS
40
41   SUBROUTINE trc_sms( kt )
42      !!---------------------------------------------------------------------
43      !!                     ***  ROUTINE trc_sms  ***
44      !!
45      !! ** Purpose :   Managment of the time loop of passive tracers sms
46      !!
47      !! ** Method  : -  call the main routine of of each defined tracer model
48      !! -------------------------------------------------------------------------------------
49      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index     
50      !!
51      CHARACTER (len=25) :: charout
52      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
53      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
54      REAL(KIND=jprb)               :: zhook_handle
55
56      CHARACTER(LEN=*), PARAMETER :: RoutineName='TRC_SMS'
57
58      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
59
60      !!---------------------------------------------------------------------
61      !
62      IF( nn_timing == 1 )   CALL timing_start('trc_sms')
63      !
64      IF( lk_pisces  )   CALL trc_sms_pisces ( kt )    ! main program of PISCES
65      IF( lk_cfc     )   CALL trc_sms_cfc    ( kt )    ! surface fluxes of CFC
66      IF( lk_c14b    )   CALL trc_sms_c14b   ( kt )    ! surface fluxes of C14
67      IF( lk_age     )   CALL trc_sms_age    ( kt )    ! AGE tracer
68      IF( lk_my_trc  )   CALL trc_sms_my_trc ( kt )    ! MY_TRC  tracers
69      IF( lk_idtra   )   CALL trc_sms_idtra  ( kt )    ! radioactive decay of Id. tracer
70      IF( lk_medusa  )   CALL trc_sms_medusa ( kt )    ! MEDUSA  tracers
71
72      IF(ln_ctl) THEN      ! print mean trends (used for debugging)
73         WRITE(charout, FMT="('sms ')")
74         CALL prt_ctl_trc_info( charout )
75         CALL prt_ctl_trc( tab4d=trn, mask=tmask, clinfo=ctrcnm )
76      ENDIF
77      !
78      IF( nn_timing == 1 )   CALL timing_stop('trc_sms')
79      !
80      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
81   END SUBROUTINE trc_sms
82
83#else
84   !!======================================================================
85   !!  Dummy module :                                     No passive tracer
86   !!======================================================================
87CONTAINS
88   SUBROUTINE trc_sms( kt )                   ! Empty routine
89      INTEGER, INTENT( in ) ::   kt
90      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
91      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
92      REAL(KIND=jprb)               :: zhook_handle
93
94      CHARACTER(LEN=*), PARAMETER :: RoutineName='TRC_SMS'
95
96      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
97
98      WRITE(*,*) 'trc_sms: You should not have seen this print! error?', kt
99      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
100   END SUBROUTINE trc_sms
101#endif 
102
103   !!======================================================================
104END MODULE trcsms
Note: See TracBrowser for help on using the repository browser.