Commit 13953473c8eb4d206b0ae66e3409515510f9d770

Authored by dumoda01
1 parent 0cd08a07
Exists in master and in 1 other branch snow

Modification du script SCM_analysis.jnl

scripts/ferret/SCM_analysis.jnl 0 → 100644
... ... @@ -0,0 +1,420 @@
  1 + ! NOAA/PMEL TMAP
  2 + ! FERRET v6.62
  3 + ! Linux(gfortran) 2.6.9-89.0.20.ELsmp - 06/11/10
  4 + ! 7-Feb-11 11:11
  5 +
  6 +use amdgulf
  7 +
  8 +
  9 +!Variables definition.
  10 +
  11 + define symbol D=18-jun-2008
  12 + define symbol per_day=(24/3)
  13 +
  14 + define symbol alpha=0.11
  15 + define symbol inib=0.001
  16 + define symbol vp=0.3
  17 +
  18 + define symbol p0=0.0001
  19 + define symbol k1=0.5
  20 + define symbol k2=0.2
  21 +
  22 + define symbol C_mg_mmol=12.001
  23 + define symbol N_mg_mmol=14.007
  24 + define symbol C_N=(8.82/(($C_mg_mmol)/($N_mg_mmol)))
  25 + define symbol N_mmol_Chla=(15.54/($N_mg_mmol))
  26 +
  27 + define symbol area=450000*1000^2
  28 +
  29 + define symbol tera=10^12
  30 +
  31 +
  32 +
  33 +!Find the maximum concentration of phy (if excluding the accumulation in the bottom layer; k=6:80)
  34 +
  35 + let max_phy=phy[z=@max]
  36 +
  37 + list/clobber/file=max_phy max_phy
  38 +
  39 + !plot max_phy
  40 + !frame/file=phy_concentration_SCM.gif
  41 +
  42 +
  43 +
  44 +!Phy concentration normalized (between 0 and 1). To assess the presence of a SCM, it could be usefull to normalized phy in order to remove the effect of changes in the concentration troughout the season.
  45 +
  46 + let norm_phy=phy/max_phy
  47 +
  48 + !fill norm_phy[k=6:80]
  49 + !frame/file=norm_phy.gif
  50 +
  51 +
  52 +
  53 +!Determination of the depth of the SCM.
  54 +
  55 + let depth_SCM=norm_phy[z=@loc:1]
  56 +
  57 + list/clobber/file=scm_depth depth_SCM
  58 +
  59 + plot depth_SCM
  60 + frame/file=depth_SCM.gif
  61 +
  62 +
  63 +
  64 +!Determination of the nitracline.
  65 +
  66 + let d_nit=nit[k=1:80@ddc]
  67 + let nitracline=d_nit[k=40:80@loc:-0.01]
  68 +
  69 + fill/key=continuous/levels=(0,15,0.1) nit
  70 + contour/overplot/level=(-0.04) d_nit[k=50:80]
  71 + contour/overplot/level=(-0.15) d_nit[k=50:80]
  72 + contour/over/color=green/level=(1.51) nit
  73 + frame/file=Nitrate.gif
  74 +
  75 + fill amm[k=10:80]
  76 + frame/file=Ammonium.gif
  77 +
  78 +
  79 +
  80 +!The centered derivative of phy (excluding the accumulation in the bottom layer; k=6:80@ddc).
  81 +
  82 + let d_phy=phy[k=6:80@ddc]
  83 +
  84 +
  85 +
  86 +!The centered derivative of normalized phy (excluding the accumulation in the bottom layer; k=6:80@ddc).
  87 +
  88 + let d_norm_phy=norm_phy[k=6:80@ddc]
  89 +
  90 +
  91 +
  92 +!Absolute values of d_phy and d_norm_phy. To avoid "s" profiles.
  93 +
  94 + let abs_d_phy=abs(d_phy)
  95 +
  96 + let abs_d_norm_phy=abs(d_norm_phy)
  97 +
  98 +
  99 + !plot /T=($D) abs_d_norm_phy
  100 + !frame/file=Derivative_of_normalized_phy_absolute.gif
  101 +
  102 +
  103 +
  104 +!Smooth of of abs_d_phy to include norm_phy EQ 1.
  105 +
  106 + let smooth_abs_d_phy=abs_d_phy[k=6:80@sbx:8]
  107 + let smooth_abs_d_norm_phy=abs_d_norm_phy[k=6:80@sbx:8]
  108 +
  109 +
  110 +
  111 +!Graph of phytoplankton, SCM and nitracline depths and definition of the SCM zone.
  112 +
  113 + let good_locations=phy[k=6:80] GE 0.1 and smooth_abs_d_phy[k=6:80] GE 0.01
  114 + let good_locations2=phy[k=6:80] GE 0.1 and smooth_abs_d_phy[k=6:80] GE 0.005
  115 + let good_locations_norm=phy[k=6:80] GE 0.1 and smooth_abs_d_norm_phy[k=6:80] GE 0.015
  116 +
  117 + !fill /level=(0,1,0.5) /pal=grayscale good_locations[k=40:80]
  118 + !contour/overplot norm_phy EQ 1
  119 + !frame/file=Good_locations.gif
  120 +
  121 +
  122 +
  123 +!Phytoplankton mmol N m-3
  124 +
  125 + fill /key=continuous/pal=no_red/vlimits=-100:-0.1/hlimits=1-jan-2008:31-dec-2008 phy
  126 +
  127 + !plot/vs/over/thick=3/dash(0.1,0.1,0.1,0.1)/color=red depth_SCM
  128 +
  129 + !SCM depth
  130 +
  131 + contour/overplot/levels=(0.995) norm_phy[t=10-jun-2008:20-oct-2008]
  132 +
  133 + !Nitracline depth
  134 +
  135 + contour/overplot/level=(-0.15) d_nit[k=50:80]
  136 + contour/overplot/level=(1.0) nit
  137 +
  138 +
  139 + !Contour SCM.
  140 +
  141 + !contour/overlay/color=red/levels=(0.015) smooth_abs_d_phy
  142 + contour/over/nolabel/color=purple/level=(0.5) good_locations
  143 + contour/over/nolabel/color=white/level=(0.5) good_locations2
  144 +
  145 + frame/file=phytoplankton_mmol_N_m-3.gif
  146 +
  147 +
  148 +!Phytoplankton ug chla l-1.
  149 +
  150 + let Chla_phy=phy/($N_mmol_Chla)
  151 +
  152 + fill /key=continuous/levels=(-3.4,1.0,0.04)/pal=no_red/nolabel/vlimits=-100:-0.1/hlimits=1-jan-2008:31-dec-2008 log(Chla_phy)
  153 +
  154 +
  155 + !SCM depth
  156 +
  157 + !contour/overplot/levels=(0.995) norm_phy[t=10-jun-2008:20-oct-2008]
  158 +
  159 + !Nitracline depth
  160 +
  161 + !contour/overplot/level=(-0.02) d_nit[k=50:80]
  162 + !contour/overplot/level=(1.0) nit
  163 +
  164 +
  165 + !Contour SCM.
  166 +
  167 + !contour/overlay/color=red/levels=(0.015) smooth_abs_d_phy
  168 + !contour/over/nolabel/color=purple/level=(0.5) good_locations
  169 + !contour/over/nolabel/color=white/level=(0.5) good_locations2
  170 +
  171 +
  172 +
  173 + frame/file=phytoplankton_chla_ug_l.gif
  174 +
  175 +
  176 +
  177 +
  178 + plot /t=($D) phy
  179 + plot/overlay /t=($D)/hlimts=-100 phy[k=6:80] GE 0.2 and smooth_abs_d_phy[k=6:80] GE 0.01
  180 + !plot/overlay /t=($D) phy[k=6:80] GE 0.1 and smooth_abs_d_norm_phy[k=6:80] GE 0.015
  181 +
  182 + frame/file=phy_daily.gif
  183 +
  184 +
  185 +
  186 +!Define the primary production.
  187 +
  188 +
  189 +
  190 + !Define Ps.
  191 +
  192 + define symbol ps=($vp)/((($alpha)/(($alpha)+($inib)))*(($inib)/(($alpha)+($inib))))^(($inib)/($alpha))
  193 +
  194 +
  195 +
  196 + !Define the photosynthesis equation.(Platt 1980)
  197 +
  198 + let p=($ps)*(1-exp(-1*($alpha)*par/($ps)))*exp(-1*($inib)*par/($ps))
  199 +
  200 +
  201 +
  202 + !Define the primary production, total, new, regenerated and f-ratio.
  203 +
  204 +
  205 + let new_prod=p*(phy+($p0))*(nit/(($k1)*(1+(nit/($k1))+(amm/($k2)))))
  206 + let reg_prod=p*(phy+($p0))*(amm/(($k2)*(1+(nit/($k1))+(amm/($k2)))))
  207 +
  208 + let tot_prod = new_prod + reg_prod
  209 +
  210 + let f_ratio = new_prod[l=1:2920@sbx:8]/tot_prod[l=1:2920@sbx:8]
  211 +
  212 +
  213 +
  214 +
  215 +!Graphs for the primary production.
  216 +
  217 +
  218 + fill/key=continuous/vlimits=-100:-0.1/hlimits=1-jan-2008:31-dec-2008 new_prod[l=1:2920@sbx:8]
  219 +
  220 + !contour/overplot/levels=(0.995) norm_phy[t=10-jun-2008:20-oct-2008]
  221 + !contour/over/nolabel/color=black/level=(0.5) good_locations
  222 + frame/file=new_prod.gif
  223 +
  224 +
  225 + fill/key=continuous/vlimits=-100:-0.1/hlimits=1-jan-2008:31-dec-2008 reg_prod[l=1:2920@sbx:8]
  226 +
  227 + !contour/overplot/levels=(0.995) norm_phy[t=10-jun-2008:20-oct-2008]
  228 + !contour/over/nolabel/color=black/level=(0.5) good_locations
  229 + frame/file=reg_prod.gif
  230 +
  231 +
  232 + fill/key=continuous/vlimits=-100:-0.1/hlimits=1-jan-2008:31-dec-2008 tot_prod[l=1:2920@sbx:8]
  233 +
  234 + !contour/overplot/levels=(0.995) norm_phy[t=10-jun-2008:20-oct-2008]
  235 + !contour/over/nolabel/color=black/level=(0.5) good_locations
  236 + frame/file=tot_prod.gif
  237 +
  238 +
  239 + fill/key=continuous/vlimits=-100:-0.1/hlimits=1-jan-2008:31-dec-2008 f_ratio
  240 +
  241 +
  242 +
  243 + !contour/overplot/levels=(0.999) norm_phy[t=10-jun-2008:20-oct-2008]
  244 + !contour/over/nolabel/color=black/level=(0.5) good_locations
  245 + frame/file=f_ratio.gif
  246 +
  247 + !fill par
  248 + !frame/file=par.gif
  249 +
  250 +
  251 +
  252 +!Definition of the primary production at the SCM.
  253 +
  254 +
  255 + let SCM_prod=tot_prod*good_locations
  256 + let SCM_new_prod=new_prod*good_locations
  257 + let SCM_reg_prod=reg_prod*good_locations
  258 +
  259 +
  260 + !fill SCM_prod
  261 + !frame/file=PP_at_the_SCM.gif
  262 +
  263 + let i_prod=tot_prod[k=6:80@sum]
  264 + let i_new_prod=new_prod[k=6:80@sum]
  265 + let i_reg_prod=reg_prod[k=6:80@sum]
  266 +
  267 + let i_SCM_prod=SCM_prod[k=6:80@sum]
  268 + let i_SCM_new_prod=SCM_new_prod[k=6:80@sum]
  269 + let i_SCM_reg_prod=SCM_reg_prod[k=6:80@sum]
  270 +
  271 +
  272 +!f-ratio au SCM.
  273 +
  274 + let SCM_fratio=SCM_new_prod[k=6:80]/SCM_prod[k=6:80]
  275 + let mean_SCM_fratio=SCM_fratio[k=6:80@ave]
  276 +
  277 + plot/thick=2/nolabel f_ratio[k=40:80@ave]
  278 + plot/overlay/thick=2/nolabel mean_SCM_fratio
  279 + frame/file=f-ratio_at_SCM.gif
  280 +
  281 + !list mean_SCM_fratio[l=1:2920@max]
  282 + !list mean_SCM_fratio[l=1:2920@min]
  283 + !list mean_SCM_fratio[l=1:2920@ave]
  284 +
  285 +
  286 +
  287 +!Ratio PP at the SCM over total PP in the water column.
  288 +
  289 + let PP_ratio=i_SCM_prod[l=1:2920@sbx:8]/i_prod[l=1:2920@sbx:8]
  290 + let PP_new_ratio=i_SCM_new_prod[l=1:2920@sbx:8]/i_new_prod[l=1:2920@sbx:8]
  291 + let PP_reg_ratio=i_SCM_reg_prod[l=1:2920@sbx:8]/i_reg_prod[l=1:2920@sbx:8]
  292 +
  293 +
  294 +!Integrated primary production and contribution of the SCM with hourly mean radiative fluxes.
  295 +
  296 +
  297 + plot/thick=2/vlimits=0:6.0/hlimit=1-jan-2008:31-dec-2008/nolabel i_prod[l=1:2920@sbx:8]
  298 + plot/overlay/thick=2/nolabel i_SCM_prod[l=1:2920@sbx:8]
  299 + plot/over/thick=2/dash(0.1,0.1,0.1,0.1)/nolabel 6.0*PP_ratio
  300 +
  301 + frame/file=Integrated_PP.gif
  302 +
  303 +
  304 + plot/thick=2/vlimits=0:6.0/nolabel i_new_prod[l=1:2920@sbx:8]
  305 + plot/overlay/thick=2/nolabel i_SCM_new_prod[l=1:2920@sbx:8]
  306 + plot/overlay/thick=2/dash=(0.1,0.1,0.1,0.1)/nolabel 6.0*PP_new_ratio
  307 +
  308 + frame/file=Integrated_PP_new.gif
  309 +
  310 + plot/thick=2/vlimit=0:2.0/nolabel i_reg_prod[l=1:2920@sbx:8]
  311 + plot/overlay/thick=2/nolabel i_SCM_reg_prod[l=1:2920@sbx:8]
  312 + plot/overlay/thick=2/dash=(0.1,0.1,0.1,0.1)/nolabel 2.0*PP_reg_ratio
  313 +
  314 + frame/file=Integrated_PP_reg.gif
  315 +
  316 +
  317 +
  318 +
  319 +!Integrated primary production and contribution of the SCM with daily mean radiative fluxes.
  320 +
  321 + !plot i_prod
  322 + !plot/overlay i_SCM_prod
  323 + !plot/overlay PP_ratio
  324 +
  325 + !frame/file=Integrated_PP.gif
  326 +
  327 + !plot i_new_prod
  328 + !plot/overlay i_SCM_new_prod
  329 + !plot/overlay PP_new_ratio
  330 +
  331 + !frame/file=Integrated_PP_new.gif
  332 +
  333 + !plot i_reg_prod
  334 + !plot/overlay i_SCM_reg_prod
  335 + !plot/overlay PP_reg_ratio
  336 +
  337 + !frame/file=Integrated_PP_reg.gif
  338 +
  339 +
  340 +
  341 +!Annual primary production.
  342 +
  343 + let annual_PP=i_prod[l=1:2920@sum]/($per_day)
  344 + let SCM_annual_PP=i_SCM_prod[l=1:2920@sum]/($per_day)
  345 +
  346 + let contribution_of_SCM_at_annual_PP=SCM_annual_PP/annual_PP*100
  347 +
  348 + !list annual_PP
  349 + !list SCM_annual_PP
  350 +
  351 + !list contribution_of_SCM_at_annual_PP
  352 +
  353 +
  354 +
  355 +!Annual new primary production.
  356 +
  357 + let annual_PP_new=i_new_prod[l=1:2920@sum]/($per_day)
  358 + let SCM_annual_PP_new=i_SCM_new_prod[l=1:2920@sum]/($per_day)
  359 +
  360 + let contribution_of_SCM_at_annual_PP_new=SCM_annual_PP_new/annual_PP_new*100
  361 +
  362 + !list annual_PP_new
  363 + !list SCM_annual_PP_new
  364 +
  365 + !list contribution_of_SCM_at_annual_PP_new
  366 +
  367 +
  368 +
  369 +!Annual regenerated primary production.
  370 +
  371 + let annual_PP_reg=i_reg_prod[l=1:2920@sum]/($per_day)
  372 + let SCM_annual_PP_reg=i_SCM_reg_prod[l=1:2920@sum]/($per_day)
  373 +
  374 + let contribution_of_SCM_at_annual_PP_reg=SCM_annual_PP_reg/annual_PP_reg*100
  375 +
  376 + !list annual_PP_reg
  377 + !list SCM_annual_PP_reg
  378 +
  379 + !list contribution_of_SCM_at_annual_PP_reg
  380 +
  381 +
  382 +
  383 +!Convert the N annual primary production to C annual primary production.
  384 +
  385 +
  386 + !To mmol N m-2 y-1 to mmol C m-2 y-1.
  387 +
  388 + let C_annual_PP=annual_PP*($C_N)
  389 + let C_annual_PP_new=annual_PP_new*($C_N)
  390 + let C_annual_PP_reg=annual_PP_reg*($C_N)
  391 +
  392 + let C_SCM_annual_PP=SCM_annual_PP*($C_N)
  393 + let C_SCM_annual_PP_new=SCM_annual_PP_new*($C_N)
  394 + let C_SCM_annual_PP_reg=SCM_annual_PP_reg*($C_N)
  395 +
  396 +
  397 + !To mmol C m-2 y-1 to g C m-2 y-1
  398 +
  399 + let C_annual_PP_g=C_annual_PP*($C_mg_mmol)/1000
  400 + let C_annual_PP_new_g=C_annual_PP_new*($C_mg_mmol)/1000
  401 + let C_annual_PP_reg_g=C_annual_PP_reg*($C_mg_mmol)/1000
  402 +
  403 + let C_SCM_annual_PP_g=C_SCM_annual_PP*($C_mg_mmol)/1000
  404 + let C_SCM_annual_PP_new_g=C_SCM_annual_PP_new*($C_mg_mmol)/1000
  405 + let C_SCM_annual_PP_reg_g=C_SCM_annual_PP_reg*($C_mg_mmol)/1000
  406 +
  407 +
  408 + !To g C m-2 y-1 to Tg C y-1
  409 +
  410 + let area_C_PP=C_annual_PP_g*($area)/($tera)
  411 + let area_C_SCM_PP=C_SCM_annual_PP_g*($area)/($tera)
  412 +
  413 + !list area_C_PP
  414 + !list area_C_SCM_PP
  415 +
  416 +
  417 + list/clobber/file=Annual_primary_production.dat annual_PP, SCM_annual_PP, contribution_of_SCM_at_annual_PP, annual_PP_new, SCM_annual_PP_new, contribution_of_SCM_at_annual_PP_new, annual_PP_reg, SCM_annual_PP_reg, contribution_of_SCM_at_annual_PP_reg, C_annual_PP_g, C_SCM_annual_PP_g, C_annual_PP_new_g, C_SCM_annual_PP_new_g, C_annual_PP_reg_g, C_SCM_annual_PP_reg_g,area_C_PP, area_C_SCM_PP
  418 +
  419 +exit
  420 +
