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.
oce_trc.F90 in NEMO/branches/2018/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC – NEMO

source: NEMO/branches/2018/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90 @ 10106

Last change on this file since 10106 was 10106, checked in by cbricaud, 6 years ago

add mikt coarsening in nemo3.6 coarsening branch

  • Property svn:keywords set to Id
File size: 26.5 KB
Line 
1MODULE oce_trc
2   !!======================================================================
3   !!                      ***  MODULE  oce_trc  ***
4   !! TOP :   variables shared between ocean and passive tracers
5   !!======================================================================
6   !! History :   1.0  !  2004-03  (C. Ethe)  original code
7   !!             2.0  !  2007-12 (C. Ethe, G. Madec)  rewritting
8   !!----------------------------------------------------------------------
9#if defined key_top
10   USE dom_oce    , ONLY : ndastp
11   USE dom_oce    , ONLY : nyear_len,nday,nyear,nday_year
12   USE dom_oce    , ONLY : gdepw_1d
13   USE dom_oce    , ONLY : rdttra
14   USE dom_oce    , ONLY : Agrif_Root      => Agrif_Root
15   USE sbc_oce    , ONLY : nn_ice_embd
16   USE sbc_oce    , ONLY : ln_cpl
17   USE sbc_oce    , ONLY : ln_rnf
18   USE sbc_oce    , ONLY : ncpl_qsr_freq
19
20   USE traqsr     , ONLY : ln_qsr_bio =>    ln_qsr_bio
21   USE traqsr     , ONLY : rn_si0     =>    rn_si0     !: very near surface depth of extinction
22   USE traqsr     , ONLY : rn_abs     =>    rn_abs     !: fraction absorbed in the very near surface
23
24   USE iom        , ONLY : iom_open , iom_get , iom_varid , iom_rstput , iom_close , iom_use, iom_gettime, iom_put
25   USE iom        , ONLY : lk_iomput ,jpdom_data,jpdom_autoglo
26
27   USE par_trc    , ONLY : jptra
28   USE par_cfc    , ONLY : lk_cfc   , jp_cfc0 , jp_cfc1
29   USE par_c14b   , ONLY : lk_c14b  , jp_c14b0, jp_c14b1
30   USE par_pisces , ONLY : lk_pisces, jp_pcs0 , jp_pcs1
31   USE par_my_trc , ONLY : lk_my_trc, jp_myt0 , jp_myt1
32   USE par_age    , ONLY : lk_age   , jp_age0 , jp_age1
33
34   USE trc_oce    , ONLY : lk_degrad, lk_offline, facvol, r_si2, trc_oce_ext_lev
35   USE trc_oce    , ONLY : nn_dttrc
36   USE trc_oce    , ONLY : etot3
37   USE trc        , ONLY : nittrc000,nn_rsttr
38   USE trc        , ONLY : trb,trn,tra
39   USE trc        , ONLY : trc2d,trc3d
40   USE trc        , ONLY : ctrcnm
41   USE trc        , ONLY : numrtr ,numrtw
42   USE trc        , ONLY : ln_diatrc,ln_rsttr,ln_top_euler,lrst_trc,ln_trcdmp,ln_trcdmp_clo
43   USE trc        , ONLY : gtru, gtrv,gtrui,gtrvi
44   USE trc        , ONLY : rdttrc
45   USE trc        , ONLY : areatot
46   USE trc        , ONLY : cvol
47   USE trc        , ONLY : l_trcdm2dc
48   USE trc        , ONLY : nn_ice_tr
49   USE trc        , ONLY : cn_trc_o
50   USE trc        , ONLY : trc_ice_ratio
51   USE trc        , ONLY : nn_ice_tr
52   USE trc        , ONLY : trc_ice_prescr
53   USE trc        , ONLY : qsr_mean ! in case of coarsening no no need to coarsene it because qsr_mean is already in crs space
54
55#if defined key_crs
56
57  !* Domain size *
58   USE par_oce , ONLY :   jpi      =>   jpi        !: first  dimension of grid --> i
59   USE par_oce , ONLY :   jpj      =>   jpj        !: second dimension of grid --> j 
60   USE par_oce , ONLY :   jpk      =>   jpk        !: number of levels 
61   USE par_oce , ONLY :   jpim1    =>   jpim1      !: jpi - 1
62   USE par_oce , ONLY :   jpjm1    =>   jpjm1      !: jpj - 1
63   USE par_oce , ONLY :   jpkm1    =>   jpkm1      !: jpk - 1 
64   USE par_oce , ONLY :   jpij     =>   jpij       !: jpi x jpj
65   USE par_oce , ONLY :   lk_esopa =>   lk_esopa   !: flag to activate the all option
66   USE par_oce , ONLY :   jp_tem   =>   jp_tem     !: indice for temperature
67   USE par_oce , ONLY :   jp_sal   =>   jp_sal     !: indice for salinity
68
69   USE trc_oce    , ONLY : trc_oce_ext_lev_crs
70
71   !* IO manager *
72   USE in_out_manager
73
74   !* Memory Allocation *
75   USE wrk_nemo
76
77   !* Timing *
78   USE timing, ONLY : timing_start , timing_stop
79
80   !* MPP library                         
81   USE lib_mpp
82
83   !* Fortran utilities                         
84   USE lib_fortran_crs , ONLY : glob_sum => glob_sum_crs
85
86   !* Lateral boundary conditions                         
87   USE lbclnk
88
89   !* physical constants *
90   USE phycst
91
92   !* 1D configuration
93   USE c1d
94
95   !* model domain *
96   USE dom_oce , ONLY : narea => narea
97   USE dom_oce , ONLY : nproc => nproc
98   USE dom_oce , ONLY : nimpp => nimpp
99   USE dom_oce , ONLY : njmpp => njmpp
100   USE dom_oce , ONLY : nreci => nreci
101   USE dom_oce , ONLY : nrecj => nrecj
102   USE dom_oce , ONLY : nlci  => nlci
103   USE dom_oce , ONLY : nldi  => nldi
104   USE dom_oce , ONLY : nlei  => nlei
105   USE dom_oce , ONLY : nlcj  => nlcj
106   USE dom_oce , ONLY : nldj  => nldj
107   USE dom_oce , ONLY : nlej  => nlej
108   USE dom_oce , ONLY : nlcit  => nlcit
109   USE dom_oce , ONLY : nldit  => nldit
110   USE dom_oce , ONLY : nleit  => nleit
111   USE dom_oce , ONLY : nlcjt  => nlcjt
112   USE dom_oce , ONLY : nldjt  => nldjt
113   USE dom_oce , ONLY : nlejt  => nlejt
114   USE dom_oce , ONLY : nimppt => nimppt
115   USE dom_oce , ONLY : njmppt => njmppt
116   USE dom_oce , ONLY : ibonit => ibonit
117   USE dom_oce , ONLY : ibonjt => ibonjt
118   USE dom_oce , ONLY : lk_vvl => lk_vvl
119   USE dom_oce , ONLY : rdt => rdt
120   USE dom_oce , ONLY : ln_zco => ln_zco
121   USE dom_oce , ONLY : ln_zps => ln_zps
122   USE dom_oce , ONLY : ln_sco => ln_sco
123   USE dom_oce , ONLY : neuler => neuler
124
125   USE crs,  ONLY : mi0 => mi0 
126   USE crs,  ONLY : mi1 => mi1 
127   USE crs,  ONLY : mj0 => mj0 
128   USE crs,  ONLY : mj1 => mj1 
129
130   USE dom_oce , ONLY :  lzoom => lzoom 
131   !USE dom_oce , ONLY :  =>
132
133   !* horizontal mesh *
134   USE crs , ONLY :   glamt      =>   glamt_crs      !: longitude of t-point (degre) 
135   USE crs , ONLY :   glamu      =>   glamu_crs      !: longitude of t-point (degre) 
136   USE crs , ONLY :   glamv      =>   glamv_crs      !: longitude of t-point (degre) 
137   USE crs , ONLY :   glamf      =>   glamf_crs      !: longitude of t-point (degre) 
138   USE crs , ONLY :   gphit      =>   gphit_crs      !: latitude  of t-point (degre)   
139   USE crs , ONLY :   gphiu      =>   gphiu_crs      !: latitude  of t-point (degre)   
140   USE crs , ONLY :   gphiv      =>   gphiv_crs      !: latitude  of t-point (degre)   
141   USE crs , ONLY :   gphif      =>   gphif_crs      !: latitude  of t-point (degre)   
142   USE crs , ONLY :   e1t        =>   e1t_crs        !: horizontal scale factors at t-point (m) 
143   USE crs , ONLY :   e2t        =>   e2t_crs        !: horizontal scale factors at t-point (m)   
144   USE crs , ONLY :   e1e2t      =>   e1e2t_crs      !: cell surface at t-point (m2)
145   USE crs , ONLY :   e1e2w_msk  =>   e1e2w_msk      !: cell surface at t-point (m2)
146   USE crs , ONLY :   e1u        =>   e1u_crs        !: horizontal scale factors at u-point (m)
147   USE crs , ONLY :   e2u        =>   e2u_crs        !: horizontal scale factors at u-point (m)
148   USE crs , ONLY :   e1v        =>   e1v_crs        !: horizontal scale factors at v-point (m)
149   USE crs , ONLY :   e2v        =>   e2v_crs        !: horizontal scale factors at v-point (m) 
150
151#if defined key_vvl 
152   USE crs , ONLY :   e3t_b      =>  e3t_b_crs         !: vertical scale factors at t-
153   USE crs , ONLY :   e3t_n      =>  e3t_n_crs         !: vertical scale factors at t-
154   USE crs , ONLY :   e3u_n      =>  e3u_n_crs         !: vertical scale factors at u-
155   USE crs , ONLY :   e3v_n      =>  e3v_n_crs         !: vertical scale factors v-
156   USE crs , ONLY :   e3w_n      =>  e3w_n_crs         !: w-points (m)
157   USE crs , ONLY :   e3t_a      =>  e3t_a_crs         !: vertical scale factors at t-
158   USE crs , ONLY :   gdept_n    =>  gdept_n_crs       !: depth of t-points (m)
159   USE crs , ONLY :   gdepw_n    =>  gdepw_n_crs       !: depth of t-points (m)
160   USE crs , ONLY :   e3t_max_crs => e3t_max_n_crs
161   USE crs , ONLY :   e3w_max_crs => e3w_max_n_crs
162#else
163   USE crs , ONLY :   e3t        =>  e3t_0_crs         !: vertical scale factors at t-
164   USE crs , ONLY :   e3u        =>  e3u_0_crs         !: vertical scale factors at u-
165   USE crs , ONLY :   e3v        =>  e3v_0_crs         !: vertical scale factors v-
166   USE crs , ONLY :   e3w        =>  e3w_0_crs         !: w-points (m)
167   USE crs , ONLY :   e3t_b      =>  e3t_0_crs         !: vertical scale factors at t-
168   USE crs , ONLY :   e3u_b      =>  e3u_0_crs         !: vertical scale factors at u-
169   USE crs , ONLY :   e3v_b      =>  e3v_0_crs         !: vertical scale factors v-
170   USE crs , ONLY :   e3w_b      =>  e3w_0_crs         !: w-points (m)
171   USE crs , ONLY :   e3t_n      =>  e3t_0_crs         !: vertical scale factors at t-
172   USE crs , ONLY :   e3u_n      =>  e3u_0_crs         !: vertical scale factors at u-
173   USE crs , ONLY :   e3v_n      =>  e3v_0_crs         !: vertical scale factors v-
174   USE crs , ONLY :   e3w_n      =>  e3w_0_crs         !: w-points (m)
175   USE crs , ONLY :   e3t_a      =>  e3t_0_crs         !: vertical scale factors at t-
176   USE crs , ONLY :   e3u_a      =>  e3u_0_crs         !: vertical scale factors at u-
177   USE crs , ONLY :   e3v_a      =>  e3v_0_crs         !: vertical scale factors v-
178   USE crs , ONLY :   e3w_a      =>  e3w_0_crs         !: w-points (m)
179   USE crs , ONLY :   gdept      =>  gdept_0_crs       !: depth of t-points (m)
180   USE crs , ONLY :   gdepw      =>  gdepw_0_crs       !: depth of t-points (m)
181   USE crs , ONLY :   gdept_crs  =>  gdept_0_crs       !: depth of t-points (m)
182   USE crs , ONLY :   gdepw_crs  =>  gdepw_0_crs       !: depth of t-points (m)
183   USE crs , ONLY :   gdept_n    =>  gdept_0_crs       !: depth of t-points (m)
184   USE crs , ONLY :   gdepw_n    =>  gdepw_0_crs       !: depth of t-points (m)
185   USE crs , ONLY :   e3t_max_crs => e3t_max_0_crs
186   USE crs , ONLY :   e3u_max_crs => e3u_max_0_crs
187   USE crs , ONLY :   e3v_max_crs => e3v_max_0_crs
188   USE crs , ONLY :   e3w_max_crs => e3w_max_0_crs
189#endif
190   USE dom_oce , ONLY :   gdept_1d   =>  gdept_1d      !: depth of t-points (m)
191   USE crs , ONLY :   gdept_0    =>  gdept_0_crs       !: depth of t-points (m)
192   USE crs , ONLY :     e3t_0    =>    e3t_0_crs       !: depth of t-points (m)
193   USE crs , ONLY :   mbkt       =>   mbkt_crs       !: vertical index of the bottom last T- ocean level
194   USE crs , ONLY :   mikt       =>   mikt_crs       !: vertical index of the top first T- ocean level
195   USE crs , ONLY :   tmask_i    =>   tmask_i_crs    !: Interior mask at t-points
196   USE crs , ONLY :   tmask      =>   tmask_crs      !: land/ocean mask at t-points
197   USE crs , ONLY :   umask      =>   umask_crs      !: land/ocean mask at u-points
198   USE crs , ONLY :   vmask      =>   vmask_crs      !: land/ocean mask at v-points
199
200
201 !* ocean fields: here now and after fields *
202   USE crs , ONLY :   un      =>    un_crs      !: i-horizontal velocity (m s-1)
203   USE crs , ONLY :   vn      =>    vn_crs      !: j-horizontal velocity (m s-1)
204   USE crs , ONLY :   wn      =>    wn_crs      !: vertical velocity (m s-1) 
205   USE crs , ONLY :   tsn     =>    tsn_crs     !: 4D array contaning ( tn, sn )
206   USE crs , ONLY :   rhop    =>    rhop_crs    !: potential volumic mass (kg m-3)
207   USE crs , ONLY :   hdivn   =>    hdivn_crs   !: horizontal divergence (1/s)
208   USE crs , ONLY :   sshb    =>    sshb_crs    !: sea surface height at t-point [m]   
209   USE crs , ONLY :   sshn    =>    sshn_crs    !: sea surface height at t-point [m]   
210   USE crs , ONLY :   ssha    =>    ssha_crs    !: sea surface height at t-point [m]   
211
212   !* surface fluxes *
213   USE crs , ONLY :   qsr        =>    qsr_crs        !: penetrative solar radiation (w m-2) 
214   USE crs , ONLY :   emp        =>    emp_crs        !: freshwater budget: volume flux               [Kg/m2/s]
215   USE crs , ONLY :   emp_b      =>    emp_b_crs      !: freshwater budget: volume flux               [Kg/m2/s]
216   USE crs , ONLY :   fmmflx     =>    fmmflx_crs     !: freshwater budget: volume flux               [Kg/m2/s]
217   USE crs , ONLY :   wndm       =>    wndm_crs       !: 10m wind speed
218   USE crs , ONLY :   rnf        =>    rnf_crs        !: river runoff   [Kg/m2/s]
219   USE crs , ONLY :   h_rnf      =>    h_rnf_crs      !: river runoff   [Kg/m2/s]
220   USE crs , ONLY :   nk_rnf     =>    nk_rnf_crs     !: depth of runoff in model level
221   USE crs , ONLY :   fr_i       =>    fr_i_crs       !: ice fraction (between 0 to 1)
222
223   USE ldftra_oce , ONLY :  aht0     =>   aht0        !: horizontal eddy diffusivity for tracers (m2/s)
224   USE crs , ONLY :  ahtu     =>   ahtu_crs        !: lateral diffusivity coef. at u-points
225   USE crs , ONLY :  ahtv     =>   ahtv_crs        !: lateral diffusivity coef. at v-points
226   USE crs , ONLY :  ahtw     =>   ahtw_crs        !: lateral diffusivity coef. at w-points
227   USE crs , ONLY :  ahtt     =>   ahtt_crs        !: lateral diffusivity coef. at t-points
228   USE crs , ONLY :  r_fact_lap     =>  r_fact_lap_crs        !: enhanced zonal diffusivity coefficient
229   USE ldftra_oce , ONLY :  rldf     =>   rldf
230
231   USE crs , ONLY :  trc_i => trc_i_crs
232   USE crs , ONLY :  trc_o => trc_o_crs
233
234   USE crs , ONLY :   avt        =>   avt_crs         !: vert. diffusivity coef. at w-point for temp 
235   USE crs , ONLY :   hmld        =>   hmld_crs        !: mixing layer depth (turbocline)
236   USE crs , ONLY :   hmlp        =>   hmlp_crs        !: mixed layer depth  (rho=rho0+zdcrit) (m)
237
238  !* direction of lateral diffusion *
239#if   defined key_ldfslp
240   USE crs , ONLY :   uslp       =>   uslp_crs         !: i-direction slope at u-, w-points
241   USE crs , ONLY :   vslp       =>   vslp_crs         !: j-direction slope at v-, w-points
242   USE crs , ONLY :   wslpi      =>   wslpi_crs        !: i-direction slope at u-, w-points
243   USE crs , ONLY :   wslpj      =>   wslpj_crs        !: j-direction slope at v-, w-points
244#endif
245
246#else
247
248   !!----------------------------------------------------------------------
249   !!   'key_top'                                                TOP models
250   !!----------------------------------------------------------------------
251
252   !* Domain size *
253   USE par_oce , ONLY :   jpi      =>   jpi        !: first  dimension of grid --> i
254   USE par_oce , ONLY :   jpj      =>   jpj        !: second dimension of grid --> j 
255   USE par_oce , ONLY :   jpk      =>   jpk        !: number of levels 
256   USE par_oce , ONLY :   jpim1    =>   jpim1      !: jpi - 1
257   USE par_oce , ONLY :   jpjm1    =>   jpjm1      !: jpj - 1
258   USE par_oce , ONLY :   jpkm1    =>   jpkm1      !: jpk - 1 
259   USE par_oce , ONLY :   jpij     =>   jpij       !: jpi x jpj
260   USE par_oce , ONLY :   lk_esopa =>   lk_esopa   !: flag to activate the all option
261   USE par_oce , ONLY :   jp_tem   =>   jp_tem     !: indice for temperature
262   USE par_oce , ONLY :   jp_sal   =>   jp_sal     !: indice for salinity
263
264  !* model domain *
265   USE dom_oce , ONLY : narea => narea
266   USE dom_oce , ONLY : nproc => nproc
267   USE dom_oce , ONLY : nimpp => nimpp
268   USE dom_oce , ONLY : njmpp => njmpp
269   USE dom_oce , ONLY : nreci => nreci
270   USE dom_oce , ONLY : nrecj => nrecj
271   USE dom_oce , ONLY : nlci  => nlci
272   USE dom_oce , ONLY : nldi  => nldi
273   USE dom_oce , ONLY : nlei  => nlei
274   USE dom_oce , ONLY : nlcj  => nlcj
275   USE dom_oce , ONLY : nldj  => nldj
276   USE dom_oce , ONLY : nlej  => nlej
277   USE dom_oce , ONLY : nlcit  => nlcit
278   USE dom_oce , ONLY : nldit  => nldit
279   USE dom_oce , ONLY : nleit  => nleit
280   USE dom_oce , ONLY : nlcjt  => nlcjt
281   USE dom_oce , ONLY : nldjt  => nldjt
282   USE dom_oce , ONLY : nlejt  => nlejt
283   USE dom_oce , ONLY : nimppt => nimppt
284   USE dom_oce , ONLY : njmppt => njmppt
285   USE dom_oce , ONLY : ibonit => ibonit
286   USE dom_oce , ONLY : ibonjt => ibonjt
287   USE dom_oce , ONLY : lk_vvl => lk_vvl
288   USE dom_oce , ONLY : rdt => rdt
289   USE dom_oce , ONLY : ln_zco => ln_zco
290   USE dom_oce , ONLY : ln_zps => ln_zps
291   USE dom_oce , ONLY : ln_sco => ln_sco
292   USE dom_oce , ONLY : neuler => neuler
293
294   USE dom_oce,  ONLY : mi0 => mi0
295   USE dom_oce,  ONLY : mi1 => mi1
296   USE dom_oce,  ONLY : mj0 => mj0
297   USE dom_oce,  ONLY : mj1 => mj1
298
299   USE dom_oce , ONLY :   glamt      =>   glamt      !: longitude of t-point (degre) 
300   USE dom_oce , ONLY :   glamu      =>   glamu      !: longitude of t-point (degre) 
301   USE dom_oce , ONLY :   glamv      =>   glamv      !: longitude of t-point (degre) 
302   USE dom_oce , ONLY :   glamf      =>   glamf      !: longitude of t-point (degre) 
303   USE dom_oce , ONLY :   gphit      =>   gphit      !: latitude  of t-point (degre)   
304   USE dom_oce , ONLY :   gphiu      =>   gphiu      !: latitude  of t-point (degre)   
305   USE dom_oce , ONLY :   gphiv      =>   gphiv      !: latitude  of t-point (degre)   
306   USE dom_oce , ONLY :   gphif      =>   gphif     !: latitude  of t-point (degre)   
307   USE dom_oce , ONLY :   e1t        =>   e1t        !: horizontal scale factors at t-point (m) 
308   USE dom_oce , ONLY :   e2t        =>   e2t        !: horizontal scale factors at t-point (m)   
309   USE dom_oce , ONLY :   e1e2t      =>   e1e2t      !: cell surface at t-point (m2)
310   USE dom_oce , ONLY :   e1u        =>   e1u        !: horizontal scale factors at u-point (m)
311   USE dom_oce , ONLY :   e2u        =>   e2u        !: horizontal scale factors at u-point (m)
312   USE dom_oce , ONLY :   e1v        =>   e1v        !: horizontal scale factors at v-point (m)
313   USE dom_oce , ONLY :   e2v        =>   e2v        !: horizontal scale factors at v-point (m) 
314#if defined key_vvl 
315   USE dom_oce , ONLY :     e3t_b    =>  e3t_b
316   USE dom_oce , ONLY :     e3t_n    =>  e3t_n
317   USE dom_oce , ONLY :     e3t_a    =>  e3t_a
318   USE dom_oce , ONLY :     e3u_n    =>  e3u_n
319   USE dom_oce , ONLY :     e3v_n    =>  e3v_n
320   USE dom_oce , ONLY :   e3u        =>  e3u_n         !: vertical scale factors at u-
321   USE dom_oce , ONLY :   e3v        =>  e3v_n         !: vertical scale factors v-
322   USE dom_oce , ONLY :   e3w_n      =>  e3w_n         !: w-points (m)
323   USE dom_oce , ONLY :   e3w        =>  e3w_n         !: w-points (m)
324   USE dom_oce , ONLY :   e3f        =>  e3f_n         !: f-points (m)
325   USE dom_oce , ONLY :   gdept_n    =>  gdept_n         !: f-points (m)
326   USE dom_oce , ONLY :   gdepw_n    =>  gdepw_n         !: f-points (m)
327#else
328   USE dom_oce , ONLY :   fse3t_n    =>  e3t_0
329   USE dom_oce , ONLY :   fse3t      =>  e3t_0
330   USE dom_oce , ONLY :   fse3u      =>  e3u_0
331   USE dom_oce , ONLY :   fse3v      =>  e3v_0
332   USE dom_oce , ONLY :   fse3w      =>  e3w_0
333   USE dom_oce , ONLY :   fse3t_b    =>  e3t_0
334   USE dom_oce , ONLY :   fse3t_a    =>  e3t_0
335   USE dom_oce , ONLY :     e3t_a    =>  e3t_0
336   USE dom_oce , ONLY :   e3t        =>  e3t_0         !: vertical scale factors at t-
337   USE dom_oce , ONLY :   e3u        =>  e3u_0         !: vertical scale factors at u-
338   USE dom_oce , ONLY :   e3v        =>  e3v_0         !: vertical scale factors v-
339   USE dom_oce , ONLY :   e3w        =>  e3w_0         !: w-points (m)
340   USE dom_oce , ONLY :   e3f        =>  e3f_0         !: f-points (m)
341#endif
342   USE dom_oce , ONLY :   ff         =>  ff         !: f-points (m)
343   USE dom_oce , ONLY :   e3t_0      =>  e3t_0         !: vertical scale factors at t-
344   USE dom_oce , ONLY :   e3u_0      =>  e3u_0         !: vertical scale factors at u-
345   USE dom_oce , ONLY :   e3v_0      =>  e3v_0         !: vertical scale factors v-
346   USE dom_oce , ONLY :   e3w_0      =>  e3w_0         !: w-points (m)
347   USE dom_oce , ONLY :   gdept_0    =>  gdept_0         !: f-points (m)
348   USE dom_oce , ONLY :   gdepw_0    =>  gdepw_0         !: f-points (m)
349   USE dom_oce , ONLY :   gdept_1d   => gdept_1d          !: f-points (m)
350   USE dom_oce , ONLY :   e3t_1d     => e3t_1d          !: f-points (m)
351   USE dom_oce , ONLY :   tmask      => tmask          !: f-points (m)
352   USE dom_oce , ONLY :   umask      => umask          !: f-points (m)
353   USE dom_oce , ONLY :   vmask      => vmask          !: f-points (m)
354   USE dom_oce , ONLY :   tmask_i      => tmask_i          !: f-points (m)
355   USE dom_oce , ONLY :   mbkt      => mbkt          !: f-points (m)
356   USE dom_oce , ONLY :   mbku      => mbku          !: f-points (m)
357   USE dom_oce , ONLY :   mbkv      => mbkv          !: f-points (m)
358   USE dom_oce , ONLY :   mikt      => mikt          !: f-points (m)
359
360   !* IO manager *
361   USE in_out_manager   
362 
363   !* Memory Allocation *
364   USE wrk_nemo     
365 
366   !* Timing *
367   USE timing   
368 
369   !* MPP library                         
370   USE lib_mpp 
371
372   !* Fortran utilities                         
373   USE lib_fortran , ONLY : glob_sum => glob_sum
374
375   !* Lateral boundary conditions                         
376   USE lbclnk
377
378   !* physical constants *
379   USE phycst           
380
381   !* 1D configuration
382   USE c1d                                         
383
384   !* model domain *
385   USE dom_oce , ONLY :  lzoom => lzoom 
386
387   USE domvvl, ONLY : un_td, vn_td          !: thickness diffusion transport
388   USE domvvl, ONLY : ln_vvl_ztilde         !: ztilde vertical coordinate
389   USE domvvl, ONLY : ln_vvl_layer          !: level  vertical coordinate
390
391   !* ocean fields: here now and after fields *
392   USE oce , ONLY :   ua      =>    ua      !: i-horizontal velocity (m s-1)
393   USE oce , ONLY :   va      =>    va      !: j-horizontal velocity (m s-1)
394   USE oce , ONLY :   un      =>    un      !: i-horizontal velocity (m s-1)
395   USE oce , ONLY :   vn      =>    vn      !: j-horizontal velocity (m s-1)
396   USE oce , ONLY :   wn      =>    wn      !: vertical velocity (m s-1) 
397   USE oce , ONLY :   tsn     =>    tsn     !: 4D array contaning ( tn, sn )
398   USE oce , ONLY :   tsb     =>    tsb     !: 4D array contaning ( tb, sb )
399   USE oce , ONLY :   tsa     =>    tsa     !: 4D array contaning ( ta, sa )
400   USE oce , ONLY :   rhop    =>    rhop    !: potential volumic mass (kg m-3)
401   USE oce , ONLY :   rhd     =>    rhd     !: in situ density anomalie rhd=(rho-rau0)/rau0 (no units)
402   USE oce , ONLY :   rab_n     =>    rab_n   !: in situ density anomalie rhd=(rho-rau0)/rau0 (no units)
403   USE oce , ONLY :   rn2b    =>    rn2b    !: in situ density anomalie rhd=(rho-rau0)/rau0 (no units)
404   USE oce , ONLY :   hdivn   =>    hdivn   !: horizontal divergence (1/s)
405   USE oce , ONLY :   rotn    =>    rotn    !: relative vorticity    [s-1]
406   USE oce , ONLY :   hdivb   =>    hdivb   !: horizontal divergence (1/s)
407   USE oce , ONLY :   rotb    =>    rotb    !: relative vorticity    [s-1]
408   USE oce , ONLY :   sshn    =>    sshn    !: sea surface height at t-point [m]   
409   USE oce , ONLY :   sshb    =>    sshb    !: sea surface height at t-point [m]   
410   USE oce , ONLY :   ssha    =>    ssha    !: sea surface height at t-point [m]   
411   USE oce , ONLY :   l_traldf_rot => l_traldf_rot  !: rotated laplacian operator for lateral diffusion
412
413   !* surface fluxes *
414   USE sbc_oce , ONLY :   utau       =>    utau       !: i-surface stress component
415   USE sbc_oce , ONLY :   vtau       =>    vtau       !: j-surface stress component
416   USE sbc_oce , ONLY :   wndm       =>    wndm       !: 10m wind speed
417   USE sbc_oce , ONLY :   qsr        =>    qsr        !: penetrative solar radiation (w m-2)
418   USE sbc_oce , ONLY :   emp        =>    emp        !: freshwater budget: volume flux               [Kg/m2/s]
419   USE sbc_oce , ONLY :   emp_b      =>    emp_b      !: freshwater budget: volume flux               [Kg/m2/s]
420   USE sbc_oce , ONLY :   fmmflx     =>    fmmflx     !: freshwater budget: volume flux               [Kg/m2/s]
421   USE sbc_oce , ONLY :   rnf        =>    rnf        !: river runoff   [Kg/m2/s]
422   USE sbc_oce , ONLY :   ln_dm2dc   =>    ln_dm2dc   !: Diurnal Cycle
423   USE sbc_oce , ONLY :   fr_i       =>    fr_i       !: ice fraction (between 0 to 1)
424   USE sbcrnf  , ONLY :   rnfmsk     =>    rnfmsk     !: mixed adv scheme in runoffs vicinity (hori.)
425   USE sbcrnf  , ONLY :   rnfmsk_z   =>    rnfmsk_z   !: mixed adv scheme in runoffs vicinity (vert.)
426   USE sbcrnf  , ONLY :   h_rnf      =>    h_rnf      !: river runoff   [Kg/m2/s]
427   USE sbcrnf  , ONLY :   nk_rnf     =>    nk_rnf     !: depth of runoff in model level
428   USE trc , ONLY :  trc_i => trc_i
429   USE trc , ONLY :  trc_o => trc_o
430
431   !* lateral diffusivity (tracers) *
432   USE ldftra_oce , ONLY :  rldf     =>   rldf        !: multiplicative coef. for lateral diffusivity
433   USE ldftra_oce , ONLY :  rn_aht_0 =>   rn_aht_0    !: horizontal eddy diffusivity for tracers (m2/s)
434   USE ldftra_oce , ONLY :  aht0     =>   aht0        !: horizontal eddy diffusivity for tracers (m2/s)
435   USE ldftra_oce , ONLY :  ahtb0    =>   ahtb0       !: background eddy diffusivity for isopycnal diff. (m2/s)
436   USE ldftra_oce , ONLY :  ahtu     =>   ahtu        !: lateral diffusivity coef. at u-points
437   USE ldftra_oce , ONLY :  ahtv     =>   ahtv        !: lateral diffusivity coef. at v-points
438   USE ldftra_oce , ONLY :  ahtw     =>   ahtw        !: lateral diffusivity coef. at w-points
439   USE ldftra_oce , ONLY :  ahtt     =>   ahtt        !: lateral diffusivity coef. at t-points
440   USE ldftra_oce , ONLY :  aeiv0    =>   aeiv0       !: eddy induced velocity coefficient (m2/s)
441   USE ldftra_oce , ONLY :  aeiu     =>   aeiu        !: eddy induced velocity coef. at u-points (m2/s)   
442   USE ldftra_oce , ONLY :  aeiv     =>   aeiv        !: eddy induced velocity coef. at v-points (m2/s)
443   USE ldftra_oce , ONLY :  aeiw     =>   aeiw        !: eddy induced velocity coef. at w-points (m2/s)
444   USE ldftra_oce , ONLY :  lk_traldf_eiv  =>  lk_traldf_eiv     !: eddy induced velocity flag
445   USE ldftra_oce , ONLY :  r_fact_lap     =>  r_fact_lap        !: enhanced zonal diffusivity coefficient
446
447   !* vertical diffusion *
448   USE zdf_oce , ONLY :   avt        =>   avt         !: vert. diffusivity coef. at w-point for temp 
449# if defined key_zdfddm
450   USE zdfddm  , ONLY :   avs        =>   avs         !: salinity vertical diffusivity coeff. at w-point
451# endif
452
453   !* mixing & mixed layer depth *
454   USE zdfmxl , ONLY :   nmln        =>   nmln        !: number of level in the mixed layer
455   USE zdfmxl , ONLY :   hmld        =>   hmld        !: mixing layer depth (turbocline)
456   USE zdfmxl , ONLY :   hmlp        =>   hmlp        !: mixed layer depth  (rho=rho0+zdcrit) (m)
457   USE zdfmxl , ONLY :   hmlpt       =>   hmlpt       !: mixed layer depth at t-points (m)
458
459   !* direction of lateral diffusion *
460   USE ldfslp , ONLY :   lk_ldfslp  =>  lk_ldfslp     !: slopes flag
461# if   defined key_ldfslp
462   USE ldfslp , ONLY :   uslp       =>   uslp         !: i-direction slope at u-, w-points
463   USE ldfslp , ONLY :   vslp       =>   vslp         !: j-direction slope at v-, w-points
464   USE ldfslp , ONLY :   wslpi      =>   wslpi        !: i-direction slope at u-, w-points
465   USE ldfslp , ONLY :   wslpj      =>   wslpj        !: j-direction slope at v-, w-points
466# endif
467
468   USE diaar5 , ONLY :   lk_diaar5  =>   lk_diaar5
469
470#endif
471
472
473   USE dom_oce , ONLY : ndastp
474   USE sbc_oce , ONLY : nn_ice_embd
475   USE sbc_oce , ONLY : ln_cpl
476   USE sbc_oce , ONLY : ln_rnf
477   USE sbc_oce , ONLY : ncpl_qsr_freq
478
479#else
480   !!----------------------------------------------------------------------
481   !!  Empty module :                                     No passive tracer
482   !!----------------------------------------------------------------------
483#endif
484
485   !!----------------------------------------------------------------------
486   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
487   !! $Id$
488   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
489   !!======================================================================
490END MODULE oce_trc
Note: See TracBrowser for help on using the repository browser.