Commit 601759006fc22d6202bacc298f288b86f14a1903

Authored by dumoda01
1 parent 33b83817
Exists in master and in 1 other branch snow

Ajout du repertoire scripts

scripts/ferret/SCM_contribution_to_total_PP.jnl 0 → 100644
... ... @@ -0,0 +1,272 @@
  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 alpha=0.04
  12 +define symbol inib=0.001
  13 +define symbol vp=0.3
  14 +
  15 +define symbol p0=0.0001
  16 +define symbol k1=0.2
  17 +define symbol k2=0.8
  18 +
  19 +define symbol C_N=8.82
  20 +define symbol C_g_mol=12
  21 +
  22 +define symbol area=200000*1000^2
  23 +
  24 +define symbol tera=10^12
  25 +
  26 +
  27 +
  28 +!Find the maximum concentration of phy (excluding the accumulation in the bottom layer; k=6:80)
  29 +
  30 +let max_phy=phy[k=6:80@max]
  31 +
  32 +!plot max_phy
  33 +!frame/file=phy_concentration_SCM.gif
  34 +
  35 +
  36 +
  37 +!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.
  38 +
  39 +let norm_phy=phy/max_phy
  40 +
  41 +
  42 +
  43 +!Determination of the depth of the SCM.
  44 +
  45 +let depth_SCM=norm_phy[k=1:80@loc:1]
  46 +!plot depth_SCM
  47 +!frame/file=depth_SCM.gif
  48 +
  49 +
  50 +
  51 +!Determination of the nitracline.
  52 +
  53 +let d_nit=nit[k=1:80@ddc]
  54 +let nitracline=d_nit[k=40:80@loc:-0.02]
  55 +
  56 +
  57 +
  58 +!The centered derivative of normalized phy (excluding the accumulation in the bottom layer; k=6:80@ddc).
  59 +
  60 +let d_norm_phy=norm_phy[k=6:80@ddc]
  61 +
  62 +
  63 +
  64 +!Absolute values of d_norm_phy. To avoid "s" profiles.
  65 +
  66 +let abs_d_norm_phy=abs(d_norm_phy)
  67 +
  68 +!plot /T=($D) abs_d_norm_phy
  69 +!frame/file=Derivative_of_normalized_phy_absolute.gif
  70 +
  71 +
  72 +
  73 +!Graph of phytoplankton, SCM and nitracline depths and definition of the SCM zone.
  74 +
  75 +fill phy
  76 +
  77 +contour/overplot norm_phy EQ 1
  78 +contour/overplot d_nit[k=40:80] EQ -0.02
  79 +contour/overplot phy[k=6:80] GE 0.003 and abs_d_norm_phy[k=6:80] GE 0.005 or norm_phy[k=6:80] EQ 1
  80 +
  81 +frame/file=phytoplankton.gif
  82 +
  83 +
  84 +
  85 +!Define the primary production.
  86 +
  87 +
  88 +
  89 +!Define Ps.
  90 +
  91 +define symbol ps=($vp)/((($alpha)/(($alpha)+($inib)))*(($inib)/(($alpha)+($inib))))^(($inib)/($alpha))
  92 +
  93 +
  94 +
  95 +!Define the photosynthesis equation.(Platt 1980)
  96 +
  97 +let p=($ps)*(1-exp(-1*($alpha)*par/($ps)))*exp(-1*($inib)*par/($ps))
  98 +
  99 +
  100 +
  101 +!Define the primary production, total, new, regenerated and f-ratio.
  102 +
  103 +
  104 +
  105 +let new_prod=p*(phy+($p0))*(nit/(($k1)*(1+(nit/($k1))+(amm/($k2)))))
  106 +let reg_prod=p*(phy+($p0))*(amm/(($k2)*(1+(nit/($k1))+(amm/($k2)))))
  107 +
  108 +let tot_prod = new_prod + reg_prod
  109 +let f_ratio = new_prod/tot_prod
  110 +
  111 +
  112 +
  113 +!Graphs for the primary production.
  114 +
  115 +!fill new_prod
  116 +!frame/file=new_prod.gif
  117 +
  118 +!fill reg_prod
  119 +!frame/file=reg_prod.gif
  120 +
  121 +!fill tot_prod
  122 +!frame/file=tot_prod.gif
  123 +
  124 +!fill f_ratio
  125 +!frame/file=f_ratio.gif
  126 +
  127 +!fill par
  128 +!frame/file=par.gif
  129 +
  130 +
  131 +
  132 +!Definition of the primary production at the SCM.
  133 +
  134 +let good_locations=phy[k=6:80] GE 0.003 and abs_d_norm_phy[k=6:80] GE 0.005 or norm_phy[k=6:80] EQ 1
  135 +
  136 +fill /level=(0,1,0.5) /pal=grayscale good_locations
  137 +frame/file=Good_locations.gif
  138 +
  139 +let SCM_prod=tot_prod*good_locations
  140 +let SCM_new_prod=new_prod*good_locations
  141 +let SCM_reg_prod=reg_prod*good_locations
  142 +
  143 +
  144 +!fill SCM_prod
  145 +!frame/file=PP_at_the_SCM.gif
  146 +
  147 +let i_prod=tot_prod[k=6:80@sum]
  148 +let i_new_prod=new_prod[k=6:80@sum]
  149 +let i_reg_prod=reg_prod[k=6:80@sum]
  150 +
  151 +let i_SCM_prod=SCM_prod[k=6:80@sum]
  152 +let i_SCM_new_prod=SCM_new_prod[k=6:80@sum]
  153 +let i_SCM_reg_prod=SCM_reg_prod[k=6:80@sum]
  154 +
  155 +
  156 +
  157 +!Ratio PP at the SCM over total PP in the water column.
  158 +
  159 +let PP_ratio=i_SCM_prod/i_prod
  160 +let PP_new_ratio=i_SCM_new_prod/i_new_prod
  161 +let PP_reg_ratio=i_SCM_reg_prod/i_reg_prod
  162 +
  163 +
  164 +!Integrated primary production and contribution of the SCM.
  165 +
  166 +plot i_prod
  167 +plot/overlay i_SCM_prod
  168 +plot/overlay PP_ratio
  169 +
  170 +frame/file=Integrated_PP.gif
  171 +
  172 +plot i_new_prod
  173 +plot/overlay i_SCM_new_prod
  174 +plot/overlay PP_new_ratio
  175 +
  176 +frame/file=Integrated_PP_new.gif
  177 +
  178 +plot i_reg_prod
  179 +plot/overlay i_SCM_reg_prod
  180 +plot/overlay PP_reg_ratio
  181 +
  182 +frame/file=Integrated_PP_reg.gif
  183 +
  184 +
  185 +
  186 +!Annual primary production.
  187 +
  188 +let annual_PP=i_prod[l=1:2920@sum]
  189 +let SCM_annual_PP=i_SCM_prod[l=1:2920@sum]
  190 +
  191 +let contribution_of_SCM_at_annual_PP=SCM_annual_PP/annual_PP*100
  192 +
  193 +!list annual_PP
  194 +!list SCM_annual_PP
  195 +
  196 +!list contribution_of_SCM_at_annual_PP
  197 +
  198 +
  199 +
  200 +!Annual new primary production.
  201 +
  202 +let annual_PP_new=i_new_prod[l=1:2920@sum]
  203 +let SCM_annual_PP_new=i_SCM_new_prod[l=1:2920@sum]
  204 +
  205 +let contribution_of_SCM_at_annual_PP_new=SCM_annual_PP_new/annual_PP_new*100
  206 +
  207 +!list annual_PP_new
  208 +!list SCM_annual_PP_new
  209 +
  210 +!list contribution_of_SCM_at_annual_PP_new
  211 +
  212 +
  213 +
  214 +!Annual regenerated primary production.
  215 +
  216 +let annual_PP_reg=i_reg_prod[l=1:2920@sum]
  217 +let SCM_annual_PP_reg=i_SCM_reg_prod[l=1:2920@sum]
  218 +
  219 +let contribution_of_SCM_at_annual_PP_reg=SCM_annual_PP_reg/annual_PP_reg*100
  220 +
  221 +!list annual_PP_reg
  222 +!list SCM_annual_PP_reg
  223 +
  224 +!list contribution_of_SCM_at_annual_PP_reg
  225 +
  226 +
  227 +
  228 +!Convert the N annual primary production to C annual primary production.
  229 +
  230 +
  231 +!To mmol N m-2 y-1 to mmol C m-2 y-1.
  232 +
  233 +let C_annual_PP=annual_PP*($C_N)
  234 +let C_annual_PP_new=annual_PP_new*($C_N)
  235 +let C_annual_PP_reg=annual_PP_reg*($C_N)
  236 +
  237 +let C_SCM_annual_PP=SCM_annual_PP*($C_N)
  238 +let C_SCM_annual_PP_new=SCM_annual_PP_new*($C_N)
  239 +let C_SCM_annual_PP_reg=SCM_annual_PP_reg*($C_N)
  240 +
  241 +
  242 +!To mmol C m-2 y-1 to g C m-2 y-1
  243 +
  244 +let C_annual_PP_g=C_annual_PP*($C_g_mol)/1000
  245 +let C_annual_PP_new_g=C_annual_PP_new*($C_g_mol)/1000
  246 +let C_annual_PP_reg_g=C_annual_PP_reg*($C_g_mol)/1000
  247 +
  248 +let C_SCM_annual_PP_g=C_SCM_annual_PP*($C_g_mol)/1000
  249 +let C_SCM_annual_PP_new_g=C_SCM_annual_PP_new*($C_g_mol)/1000
  250 +let C_SCM_annual_PP_reg_g=C_SCM_annual_PP_reg*($C_g_mol)/1000
  251 +
  252 +
  253 +!To g C m-2 y-1 to Tg C y-1
  254 +
  255 +let area_C_PP=C_annual_PP_g*($area)/($tera)
  256 +let area_C_SCM_PP=C_SCM_annual_PP_g*($area)/($tera)
  257 +
  258 +!list area_C_PP
  259 +!list area_C_SCM_PP
  260 +
  261 +
  262 +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
  263 +
  264 +
  265 +
  266 +exit
  267 +
  268 +
  269 +
  270 +
  271 +
  272 +
