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

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

CT : BUGFIX138 : add the cpp key key_trcldf_eiv/key_diaeiv for the initilization/declaration of u_trc_eiv and v_trc_eiv arrays

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