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_age.F90 in branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE – NEMO

source: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/trcsms_age.F90 @ 7041

Last change on this file since 7041 was 7041, checked in by cetlod, 7 years ago

ROBUST5_CNRS : implementation of part I of new TOP interface - 1st step -, see ticket #1782

  • Property svn:executable set to *
File size: 3.2 KB
Line 
1MODULE trcsms_age
2   !!======================================================================
3   !!                         ***  MODULE trcsms_age  ***
4   !! TOP :   Main module of the AGE tracers
5   !!======================================================================
6   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec) Original code
7   !!----------------------------------------------------------------------
8   !! trc_sms_age       : AGE model main routine
9   !!----------------------------------------------------------------------
10   USE oce_trc         ! Ocean variables
11   USE trc             ! TOP variables
12   USE trd_oce
13   USE trdtrc
14
15   IMPLICIT NONE
16   PRIVATE
17
18   PUBLIC   trc_sms_age       ! called by trcsms.F90 module
19
20   INTEGER , PUBLIC :: nl_age             ! T level surrounding age_depth
21   INTEGER , PUBLIC :: nla_age            ! T level wholly above age_depth
22   INTEGER , PUBLIC :: nlb_age            ! T level wholly below age_depth
23
24   REAL(wp), PUBLIC :: rn_age_depth       ! = 10       depth over which age tracer reset to zero
25   REAL(wp), PUBLIC :: rn_age_kill_rate   ! = -1./7200  recip of relaxation timescale (s) for  age tracer shallower than age_depth
26   
27   REAL(wp), PUBLIC :: rryear          !: recip number of seconds in one year
28   REAL(wp), PUBLIC :: frac_kill_age   !: fraction of level nl_age above age_depth where it is relaxed towards zero
29   REAL(wp), PUBLIC :: frac_add_age    !: fraction of level nl_age below age_depth where it is incremented
30
31
32   !!----------------------------------------------------------------------
33   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
34   !! $Id$
35   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
36   !!----------------------------------------------------------------------
37CONTAINS
38
39   SUBROUTINE trc_sms_age( kt )
40      !!----------------------------------------------------------------------
41      !!                     ***  trc_sms_age  ***
42      !!
43      !! ** Purpose :   main routine of AGE model
44      !!
45      !! ** Method  : -
46      !!----------------------------------------------------------------------
47      !
48      INTEGER, INTENT(in) ::   kt   ! ocean time-step index
49      INTEGER ::   jn, jk   ! dummy loop index
50      !!----------------------------------------------------------------------
51      !
52      IF( nn_timing == 1 )  CALL timing_start('trc_sms_age')
53      !
54      IF(lwp) WRITE(numout,*)
55      IF(lwp) WRITE(numout,*) ' trc_sms_age:  AGE model'
56      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
57
58
59      DO jk = 1, nla_age
60         tra(:,:,jk,jp_age0) = rn_age_kill_rate * trb(:,:,jk,jp_age0)
61      ENDDO
62      !
63      tra(:,:,nl_age,jp_age0) = frac_kill_age * rn_age_kill_rate * trb(:,:,nl_age,jp_age0)  &
64          &                   + frac_add_age  * rryear * tmask(:,:,nl_age)
65      !
66      DO jk = nlb_age, jpk
67         tra(:,:,jk,jp_age0) = tmask(:,:,jk) * rryear
68      ENDDO
69      !
70      IF( l_trdtrc ) CALL trd_trc( tra(:,:,:,jp_age0), jn, jptra_sms, kt )   ! save trends
71      !
72      IF( nn_timing == 1 )  CALL timing_stop('trc_sms_age')
73      !
74   END SUBROUTINE trc_sms_age
75
76   !!======================================================================
77END MODULE trcsms_age
Note: See TracBrowser for help on using the repository browser.