... ...
scripts/ferret/SCM_contribution_to_total_PP.jnl deleted
... ... @@ -1,343 +0,0 @@
1   - ! NOAA/PMEL TMAP
2   - ! FERRET v6.62
3   - ! Linux(gfortran) 2.6.9-89.0.20.ELsmp - 06/11/10
4   - ! 7-Feb-11 11:11
5   -
6   -use amdgulf
7   -
8   -
9   -!Variables definition.
10   -
11   -define symbol D=15-may-2008
12   -
13   -define symbol alpha=0.11
14   -define symbol inib=0.001
15   -define symbol vp=0.3
16   -
17   -define symbol p0=0.0001
18   -define symbol k1=0.2
19   -define symbol k2=0.8
20   -
21   -define symbol C_mg_mmol=12.001
22   -define symbol N_mg_mmol=14.007
23   -define symbol C_N=(8.82/(($C_mg_mmol)/($N_mg_mmol)))
24   -define symbol N_mmol_Chla=(15.54/($N_mg_mmol))
25   -
26   -define symbol area=450000*1000^2
27   -
28   -define symbol tera=10^12
29   -
30   -
31   -
32   -!Find the maximum concentration of phy (if excluding the accumulation in the bottom layer; k=6:80)
33   -
34   -let max_phy=phy[k=1:80@max]
35   -
36   -!plot max_phy
37   -!frame/file=phy_concentration_SCM.gif
38   -
39   -
40   -
41   -!Phy concentration normalized (between 0 and 1). To assess the presence of a SCM, it could be usefull to normalized phy in order to remove the effect of changes in the concentration troughout the season.
42   -
43   -let norm_phy=phy/max_phy
44   -
45   -!fill norm_phy[k=6:80]
46   -!frame/file=norm_phy.gif
47   -
48   -
49   -
50   -!Determination of the depth of the SCM.
51   -
52   -let depth_SCM=norm_phy[k=1:80@loc:1]
53   -
54   -!plot depth_SCM
55   -!frame/file=depth_SCM.gif
56   -
57   -
58   -
59   -!Determination of the nitracline.
60   -
61   -let d_nit=nit[k=1:80@ddc]
62   -let nitracline=d_nit[k=40:80@loc:-0.02]
63   -
64   -fill nit
65   -frame/file=Nitrate.gif
66   -
67   -
68   -
69   -!The centered derivative of phy (excluding the accumulation in the bottom layer; k=6:80@ddc).
70   -
71   -let d_phy=phy[k=6:80@ddc]
72   -
73   -
74   -
75   -!The centered derivative of normalized phy (excluding the accumulation in the bottom layer; k=6:80@ddc).
76   -
77   -let d_norm_phy=norm_phy[k=6:80@ddc]
78   -
79   -
80   -
81   -!Absolute values of d_phy and d_norm_phy. To avoid "s" profiles.
82   -
83   -let abs_d_phy=abs(d_phy)
84   -
85   -let abs_d_norm_phy=abs(d_norm_phy)
86   -
87   -
88   -!plot /T=($D) abs_d_norm_phy
89   -!frame/file=Derivative_of_normalized_phy_absolute.gif
90   -
91   -
92   -
93   -!Smooth of of abs_d_phy to include norm_phy EQ 1.
94   -
95   -let smooth_abs_d_phy=abs_d_phy[k=6:80@sbx:8]
96   -
97   -
98   -
99   -!Graph of phytoplankton, SCM and nitracline depths and definition of the SCM zone.
100   -
101   -!Phytoplankton mmol N m-3
102   -
103   -fill /key=continous /pal=no_red phy[k=40:80]
104   -
105   -contour/overplot norm_phy EQ 1
106   -!contour/overplot d_nit[k=40:80] EQ -0.02
107   -contour/overplot phy[k=6:80] GE 0.1 and smooth_abs_d_phy[k=6:80] GE 0.002
108   -
109   -frame/file=phytoplankton_mmol_N_m-3.gif
110   -
111   -
112   -!Phytoplankton ug chla l-1.
113   -
114   -let Chla_phy=phy/($N_mmol_Chla)
115   -
116   -fill /key=continous /pal=no_red Chla_phy[k=40:80]
117   -
118   -contour/overplot norm_phy EQ 1
119   -contour/overplot phy[k=6:80] GE 0.1 and smooth_abs_d_phy[k=6:80] GE 0.002
120   -
121   -frame/file=phytoplankton_chla_ug_l.gif
122   -
123   -
124   -
125   -plot /t=($D) phy
126   -plot/overlay /t=($D) phy[k=6:80] GE 0.1 and smooth_abs_d_phy[k=6:80] GE 0.01
127   -
128   -frame/file=phy_daily.gif
129   -
130   -
131   -
132   -!Define the primary production.
133   -
134   -
135   -
136   -!Define Ps.
137   -
138   -define symbol ps=($vp)/((($alpha)/(($alpha)+($inib)))*(($inib)/(($alpha)+($inib))))^(($inib)/($alpha))
139   -
140   -
141   -
142   -!Define the photosynthesis equation.(Platt 1980)
143   -
144   -let p=($ps)*(1-exp(-1*($alpha)*par/($ps)))*exp(-1*($inib)*par/($ps))
145   -
146   -
147   -
148   -!Define the primary production, total, new, regenerated and f-ratio.
149   -
150   -
151   -
152   -let new_prod=p*(phy+($p0))*(nit/(($k1)*(1+(nit/($k1))+(amm/($k2)))))
153   -let reg_prod=p*(phy+($p0))*(amm/(($k2)*(1+(nit/($k1))+(amm/($k2)))))
154   -
155   -let tot_prod = new_prod + reg_prod
156   -let f_ratio = new_prod/tot_prod
157   -
158   -
159   -
160   -!Graphs for the primary production.
161   -
162   -!fill new_prod
163   -!frame/file=new_prod.gif
164   -
165   -!fill reg_prod
166   -!frame/file=reg_prod.gif
167   -
168   -!fill tot_prod
169   -!frame/file=tot_prod.gif
170   -
171   -!fill f_ratio
172   -!frame/file=f_ratio.gif
173   -
174   -!fill par
175   -!frame/file=par.gif
176   -
177   -
178   -
179   -!Definition of the primary production at the SCM.
180   -
181   -let good_locations=phy[k=6:80] GE 0.1 and smooth_abs_d_phy[k=6:80] GE 0.002
182   -
183   -fill /level=(0,1,0.5) /pal=grayscale good_locations[k=40:80]
184   -!contour/overplot norm_phy EQ 1
185   -frame/file=Good_locations.gif
186   -
187   -let SCM_prod=tot_prod*good_locations
188   -let SCM_new_prod=new_prod*good_locations
189   -let SCM_reg_prod=reg_prod*good_locations
190   -
191   -
192   -!fill SCM_prod
193   -!frame/file=PP_at_the_SCM.gif
194   -
195   -let i_prod=tot_prod[k=6:80@sum]
196   -let i_new_prod=new_prod[k=6:80@sum]
197   -let i_reg_prod=reg_prod[k=6:80@sum]
198   -
199   -let i_SCM_prod=SCM_prod[k=6:80@sum]
200   -let i_SCM_new_prod=SCM_new_prod[k=6:80@sum]
201   -let i_SCM_reg_prod=SCM_reg_prod[k=6:80@sum]
202   -
203   -
204   -
205   -!Ratio PP at the SCM over total PP in the water column.
206   -
207   -let PP_ratio=i_SCM_prod/i_prod
208   -let PP_new_ratio=i_SCM_new_prod/i_new_prod
209   -let PP_reg_ratio=i_SCM_reg_prod/i_reg_prod
210   -
211   -
212   -!Integrated primary production and contribution of the SCM with hourly mean radiative fluxes.
213   -
214   -plot i_prod[l=1:2920@sbx:8]
215   -plot/overlay i_SCM_prod[l=1:2920@sbx:8]
216   -plot/overlay PP_ratio[l=1:2920@sbx:8]
217   -
218   -frame/file=Integrated_PP.gif
219   -
220   -plot i_new_prod[l=1:2920@sbx:8]
221   -plot/overlay i_SCM_new_prod[l=1:2920@sbx:8]
222   -plot/overlay PP_new_ratio[l=1:2920@sbx:8]
223   -
224   -frame/file=Integrated_PP_new.gif
225   -
226   -plot i_reg_prod[l=1:2920@sbx:8]
227   -plot/overlay i_SCM_reg_prod[l=1:2920@sbx:8]
228   -plot/overlay PP_reg_ratio[l=1:2920@sbx:8]
229   -
230   -frame/file=Integrated_PP_reg.gif
231   -
232   -
233   -
234   -!Integrated primary production and contribution of the SCM with daily mean radiative fluxes.
235   -
236   -!plot i_prod
237   -!plot/overlay i_SCM_prod
238   -!plot/overlay PP_ratio
239   -
240   -!frame/file=Integrated_PP.gif
241   -
242   -!plot i_new_prod
243   -!plot/overlay i_SCM_new_prod
244   -!plot/overlay PP_new_ratio
245   -
246   -!frame/file=Integrated_PP_new.gif
247   -
248   -!plot i_reg_prod
249   -!plot/overlay i_SCM_reg_prod
250   -!plot/overlay PP_reg_ratio
251   -
252   -!frame/file=Integrated_PP_reg.gif
253   -
254   -
255   -
256   -
257   -!Annual primary production.
258   -
259   -let annual_PP=i_prod[l=1:2920@sum]
260   -let SCM_annual_PP=i_SCM_prod[l=1:2920@sum]
261   -
262   -let contribution_of_SCM_at_annual_PP=SCM_annual_PP/annual_PP*100
263   -
264   -!list annual_PP
265   -!list SCM_annual_PP
266   -
267   -!list contribution_of_SCM_at_annual_PP
268   -
269   -
270   -
271   -!Annual new primary production.
272   -
273   -let annual_PP_new=i_new_prod[l=1:2920@sum]
274   -let SCM_annual_PP_new=i_SCM_new_prod[l=1:2920@sum]
275   -
276   -let contribution_of_SCM_at_annual_PP_new=SCM_annual_PP_new/annual_PP_new*100
277   -
278   -!list annual_PP_new
279   -!list SCM_annual_PP_new
280   -
281   -!list contribution_of_SCM_at_annual_PP_new
282   -
283   -
284   -
285   -!Annual regenerated primary production.
286   -
287   -let annual_PP_reg=i_reg_prod[l=1:2920@sum]
288   -let SCM_annual_PP_reg=i_SCM_reg_prod[l=1:2920@sum]
289   -
290   -let contribution_of_SCM_at_annual_PP_reg=SCM_annual_PP_reg/annual_PP_reg*100
291   -
292   -!list annual_PP_reg
293   -!list SCM_annual_PP_reg
294   -
295   -!list contribution_of_SCM_at_annual_PP_reg
296   -
297   -
298   -
299   -!Convert the N annual primary production to C annual primary production.
300   -
301   -
302   -!To mmol N m-2 y-1 to mmol C m-2 y-1.
303   -
304   -let C_annual_PP=annual_PP*($C_N)
305   -let C_annual_PP_new=annual_PP_new*($C_N)
306   -let C_annual_PP_reg=annual_PP_reg*($C_N)
307   -
308   -let C_SCM_annual_PP=SCM_annual_PP*($C_N)
309   -let C_SCM_annual_PP_new=SCM_annual_PP_new*($C_N)
310   -let C_SCM_annual_PP_reg=SCM_annual_PP_reg*($C_N)
311   -
312   -
313   -!To mmol C m-2 y-1 to g C m-2 y-1
314   -
315   -let C_annual_PP_g=C_annual_PP*($C_mg_mmol)/1000
316   -let C_annual_PP_new_g=C_annual_PP_new*($C_mg_mmol)/1000
317   -let C_annual_PP_reg_g=C_annual_PP_reg*($C_mg_mmol)/1000
318   -
319   -let C_SCM_annual_PP_g=C_SCM_annual_PP*($C_mg_mmol)/1000
320   -let C_SCM_annual_PP_new_g=C_SCM_annual_PP_new*($C_mg_mmol)/1000
321   -let C_SCM_annual_PP_reg_g=C_SCM_annual_PP_reg*($C_mg_mmol)/1000
322   -
323   -
324   -!To g C m-2 y-1 to Tg C y-1
325   -
326   -let area_C_PP=C_annual_PP_g*($area)/($tera)
327   -let area_C_SCM_PP=C_SCM_annual_PP_g*($area)/($tera)
328   -
329   -!list area_C_PP
330   -!list area_C_SCM_PP
331   -
332   -
333   -list/clobber/file=Annual_primary_production.dat annual_PP, SCM_annual_PP, contribution_of_SCM_at_annual_PP, annual_PP_new, SCM_annual_PP_new, contribution_of_SCM_at_annual_PP_new, annual_PP_reg, SCM_annual_PP_reg, contribution_of_SCM_at_annual_PP_reg, C_annual_PP_g, C_SCM_annual_PP_g, C_annual_PP_new_g, C_SCM_annual_PP_new_g, C_annual_PP_reg_g, C_SCM_annual_PP_reg_g,area_C_PP, area_C_SCM_PP
334   -
335   -
336   -
337   -exit
338   -
339   -
340   -
341   -
342   -
343   -