... ...
scripts/ferret/figures.jnl 0 → 100644
... ... @@ -0,0 +1,207 @@
  1 + ! NOAA/PMEL TMAP
  2 + ! FERRET v6
  3 + ! Linux(g77) 2.6.9-22. - 08/25/06
  4 + ! 5-Mar-08 11:10
  5 +
  6 +use amdgulf.nc
  7 +!set region/z=-120:0/l=969:2432
  8 +set region/z=-120:0
  9 +set memory/size=200
  10 +set window/aspect=0.7/size=200
  11 +ppl dfltfnt cr
  12 +ppl axlsze 0.18 0.18
  13 +
  14 +define symbol alpha = 0.06
  15 +define symbol beta = 0.0
  16 +define symbol pm = 0.3
  17 +define symbol k1 = 1.5
  18 +define symbol k2 = 0.8
  19 +define symbol phy0 = 0.0001
  20 +
  21 +! ======================================================================
  22 +! Zone photique
  23 +ppl axlint 1 2
  24 +let light_fraction = par/par[k=80]
  25 +let photic = light_fraction[z=@loc:0.01]
  26 +!let parsbx = par[l=@sbx:8]
  27 +!let par10 = parsbx[z=@loc:10]
  28 +let par10 = par[z=@loc:10]
  29 +fill/nolabel/key=continuous/palette=rnb3/level=(10,100,5)(inf)/vlimits=-120:0 par
  30 +frame/file=par.gif
  31 +
  32 +! Efficacité photosynthétique
  33 +let ps = ($pm)/((($alpha)/(($alpha)+($beta)))*(($beta)/(($alpha)+($beta)))^(($beta)/($alpha)))
  34 +let ff = ps*(1 - exp(-1*($alpha)*par/ps))*exp(-1*($beta)*par/ps)
  35 +
  36 +! f-ratio
  37 +let dnp = ff*(nit/($k1))/(1+(nit/($k1))+(amm/($k2)))*(phy+($phy0))
  38 +let dap = ff*(amm/($k2))/(1+(nit/($k1))+(amm/($k2)))*(phy+($phy0))
  39 +let f_ratio = dnp[k=1:80@sum]/(dnp[k=1:80@sum]+dap[k=1:80@sum])
  40 +fill/nolabel/key=continuous/palette=rnb3 dnp
  41 +frame/file=dnp.gif
  42 +fill/nolabel/key=continuous/palette=rnb3 dap
  43 +frame/file=dap.gif
  44 +plot/nolabel/thick=2/vlimits=0:1 f_ratio
  45 +frame/file=f-ratio.gif
  46 +
  47 +! Maximum de chlorophylle
  48 +let phymax = phy[k=@max]
  49 +let zero_at_phymax = phy - phymax
  50 +let depth_of_phymax = zero_at_phymax[z=@loc:0]
  51 +let depth_of_phymax = if (phymax gt 0.5) then zero_at_phymax[z=@loc:0] else 999
  52 +set variable/bad=999 depth_of_phymax
  53 +
  54 +! Phytoplancton
  55 +set viewport upper
  56 +go margins 0.6 0.15 1.5 1.5
  57 +ppl axlint 1 4
  58 +fill/nolabel/key=continuous/palette=no_red/axes=0,0,1,1/level=(0.2,2,0.1)(inf)/vlimits=-120:0 phy
  59 +contour/over/nolabel/title=""/level=(6.0) nit
  60 +
  61 +set viewport lower
  62 +go margins 0.30 0.6 1.5 1.5
  63 +ppl axlint 1 4
  64 +ppl color 2 70 70 70
  65 +plot/nolabel/line=2/thick=3/nolabel/vlimits=-120:-0.1 par10
  66 +plot/over/color=black/thick=3/title="" depth_of_phymax
  67 +frame/file=phy_layer.gif
  68 +cancel viewport
  69 +
  70 +! Vitesse de chute du phytoplancton
  71 +fill/nolabel/key=continuous/palette=no_green/vlimits=-120:0/level=(-0.7,0,0.1) wp; frame/file=wp.gif
  72 +
  73 +! PON cycle
  74 +ppl axlint 1 5
  75 +plot/thick=2/vlimits=0:30/nolabel phy[k=1:80@sum]
  76 +plot/over/nolabel/title=""/thick=3/dash=(0.1,0.1,0.1,0.1)/color=black bac[k=1:80@sum]
  77 +plot/over/nolabel/title=""/thick=3/dash=(0.3,0.1,0.1,0.1)/color=black zoo[k=1:80@sum]
  78 +!plot/over/nolabel/title=""/thick=3 det[k=1:80@sum]
  79 +frame/file=pon_cycle.gif
  80 +
  81 +! DN cycle
  82 +let totaln = phy + bac + det + zoo + nit + amm + ldn
  83 +plot/thick=2/vlimits=0:1050/nolabel totaln[k=1:80@sum]
  84 +plot/over/nolabel/title=""/thick=3/dash=(0.1,0.1,0.1,0.1)/color=black nit[k=1:80@sum]
  85 +plot/over/nolabel/title=""/thick=3/dash=(0.3,0.1,0.1,0.1)/color=black amm[k=1:80@sum]
  86 +plot/over/nolabel/title=""/thick=3/dash=(0.3,0.1,0.3,0.1)/color=black ldn[k=1:80@sum]
  87 +frame/file=dn_cycle.gif
  88 +plot/nolabel totaln[k=1:80@sum]
  89 +frame/file=totaln.gif
  90 +
  91 +! Nutriments
  92 +set viewport upper
  93 +go margins 0.6 0.18 1.5 1.5
  94 +ppl axlint 1 4
  95 +fill/nolabel/key=continuous/palette=no_green_centered/vlimits=-120:0/axes=0,0,1,1/level=(0,12,1)(inf) nit
  96 +
  97 +set viewport lower
  98 +go margins 0.18 0.6 1.5 1.5
  99 +ppl axlint 1 4
  100 +fill/nolabel/key=continuous/palette=blue_green_yellow/vlimits=-120:-0.1/axes=0,1,1,1/level=(0,2,0.2)(inf) amm
  101 +frame/file=nut.gif
  102 +cancel viewport
  103 +
  104 +! Autres compartiments
  105 +fill/nolabel/key=continuous/pal=rnb3 zoo; frame/file=zoo.gif
  106 +fill/nolabel/key=continuous/pal=rnb3 bac; frame/file=bac.gif
  107 +!fill/nolabel/key=continuous ldn; frame/file=ldn.gif
  108 +!fill/nolabel/key=continuous det; frame/file=det.gif
  109 +
  110 +! ======================================================================
  111 +! Physique
  112 +!set region/t=1-jan-2004:31-dec-2004
  113 +!set region/t=1-jan-2005:31-dec-2005
  114 +set region/t=1-jan-2006:31-dec-2006
  115 +
  116 +let tt = t[gt=temp]
  117 +!let tlo_2004 = tt[T="10-jan-2004"@itp]
  118 +!let thi_2004 = tt[T="31-may-2004"@itp]
  119 +!let tlo_2005 = tt[T="10-jan-2005"@itp]
  120 +!let thi_2005 = tt[T="31-may-2005"@itp]
  121 +!let tlo_2006 = tt[T="10-jan-2006"@itp]
  122 +!let thi_2006 = tt[T="31-may-2006"@itp]
  123 +
  124 +set viewport upper
  125 +go margins 0.6 0.18 1.5 1.5
  126 +ppl axlint 0 4
  127 +fill/nolabel/key=continuous/palette=rnb3/level=(-inf)(30,33,0.2)(inf)/axes=0,0,1,1/vlimits=-120:0 salt
  128 +!contour/over/size=0.12/level=(30,33,0.2) salt
  129 +!polygon/over/axes=0,0,1,1/nolabel/title=""/color=white {`tlo_2004`, `thi_2004`,` thi_2004`, `tlo_2004`}, {-120, -120, 0, 0}
  130 +!polygon/over/nolabel/title=""/color=white {`tlo_2005`, `thi_2005`,` thi_2005`, `tlo_2005`}, {-120, -120, 0, 0}
  131 +!polygon/over/nolabel/title=""/color=white {`tlo_2006`, `thi_2006`,` thi_2006`, `tlo_2006`}, {-120, -120, 0, 0}
  132 +
  133 +set viewport lower
  134 +go margins 0.18 0.6 1.5 1.5
  135 +ppl axlint 1 4
  136 +fill/nolabel/key=continuous/palette=rnb3/level=(-inf)(-2,2,0.2)(inf)/axes=0,1,1,1/vlimits=-120:-0.1 temp
  137 +!contour/over/size=0.12/level=(-2,1,0.2) temp
  138 +!polygon/over/nolabel/title=""/color=white {`tlo_2004`, `thi_2004`,` thi_2004`, `tlo_2004`}, {-120, -120, 0, 0}
  139 +!polygon/over/nolabel/title=""/color=white {`tlo_2005`, `thi_2005`,` thi_2005`, `tlo_2005`}, {-120, -120, 0, 0}
  140 +!polygon/over/nolabel/title=""/color=white {`tlo_2006`, `thi_2006`,` thi_2006`, `tlo_2006`}, {-120, -120, 0, 0}
  141 +frame/file=temp_salt.gif
  142 +cancel viewport
  143 +
  144 +! Flux turbulents et radiatifs
  145 +set window/aspect=0.8/size=200
  146 +
  147 +set viewport upper
  148 +go margins 0.25 0.35 1.5 1.5
  149 +ppl color 2 70 70 70
  150 +ppl axlint 1 2
  151 +ppl axatic 0 11
  152 +plot/nolabel/line=2/thick=2/vlimits=0:500 swr
  153 +plot/over/nolabel/title=""/color=black/thick=2 swr[l=@sbx:8]
  154 +
  155 +set viewport lower
  156 +go margins 0.30 0.6 1.5 1.5
  157 +ppl axlint 1 5
  158 +plot/nolabel/line=2/thick=2/vlimits=-100:100 heat
  159 +plot/over/nolabel/title=""/color=black/thick=2 heat[l=@sbx:8]
  160 +frame/file=swr_heat.gif
  161 +cancel viewport
  162 +
  163 +! Vent
  164 +!plot u_taus; frame/file=u_taus.gif
  165 +!plot x_taus; frame/file=x_taus.gif
  166 +!plot y_taus; frame/file=y_taus.gif
  167 +let taus = (x_taus^2 + y_taus^2)^0.5
  168 +set variable/unit="Pa"/title="surface wind stress" taus
  169 +
  170 +set window/aspect=0.7/size=200
  171 +set viewport upper
  172 +go margins 0.6 0.0 1.5 1.5
  173 +ppl axlint 0 5
  174 +plot/nolabel/thick=2 taus
  175 +
  176 +set viewport lower
  177 +go margins 0 0.6 1.5 1.5
  178 +ppl axlint 1 5
  179 +fill/nolabel/key=continuous/palette=rnb3/vlimits=-20:0/level=(0,0.01,0.001)(inf) num
  180 +frame/file=taus_num.gif
  181 +cancel viewport
  182 +
  183 +! Turbulence
  184 +!fill/nolabel u; frame/file=u.gif
  185 +!fill/nolabel v; frame/file=v.gif
  186 +!fill/nolabel uu; frame/file=uu.gif
  187 +!fill/nolabel vv; frame/file=vv.gif
  188 +!fill/nolabel ww; frame/file=ww.gif
  189 +!fill/nolabel p; frame/file=p.gif
  190 +!fill/nolabel tke; frame/file=tke.gif
  191 +!fill/nolabel eps; frame/file=eps.gif
  192 +plot/nolabel/thick=2/vlimits=-60:0 zsbl; frame/file=zsbl.gif
  193 +!plot/nolabel zbbl; frame/file=zbbl.gif
  194 +
  195 +! Non-local fluxes
  196 +!fill/nolabel/key=continuous/palette=inverse_redscale/vlimits=-50:0 gamh; frame/file=gamh.gif
  197 +!fill/nolabel/key=continuous/palette=inverse_redscale/vlimits=-50:0 gams; frame/file=gams.gif
  198 +!fill/nolabel/key=continuous/palette=inverse_redscale/vlimits=-50:0 gamu; frame/file=gamu.gif
  199 +!fill/nolabel/key=continuous/palette=inverse_redscale/vlimits=-50:0 gamv; frame/file=gamv.gif
  200 +
  201 +! ======================================================================
  202 +! Résolution verticale
  203 +set window/aspect=0.8
  204 +ppl axlint 5 2
  205 +plot/nolabe/l=1/symbol=27/thick=2/size=0.15/vlimits=-200:0/hlimits=1.0:3.4/k=1:80 h; frame/file=h.gif
  206 +
  207 +exit
... ...