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.
sms_medusa.F90 in branches/NERC/dev_r5107_NOC_MEDUSA/NEMOGCM/NEMO/TOP_SRC/MEDUSA – NEMO

source: branches/NERC/dev_r5107_NOC_MEDUSA/NEMOGCM/NEMO/TOP_SRC/MEDUSA/sms_medusa.F90 @ 5707

Last change on this file since 5707 was 5707, checked in by acc, 9 years ago

JPALM --25-08-2015 -- add MEDUSA in the branch. MEDUSA version already up-to-date with this trunk revision

File size: 26.3 KB
Line 
1MODULE sms_medusa 
2   !!----------------------------------------------------------------------
3   !!                     ***  sms_medusa.F90  *** 
4   !! TOP :   MEDUSA  Source Minus Sink variables
5   !!----------------------------------------------------------------------
6   !! History :    -   !  1999-09 (M. Levy)  original code
7   !!              -   !  2000-12 (O. Aumont, E. Kestenare)  add sediment
8   !!             1.0  !  2005-10 (C. Ethe) F90
9   !!             1.0  !  2005-03  (A-S Kremeur) add fphylab, fzoolab, fdetlab, fdbod
10   !!              -   !  2005-06  (A-S Kremeur) add sedpocb, sedpocn, sedpoca
11   !!             2.0  !  2007-04  (C. Deltel, G. Madec)  Free form and modules
12   !!              -   !  2008-08  (K. Popova) adaptation for MEDUSA
13   !!              -   !  2008-11  (A. Yool) continuing adaptation for MEDUSA
14   !!              -   !  2010-03  (A. Yool) updated for branch inclusion
15   !!              -   !  2011-04  (A. Yool) updated for ROAM project
16   !!----------------------------------------------------------------------
17
18#if defined key_medusa
19   !!----------------------------------------------------------------------
20   !!   'key_medusa'                                         MEDUSA model
21   !!----------------------------------------------------------------------
22   USE par_oce
23   USE par_trc
24
25   IMPLICIT NONE
26   PUBLIC
27
28   !!----------------------------------------------------------------------
29   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005)
30   !! $Id: sms_medusa.F90 1152 2008-06-26 14:11:13Z rblod $
31   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
32   !!----------------------------------------------------------------------
33
34   INTEGER ::   numnatp_ref = -1           !! Logical units for namelist medusa
35   INTEGER ::   numnatp_cfg = -1           !! Logical units for namelist medusa
36   INTEGER ::   numonp      = -1           !! Logical unit for namelist medusa output
37
38!!----------------------------------------------------------------------
39!! Biological parameters
40!!----------------------------------------------------------------------
41!!
42!! Primary production and chl related quantities
43   REAL(wp) ::  xxi       !:  conversion factor from gC to mmolN
44   REAL(wp) ::  xaln      !:  Chl-a specific initial slope of P-I curve for non-diatoms
45   REAL(wp) ::  xald      !:  Chl-a specific initial slope of P-I curve for diatoms
46   INTEGER  ::  jphy      !:  phytoplankton T-dependent growth switch
47   REAL(wp) ::  xvpn      !:  maximum growth rate for non-diatoms
48   REAL(wp) ::  xvpd      !:  maximum growth rate for diatoms
49   REAL(wp) ::  xthetam   !:  maximum Chl to C ratio for non-diatoms     
50   REAL(wp) ::  xthetamd  !:  maximum Chl to C ratio for diatoms   
51!!
52!! Diatom silicon parameters
53   REAL(wp) ::  xsin0     !:  minimum diatom Si:N ratio
54   REAL(wp) ::  xnsi0     !:  minimum diatom N:Si ratio
55   REAL(wp) ::  xuif      !:  hypothetical growth ratio at infinite Si:N ratio
56!!
57!! Nutrient limitation
58   INTEGER  ::  jliebig   !:  Liebig nutrient uptake switch
59   REAL(wp) ::  xnln      !:  half-sat constant for DIN uptake by non-diatoms
60   REAL(wp) ::  xnld      !:  half-sat constant for DIN uptake by diatoms
61   REAL(wp) ::  xsld      !:  half-sat constant for Si uptake by diatoms
62   REAL(wp) ::  xfln      !:  half-sat constant for Fe uptake by non-diatoms
63   REAL(wp) ::  xfld      !:  half-sat constant for Fe uptake by diatoms 
64!!
65!! Grazing
66   REAL(wp) ::  xgmi      !:  microzoo maximum growth rate
67   REAL(wp) ::  xgme      !:  mesozoo maximum growth rate
68   REAL(wp) ::  xkmi      !:  microzoo grazing half-sat parameter
69   REAL(wp) ::  xkme      !:  mesozoo grazing half-sat parameter
70   REAL(wp) ::  xphi      !:  micro/mesozoo grazing inefficiency
71   REAL(wp) ::  xbetan    !:  micro/mesozoo N assimilation efficiency
72   REAL(wp) ::  xbetac    !:  micro/mesozoo C assimilation efficiency
73   REAL(wp) ::  xkc       !:  micro/mesozoo net C growth efficiency
74   REAL(wp) ::  xpmipn    !:  grazing preference of microzoo for non-diatoms
75   REAL(wp) ::  xpmid     !:  grazing preference of microzoo for diatoms
76   REAL(wp) ::  xpmepn    !:  grazing preference of mesozoo for non-diatoms
77   REAL(wp) ::  xpmepd    !:  grazing preference of mesozoo for diatoms
78   REAL(wp) ::  xpmezmi   !:  grazing preference of mesozoo for microzoo
79   REAL(wp) ::  xpmed     !:  grazing preference of mesozoo for detritus
80!!
81!! Metabolic losses
82   REAL(wp) ::  xmetapn   !:  non-diatom metabolic loss rate
83   REAL(wp) ::  xmetapd   !:  diatom     metabolic loss rate
84   REAL(wp) ::  xmetazmi  !:  microzoo   metabolic loss rate
85   REAL(wp) ::  xmetazme  !:  mesozoo    metabolic loss rate
86!!
87!! Mortality losses
88   INTEGER  ::  jmpn      !:  non-diatom mortality functional form
89   REAL(wp) ::  xmpn      !:  non-diatom mortality rate
90   REAL(wp) ::  xkphn     !:  non-diatom mortality half-sat constant
91   INTEGER  ::  jmpd      !:  diatom     mortality functional form
92   REAL(wp) ::  xmpd      !:  diatom     mortality rate
93   REAL(wp) ::  xkphd     !:  diatom     mortality half-sat constant
94   INTEGER  ::  jmzmi     !:  microzoo   mortality functional form
95   REAL(wp) ::  xmzmi     !:  microzoo   mortality rate
96   REAL(wp) ::  xkzmi     !:  microzoo   mortality half-sat constant
97   INTEGER  ::  jmzme     !:  mesozoo    mortality functional form
98   REAL(wp) ::  xmzme     !:  mesozoo    mortality rate
99   REAL(wp) ::  xkzme     !:  mesozoo    mortality half-sat constant
100!!
101!! Remineralisation
102   INTEGER  ::  jmd       !:  detritus T-dependent remineralisation switch
103   INTEGER  ::  jsfd      !:  accelerate seafloor detritus remin. switch
104   REAL(wp) ::  xmd       !:  detrital nitrogen remineralisation rate
105   REAL(wp) ::  xmdc      !:  detrital carbon remineralisation rate
106!!
107!! Stochiometric ratios
108   REAL(wp) ::  xthetapn  !:  non-diatom C:N ratio
109   REAL(wp) ::  xthetapd  !:  diatom C:N ratio
110   REAL(wp) ::  xthetazmi !:  microzoo C:N ratio
111   REAL(wp) ::  xthetazme !:  mesozoo C:N ratio
112   REAL(wp) ::  xthetad   !:  detritus C:N ratio
113   REAL(wp) ::  xrfn      !:  phytoplankton Fe:N ratio
114   REAL(wp) ::  xrsn      !:  diatom Si:N ratio (NOT USED HERE; RETAINED FOR LOBSTER)
115!!
116!! Iron parameters
117   INTEGER  ::  jiron     !:  iron scavenging submodel switch
118   REAL(wp) ::  xfe_mass  !:  iron atomic mass
119   REAL(wp) ::  xfe_sol   !:  aeolian iron solubility
120   REAL(wp) ::  xfe_sed   !:  sediment iron input
121   REAL(wp) ::  xLgT      !:  total ligand concentration (umol/m3)
122   REAL(wp) ::  xk_FeL    !:  dissociation constant for (Fe + L)
123   REAL(wp) ::  xk_sc_Fe  !:  scavenging rate of "free" iron
124!!
125!! Gravitational sinking     
126   REAL(wp) ::  vsed      !:  detritus gravitational sinking rate
127   REAL(wp) ::  xhr       !:  coefficient for Martin et al. (1987) remineralisation
128!!
129!! Fast-sinking detritus parameters
130   INTEGER  ::  jexport   !:  fast detritus remineralisation switch
131   INTEGER  ::  jfdfate   !:  fate of fast detritus at seafloor switch
132   INTEGER  ::  jrratio   !:  rain ratio switch
133   INTEGER  ::  jocalccd  !:  CCD switch
134   REAL(wp) ::  xridg_r0  !:  Ridgwell rain ratio coefficient
135   REAL(wp) ::  xfdfrac1  !:  fast-sinking fraction of diatom nat. mort. losses
136   REAL(wp) ::  xfdfrac2  !:  fast-sinking fraction of mesozooplankton mort. losses
137   REAL(wp) ::  xfdfrac3  !:  fast-sinking fraction of diatom silicon grazing losses
138   REAL(wp) ::  xcaco3a   !:  polar (high latitude) CaCO3 fraction
139   REAL(wp) ::  xcaco3b   !:  equatorial (low latitude) CaCO3 fraction
140   REAL(wp) ::  xmassc    !:  organic C mass:mole ratio, C106 H175 O40 N16 P1
141   REAL(wp) ::  xmassca   !:  calcium carbonate mass:mole ratio, CaCO3
142   REAL(wp) ::  xmasssi   !:  biogenic silicon mass:mole ratio, (H2SiO3)n
143   REAL(wp) ::  xprotca   !:  calcium carbonate protection ratio
144   REAL(wp) ::  xprotsi   !:  biogenic silicon protection ratio
145   REAL(wp) ::  xfastc    !:  organic C remineralisation length scale
146   REAL(wp) ::  xfastca   !:  calcium carbonate dissolution length scale
147   REAL(wp) ::  xfastsi   !:  biogenic silicon dissolution length scale
148!!
149!! Benthos parameters
150   INTEGER  ::  jorgben   !:  does   organic detritus go to the benthos?
151   INTEGER  ::  jinorgben !:  does inorganic detritus go to the benthos?
152!!
153   REAL(wp) ::  xsedn     !:  organic   nitrogen sediment remineralisation rate
154   REAL(wp) ::  xsedfe    !:  organic   iron     sediment remineralisation rate
155   REAL(wp) ::  xsedsi    !:  inorganic silicon  sediment dissolution      rate
156   REAL(wp) ::  xsedc     !:  organic   carbon   sediment remineralisation rate
157   REAL(wp) ::  xsedca    !:  inorganic carbon   sediment dissolution      rate
158   REAL(wp) ::  xburial   !:  burial rate of seafloor detritus
159!!
160!! River parameters
161   INTEGER  ::  jriver_n  !:  riverine nitrogen?   0 = no, 1 = conc, 2 = flux
162   INTEGER  ::  jriver_si !:  riverine silicon?    0 = no, 1 = conc, 2 = flux
163   INTEGER  ::  jriver_c  !:  riverine carbon?     0 = no, 1 = conc, 2 = flux
164   INTEGER  ::  jriver_alk!:  riverine alkalinity? 0 = no, 1 = conc, 2 = flux
165   INTEGER  ::  jriver_dep!:  depth river input added to?  1 = surface, >1 possible
166!!
167!! Miscellaneous
168   REAL(wp) ::  xsdiss    !:  diatom frustule dissolution rate
169!!
170!! Additional parameters
171   INTEGER  ::  jpkb      !:  vertical layer for diagnostic of the vertical flux
172!!
173!! UKESM diagnostics
174   INTEGER  ::  jdms      !:  include DMS diagnostics ? Jpalm (27-08-2014)
175!!
176!!
177   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   remdmp   !: depth dependent damping coefficient of passive tracers
178!!
179!! AXY (27/07/10): add in indices for depth horizons (for sinking flux
180!!                 and seafloor iron inputs)
181   INTEGER  ::    i0100, i0150, i0200, i0500, i1000, i1100
182#if defined key_roam
183!!
184!! ROAM carbon, alkalinity and oxygen cycle parameters
185   REAL(wp) ::  xthetaphy    !:  oxygen evolution/consumption by phytoplankton
186   REAL(wp) ::  xthetazoo    !:  oxygen consumption by zooplankton
187   REAL(wp) ::  xthetanit    !:  oxygen consumption by nitrogen remineralisation
188   REAL(wp) ::  xthetarem    !:  oxygen consumption by carbon remineralisation
189   REAL(wp) ::  xo2min       !:  oxygen minimum concentration
190!!
191!! 3D fields of carbonate system parameters
192   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: f3_pH       !: 3D pH
193   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: f3_h2co3    !: 3D carbonic acid
194   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: f3_hco3     !: 3D bicarbonate
195   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: f3_co3      !: 3D carbonate
196   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: f3_omcal    !: 3D omega calcite
197   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: f3_omarg    !: 3D omega aragonite
198!!
199!! 2D fields of calcium carbonate compensation depth
200   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: f2_ccd_cal  !: 2D calcite CCD depth
201   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: f2_ccd_arg  !: 2D aragonite CCD depth
202!!
203!! 2D fields of organic and inorganic material sedimented on the seafloor
204   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: zb_sed_n    !: 2D organic nitrogen   (before)
205   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: zn_sed_n    !: 2D organic nitrogen   (now)
206   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: za_sed_n    !: 2D organic nitrogen   (after)
207   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: zb_sed_fe   !: 2D organic iron       (before)
208   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: zn_sed_fe   !: 2D organic iron       (now)
209   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: za_sed_fe   !: 2D organic iron       (after)
210   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: zb_sed_si   !: 2D inorganic silicon  (before)
211   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: zn_sed_si   !: 2D inorganic silicon  (now)
212   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: za_sed_si   !: 2D inorganic silicon  (after)
213   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: zb_sed_c    !: 2D organic carbon     (before)
214   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: zn_sed_c    !: 2D organic carbon     (now)
215   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: za_sed_c    !: 2D organic carbon     (after)
216   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: zb_sed_ca   !: 2D inorganic carbon   (before)
217   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: zn_sed_ca   !: 2D inorganic carbon   (now)
218   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: za_sed_ca   !: 2D inorganic carbon   (after)
219#endif
220
221!!----------------------------------------------------------------------
222!! CCD parameter
223!!----------------------------------------------------------------------
224!!
225   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   ocal_ccd  !: CCD depth
226
227!!----------------------------------------------------------------------
228!! Dust parameters
229!!----------------------------------------------------------------------
230!!
231   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   dust      !: dust parameter 1
232   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   dustmo    !: dust parameter 2
233
234!!----------------------------------------------------------------------
235!! River parameters
236!!----------------------------------------------------------------------
237!!
238   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   riv_n      !: riverine N
239   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   riv_si     !: riverine Si
240   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   riv_c      !: riverine C
241   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   riv_alk    !: riverine alkalinity
242   !! AXY (19/07/12): add this to permit river fluxes to be added below top box
243   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   friver_dep !: where river fluxes added
244
245#if defined key_roam
246!!----------------------------------------------------------------------
247!! Atmospheric pCO2 data (1859 to 2100 inclusive)
248!!----------------------------------------------------------------------
249!!
250   REAL(wp), DIMENSION(242)         ::   hist_pco2 !: pCO2
251
252# if defined key_rcp26
253      !! UKMO, run AJKKH + KAAEC, RCP 2.6, pCO2 time evolution
254      DATA hist_pco2 / 286.0230, 286.1730, 286.3230, 286.4480, 286.5730, &
255      & 286.7230, 286.8480, 286.9480, 287.0480, 287.1730, &
256      & 287.3230, 287.4730, 287.6480, 287.8480, 288.0730, &
257      & 288.3480, 288.6480, 288.9730, 289.3470, 289.7470, &
258      & 290.1730, 290.6470, 291.1470, 291.6220, 292.0720, &
259      & 292.5220, 292.9220, 293.2470, 293.5220, 293.7470, &
260      & 293.9470, 294.1220, 294.2720, 294.4220, 294.5470, &
261      & 294.6470, 294.7470, 294.8470, 294.9710, 295.1710, &
262      & 295.4460, 295.7470, 296.0720, 296.4210, 296.7710, &
263      & 297.1460, 297.5710, 298.0210, 298.4460, 298.8460, &
264      & 299.2460, 299.6450, 300.0210, 300.3710, 300.7200, &
265      & 301.0450, 301.3460, 301.6710, 302.0200, 302.3450, &
266      & 302.6450, 302.9700, 303.3450, 303.7200, 304.0700, &
267      & 304.4700, 304.9200, 305.3440, 305.7700, 306.2450, &
268      & 306.7190, 307.1700, 307.6440, 308.1190, 308.5440, &
269      & 308.9440, 309.3440, 309.6940, 309.9440, 310.1190, &
270      & 310.2440, 310.3190, 310.3190, 310.2440, 310.1440, &
271      & 310.0690, 310.0440, 310.0690, 310.1440, 310.2690, &
272      & 310.4440, 310.6940, 311.0430, 311.4440, 311.8690, &
273      & 312.3680, 312.9430, 313.5430, 314.1680, 314.7900, &
274      & 315.4430, 316.2150, 317.0170, 317.7370, 318.3400, &
275      & 318.8680, 319.5900, 320.5890, 321.5470, 322.5770, &
276      & 323.8440, 324.9260, 325.7960, 327.0810, 328.6180, &
277      & 329.6830, 330.5250, 331.6880, 333.2120, 334.7870, &
278      & 336.4640, 338.2990, 339.6660, 340.7310, 342.1360, &
279      & 343.7200, 345.2200, 346.7350, 348.5820, 350.6740, &
280      & 352.4230, 353.7910, 354.9530, 355.8210, 356.7130, &
281      & 358.0630, 359.7720, 361.3970, 363.0900, 365.2560, &
282      & 367.2810, 368.7980, 370.4000, 372.4550, 374.6920, &
283      & 376.7440, 378.7440, 380.7580, 382.7080, 384.7300, &
284      & 386.9310, 389.2150, 391.4910, 393.7710, 396.0460, &
285      & 398.3240, 400.6080, 402.8950, 405.1780, 407.4550, &
286      & 409.7260, 411.9930, 414.2500, 416.4410, 418.5280, &
287      & 420.5250, 422.4390, 424.2720, 426.0200, 427.6750, &
288      & 429.2360, 430.7050, 432.0850, 433.3580, 434.5140, &
289      & 435.5740, 436.5490, 437.4420, 438.2550, 438.9810, &
290      & 439.6110, 440.1430, 440.5770, 440.9450, 441.2660, &
291      & 441.5410, 441.7840, 442.0050, 442.2040, 442.3780, &
292      & 442.5210, 442.6200, 442.6720, 442.6810, 442.6540, &
293      & 442.5830, 442.4670, 442.3270, 442.1680, 441.9960, &
294      & 441.8060, 441.5930, 441.3440, 441.0540, 440.7230, &
295      & 440.3510, 439.9300, 439.4650, 438.9730, 438.4630, &
296      & 437.9400, 437.4020, 436.8400, 436.2640, 435.6850, &
297      & 435.1030, 434.5160, 433.9170, 433.3060, 432.7010, &
298      & 432.1110, 431.5380, 430.9810, 430.4320, 429.8860, &
299      & 429.3370, 428.7810, 428.2220, 427.6490, 427.0660, &
300      & 426.4890, 425.9270, 425.3840, 424.8610, 424.3540, &
301      & 423.8540, 423.3540, 422.8530, 422.3510, 421.8410, &
302      & 421.3250, 420.8190 /
303# else
304      !! UKMO, run AJKKH + KAAEF, RCP 8.5, pCO2 time evolution
305      DATA hist_pco2 / 286.0230, 286.1730, 286.3230, 286.4480, 286.5730, &
306      & 286.7230, 286.8480, 286.9480, 287.0480, 287.1730, &
307      & 287.3230, 287.4730, 287.6480, 287.8480, 288.0730, &
308      & 288.3480, 288.6480, 288.9730, 289.3470, 289.7470, &
309      & 290.1730, 290.6470, 291.1470, 291.6220, 292.0720, &
310      & 292.5220, 292.9220, 293.2470, 293.5220, 293.7470, &
311      & 293.9470, 294.1220, 294.2720, 294.4220, 294.5470, &
312      & 294.6470, 294.7470, 294.8470, 294.9710, 295.1710, &
313      & 295.4460, 295.7470, 296.0720, 296.4210, 296.7710, &
314      & 297.1460, 297.5710, 298.0210, 298.4460, 298.8460, &
315      & 299.2460, 299.6450, 300.0210, 300.3710, 300.7200, &
316      & 301.0450, 301.3460, 301.6710, 302.0200, 302.3450, &
317      & 302.6450, 302.9700, 303.3450, 303.7200, 304.0700, &
318      & 304.4700, 304.9200, 305.3440, 305.7700, 306.2450, &
319      & 306.7190, 307.1700, 307.6440, 308.1190, 308.5440, &
320      & 308.9440, 309.3440, 309.6940, 309.9440, 310.1190, &
321      & 310.2440, 310.3190, 310.3190, 310.2440, 310.1440, &
322      & 310.0690, 310.0440, 310.0690, 310.1440, 310.2690, &
323      & 310.4440, 310.6940, 311.0430, 311.4440, 311.8690, &
324      & 312.3680, 312.9430, 313.5430, 314.1680, 314.7900, &
325      & 315.4430, 316.2150, 317.0170, 317.7370, 318.3400, &
326      & 318.8680, 319.5900, 320.5890, 321.5470, 322.5770, &
327      & 323.8440, 324.9260, 325.7960, 327.0810, 328.6180, &
328      & 329.6830, 330.5250, 331.6880, 333.2120, 334.7870, &
329      & 336.4640, 338.2990, 339.6660, 340.7310, 342.1360, &
330      & 343.7200, 345.2200, 346.7350, 348.5820, 350.6740, &
331      & 352.4230, 353.7910, 354.9530, 355.8210, 356.7130, &
332      & 358.0630, 359.7720, 361.3970, 363.0900, 365.2560, &
333      & 367.2810, 368.7980, 370.4000, 372.4550, 374.6920, &
334      & 376.7440, 378.7440, 380.7580, 382.7080, 384.7300, &
335      & 386.9420, 389.2540, 391.5670, 393.9370, 396.3920, &
336      & 398.9320, 401.5550, 404.2550, 407.0220, 409.8530, &
337      & 412.7470, 415.7050, 418.7210, 421.7880, 424.9180, &
338      & 428.1200, 431.3970, 434.7470, 438.1650, 441.6410, &
339      & 445.1700, 448.7530, 452.3920, 456.0950, 459.8810, &
340      & 463.7680, 467.7660, 471.8750, 476.0960, 480.4210, &
341      & 484.8390, 489.3470, 493.9430, 498.6400, 503.4380, &
342      & 508.3410, 513.3630, 518.5160, 523.8050, 529.2290, &
343      & 534.7780, 540.4450, 546.2230, 552.1120, 558.1110, &
344      & 564.2110, 570.4130, 576.7390, 583.1990, 589.7980, &
345      & 596.5390, 603.4110, 610.4060, 617.4940, 624.6500, &
346      & 631.8800, 639.1750, 646.5360, 653.9800, 661.5230, &
347      & 669.1840, 676.9570, 684.8290, 692.7790, 700.7690, &
348      & 708.8050, 716.8870, 725.0020, 733.1770, 741.3900, &
349      & 749.6700, 758.0480, 766.5050, 775.0350, 783.6110, &
350      & 792.2200, 800.8740, 809.5680, 818.2760, 827.0090, &
351      & 835.8020, 844.6550, 853.5730, 862.5690, 871.6190, &
352      & 880.7020, 889.8240, 898.9590, 908.1270, 917.3080, &
353      & 926.4960, 935.7040 /
354# endif
355#endif
356
357!!----------------------------------------------------------------------
358!! Optical parameters
359!!----------------------------------------------------------------------
360!!
361   REAL(wp) ::   xkr0       !: water coefficient absorption in red      (NAMELIST)
362   REAL(wp) ::   xkg0       !: water coefficient absorption in green    (NAMELIST)
363   REAL(wp) ::   xkrp       !: pigment coefficient absorption in red    (NAMELIST)
364   REAL(wp) ::   xkgp       !: pigment coefficient absorption in green  (NAMELIST)
365   REAL(wp) ::   xlr        !: exposant for pigment absorption in red   (NAMELIST)
366   REAL(wp) ::   xlg        !: exposant for pigment absorption in green (NAMELIST)
367   REAL(wp) ::   rpig       !: chla/chla+phea ratio                     (NAMELIST)
368                                                       
369   INTEGER , ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   neln    !: number of levels in the euphotic layer
370   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   xze     !: euphotic layer depth
371   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   xpar    !: par (photosynthetic available radiation)
372
373!!----------------------------------------------------------------------
374!! Sediment parameters                               
375!!
376!! AXY (16/01/12): these parameters were originally part of the pre-
377!!                 cursor model on which MEDUSA's code was grounded;
378!!                 they do not relate to the sediment/benthos submodel
379!!                 added as part of the ROAM project; they have only
380!!                 been retained because they are distributed through
381!!                 MEDUSA and require a proper clean-up to purge
382!!----------------------------------------------------------------------
383!!
384   REAL(wp) ::   sedlam       !: time coefficient of POC remineralization in sediments
385   REAL(wp) ::   sedlostpoc   !: ???
386   REAL(wp) ::   areacot      !: ???
387                                                       
388   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: dminl       !: fraction of sinking POC released in sediments
389   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: dmin3       !: fraction of sinking POC released at each level
390                                                       
391   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: sedpocb     !: mass of POC in sediments
392   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: sedpocn     !: mass of POC in sediments
393   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: sedpoca     !: mass of POC in sediments
394                                                       
395   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: fbodf       !: rapid sinking particles
396   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: fbods       !: rapid sinking particles
397   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: fbodn       !: rapid sinking particles
398                                                       
399   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ffln        !:
400   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: fflf        !:
401   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ffls        !:
402
403   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: cmask       !: ???
404
405   !!----------------------------------------------------------------------
406   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
407   !! $Id: sms_medusa.F90 3780 2013-02-08 11:13:47Z cetlod $
408   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
409   !!----------------------------------------------------------------------
410CONTAINS
411
412   INTEGER FUNCTION sms_medusa_alloc()
413      !!----------------------------------------------------------------------
414      !!        *** ROUTINE sms_medusa_alloc ***
415      !!----------------------------------------------------------------------
416      USE lib_mpp , ONLY: ctl_warn
417      INTEGER ::   ierr(6)        ! Local variables
418      !!----------------------------------------------------------------------
419      ierr(:) = 0
420      !
421#if defined key_medusa
422      !* depth-dependent damping coefficient
423      ALLOCATE( remdmp(jpk,jp_medusa),                           STAT=ierr(1) )
424# if defined key_roam
425      !* 2D and 3D fields of carbonate system parameters
426      ALLOCATE( f2_ccd_cal(jpi,jpj)  , f2_ccd_arg(jpi,jpj)  ,       &
427         &      f3_pH(jpi,jpj,jpk)   , f3_h2co3(jpi,jpj,jpk),       &
428         &      f3_hco3(jpi,jpj,jpk) , f3_co3(jpi,jpj,jpk)  ,       &
429         &      f3_omcal(jpi,jpj,jpk), f3_omarg(jpi,jpj,jpk),    STAT=ierr(2) )
430      !* 2D fields of organic and inorganic material sedimented on the seafloor
431      ALLOCATE( zb_sed_n(jpi,jpj)    , zn_sed_n(jpi,jpj)    ,       &
432         &      za_sed_n(jpi,jpj)    ,                              &
433         &      zb_sed_fe(jpi,jpj)   , zn_sed_fe(jpi,jpj)   ,       &
434         &      za_sed_fe(jpi,jpj)   ,                              &
435         &      zb_sed_si(jpi,jpj)   , zn_sed_si(jpi,jpj)   ,       &
436         &      za_sed_si(jpi,jpj)   ,                              &
437         &      zb_sed_c(jpi,jpj)    , zn_sed_c(jpi,jpj)    ,       &
438         &      za_sed_c(jpi,jpj)    ,                              &
439         &      zb_sed_ca(jpi,jpj)   , zn_sed_ca(jpi,jpj)   ,       &
440         &      za_sed_ca(jpi,jpj)   ,                           STAT=ierr(3) )
441# endif
442      !* 2D fields of miscellaneous parameters
443      ALLOCATE( ocal_ccd(jpi,jpj)    , dust(jpi,jpj)        ,       &
444         &      dustmo(jpi,jpj,2)    , riv_n(jpi,jpj)       ,       &
445         &      riv_si(jpi,jpj)      , riv_c(jpi,jpj)       ,       &
446         &      riv_alk(jpi,jpj)     , friver_dep(jpk,jpk)  ,    STAT=ierr(4) )
447      !* 2D and 3D fields of light parameters
448      ALLOCATE( neln(jpi,jpj)        , xze(jpi,jpj)         ,       &
449         &      xpar(jpi,jpj,jpk)    ,                           STAT=ierr(5) )
450      !* 2D and 3D fields of sediment-associated parameters
451      ALLOCATE( dminl(jpi,jpj)       , dmin3(jpi,jpj,jpk)   ,       &
452         &      sedpocb(jpi,jpj)     , sedpocn(jpi,jpj)     ,       &
453         &      sedpoca(jpi,jpj)     , fbodn(jpi,jpj)       ,       &
454         &      fbodf(jpi,jpj)       , fbods(jpi,jpj)       ,       &
455         &      ffln(jpi,jpj,jpk)    , fflf(jpi,jpj,jpk)    ,       &
456         &      ffls(jpi,jpj,jpk)    , cmask(jpi,jpj)       ,    STAT=ierr(6) ) 
457#endif
458      !
459      sms_medusa_alloc = MAXVAL( ierr )
460      !
461      IF( sms_medusa_alloc /= 0 )   CALL ctl_warn('sms_medusa_alloc: failed to allocate arrays')
462      !
463   END FUNCTION sms_medusa_alloc
464
465#else
466   !!----------------------------------------------------------------------
467   !!  Empty module :                                     NO MEDUSA model
468   !!----------------------------------------------------------------------
469#endif
470
471   !!======================================================================
472END MODULE sms_medusa
Note: See TracBrowser for help on using the repository browser.