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.
trc.F90 in trunk/NEMO/TOP_SRC – NEMO

source: trunk/NEMO/TOP_SRC/trc.F90 @ 247

Last change on this file since 247 was 247, checked in by opalod, 19 years ago

CL : Add CVS Header and CeCILL licence information

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.1 KB
Line 
1MODULE trc
2   !!======================================================================
3   !!                      ***  MODULE  trc  ***
4   !! Passive tracers   :  module for tracers defined
5   !!======================================================================
6   !! History :
7   !!   8.2  !  96-01  (M. Levy)  Original code
8   !!        !  99-07  (M. Levy)  for LOBSTER1 or NPZD model
9   !!        !  00-04  (O. Aumont, M.A. Foujols)  HAMOCC3 and P3ZD
10   !!   9.0  !  04-03  (C. Ethe)  Free form and module
11   !!----------------------------------------------------------------------
12#if defined key_passivetrc
13   !!----------------------------------------------------------------------
14   !!   'key_passivetrc'   :                               Passive tracer
15   !!---------------------------------------------------------------------
16   !!  TOP 1.0 , LOCEAN-IPSL (2005)
17   !! $Header$
18   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
19   !!----------------------------------------------------------------------
20   !! * Modules used
21   USE par_oce
22   USE par_trc
23   IMPLICIT NONE
24
25   PUBLIC
26
27
28   !! passive tracers names and units (read in namelist)
29   !! --------------------------------------------------
30   CHARACTER(len=12), PUBLIC, DIMENSION(jptra) :: &
31      ctrcnm  ,   &   !!: tracer name
32      ctrcun          !!: tracer unit
33
34   CHARACTER(len=80), PUBLIC, DIMENSION(jptra) :: &
35      ctrcnl          !!: tracer long name
36   
37   
38   !! parameters for the control of passive tracers
39   !! --------------------------------------------------
40   INTEGER, PUBLIC ::  &
41      numnat          !!: the number of the passive tracer NAMELIST
42   
43   LOGICAL, PUBLIC, DIMENSION(jptra) ::   &
44      lutini          !!:  initialisation from FILE or not (NAMELIST)
45
46   INTEGER , PUBLIC, DIMENSION(jptra) :: &
47      nutini          !!: FORTRAN LOGICAL UNIT for initialisation file
48
49   !! passive tracers fields (before,now,after)
50   !! --------------------------------------------------
51   REAL(wp), PUBLIC  ::  &
52      trai            !!: initial total tracer
53
54   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jptra) :: &
55      trn     ,   &   !!: traceur concentration for actual time step
56      tra     ,   &   !!: traceur concentration for next time step
57      trb             !!: traceur concentration for before time step
58
59
60   !! numerical parameter (NAMELIST)
61   !! --------------------------------------------------
62   REAL(wp), PUBLIC  ::  &
63      rsc     ,   &   !!: tuning coefficient for anti-diffusion
64      rtrn            !!: value for truncation
65
66   !! namelist parameters
67   !! --------------------------------------------------
68   INTEGER , PUBLIC  ::  & 
69      ncortrc ,   &   !!: number of corrective phases
70      ndttrc  ,   &   !!: frequency of step on passive tracers
71      nittrc000       !!: first time step of passive tracers model 
72
73   LOGICAL, PUBLIC  ::  & 
74      crosster        !!: logical if true computes crossterms
75
76
77   !! isopycnal scheme for passive tracers
78   !! -------------------------------------------------- 
79   REAL(wp), PUBLIC  ::  &
80      ahtrb0  ,   &   !!: background diffusivity coefficient for passive tracer (m2/s)
81      trcrat  ,   &   !!: ratio between passive and active tracer coeff for diffusion
82      ahtrc0  ,   &   !!: horizontal eddy diffusivity for passive tracers (m2/s)
83      aeivtr0         !!: eddy induced velocity coefficient (m2/s)
84   
85   
86   !! passive tracers restart (input and output)
87   !! -------------------------------------------------- 
88   LOGICAL, PUBLIC  ::  &
89      lrsttr          !!: boolean term for restart i/o for passive tracers (namelist)
90   
91   CHARACTER(len=48) , PUBLIC  ::  &
92      trestart        !!: name variable of restart file
93   
94   INTEGER , PUBLIC  ::  &
95      nutwrs  ,   &   !!: output FILE for passive tracers restart
96      nutrst  ,   &   !!: logical unit for restart FILE for passive tracers
97      nrsttr          !!: control of the time step ( 0 or 1 ) for pass. tr.
98   
99#if defined key_partial_steps
100   
101   !! interpolated gradient
102   !!-------------------------------------------------- 
103   REAL (wp), PUBLIC, DIMENSION (jpi,jpj,jptra) :: &
104      gtru    ,   &   !!: horizontal gradient at u-points at bottom ocean level
105      gtrv            !!: horizontal gradient at v-points at bottom ocean level
106#else
107   REAL (wp), PUBLIC :: &
108      gtru    ,   &   !!: horizontal gradient at u-points at bottom ocean level
109      gtrv            !!: horizontal gradient at v-points at bottom ocean level
110   
111#endif
112   
113#if defined key_trcldf_eiv && defined key_diaeiv
114   !! The three component of the eddy induced velocity
115   !! --------------------------------------------------
116   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk) :: &
117      u_trc_eiv,  &   !!: u-eiv (m/s)
118      v_trc_eiv,  &   !!: v-eiv (m/s)
119      w_trc_eiv       !!: w-eiv (m/s)
120#endif
121   
122   
123   !! information for outputs
124   !! --------------------------------------------------
125   INTEGER , PUBLIC   ::  & 
126      nwritetrc,  &   !!: time step frequency for concentration outputs (namelist)
127      nit5     ,  &   !!: id for tracer output file
128      ndepit5  ,  &   !!: id for depth mesh
129      nhorit5  ,  &   !!: id for horizontal mesh
130      ndimt50  ,  &   !!: number of ocean points in index array
131      ndimt51         !!: number of ocean points in index array
132   
133   INTEGER , PUBLIC, DIMENSION (jpij)  ::  & 
134      ndext51         !!: integer arrays for ocean surface index
135   
136   INTEGER , PUBLIC, DIMENSION (jpij*jpk)  ::  & 
137      ndext50         !!: integer arrays for ocean 3D index
138   
139   
140   !! julian day
141   !! --------------------------------------------------
142   INTEGER  , PUBLIC ::  & 
143      ijulian         !!: julian day
144   
145   REAL(wp), PUBLIC  ::  &
146      djulian         !!: julian day ( real)
147   
148   
149# if defined key_trc_diaadd
150   !! additional 2D/3D outputs namelist
151   !! --------------------------------------------------
152   CHARACTER(len=8), PUBLIC, DIMENSION (jpdia2d) ::  & 
153      ctrc2d  ,   &   !!: 2d output field name
154      ctrc2u          !!: 2d output field unit
155   
156   CHARACTER(len=8), PUBLIC, DIMENSION (jpdia3d) ::  & 
157      ctrc3d ,    &   !!: 3d output field name
158      ctrc3u          !!: 3d output field unit
159   
160   CHARACTER(len=80), PUBLIC, DIMENSION (jpdia2d) ::  & 
161      ctrc2l          !!: 2d output field long name
162   
163   CHARACTER(len=80), PUBLIC, DIMENSION (jpdia3d) ::  & 
164      ctrc3l          !!: 3d output field long name
165   
166   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpdia2d) ::  & 
167      trc2d           !!:  additional 2d outputs 
168   
169   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jpdia3d) ::  & 
170      trc3d           !!:  additional 3d outputs 
171   
172   
173   !! netcdf files and index common
174   !! --------------------------------------------------
175   INTEGER , PUBLIC :: &
176      nwriteadd,  &   !!: frequency of additional arrays outputs(namelist)
177      nitd     ,  &   !!: id for additional array output file
178      ndepitd  ,  &   !!: id for depth mesh
179      nhoritd         !!: id for horizontal mesh
180#endif
181   
182# if defined key_trc_diatrd
183   
184   !!  non conservative trends (biological, ...)
185   !! --------------------------------------------------
186   LOGICAL, PUBLIC, DIMENSION (jptra)  ::  & 
187      luttrd          !!: large trends diagnostic to write or not (namelist)
188   
189   !!  dynamical trends
190   !! trtrd()   : trends of the tracer equations
191   !!           1 : X advection
192   !!           2 : Y advection
193   !!           3 : Z advection
194   !!           4 : X diffusion
195   !!           5 : Y diffusion
196   !!           6 : Z diffusion
197   !!           7 : X gent velocity
198   !!           8 : Y gent velocity
199   !!           9 : Z gent velocity
200   !! --------------------------------------------------
201   
202   
203   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk,jptra,jpdiatrc) :: &
204      trtrd           !!: trends of the tracer equations
205   
206   !! netcdf files and index common
207   !! --------------------------------------------------
208   INTEGER , PUBLIC :: &
209      nwritetrd       !!: frequency of additional arrays outputs(namelist)
210   
211   INTEGER , PUBLIC, DIMENSION (jptra)  :: &
212      nit6    ,   &   !!: id for additional array output file
213      ndepit6 ,   &   !!: id for depth mesh
214      nhorit6         !!: id for horizontal mesh
215   
216#endif 
217   
218   !! passive tracers data read and at given time_step
219   !! --------------------------------------------------
220#if defined key_trc_dta
221   
222   INTEGER , PUBLIC, DIMENSION(jptra) :: &
223      numtr   ,   &    !!: logical unit for passive tracers data
224      nlectr  ,   &    !!: switch for reading once
225      ntrc1   ,   &    !!: ????
226      ntrc2            !!: ????
227   
228   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jptra) ::  & 
229      trdta            !!: passive tracers data at given time-step
230   
231   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jptra,2) ::  & 
232      tracdta          !!: passive tracers data array for two value
233                        !: needed for time interpolation
234#endif
235
236   !! Contral/debugging
237   !! -----------------
238   REAL(wp), PUBLIC, DIMENSION(jptra) ::  & 
239      tra_ctl         !!: sum of tra trend
240#else
241   !!======================================================================
242   !!  Empty module : No passive tracer
243   !!======================================================================
244#endif
245
246END MODULE trc
Note: See TracBrowser for help on using the repository browser.