Commit 60175900 authored by dumoda01's avatar dumoda01

Ajout du repertoire scripts

parent 33b83817
! NOAA/PMEL TMAP
! FERRET v6.62
! Linux(gfortran) 2.6.9-89.0.20.ELsmp - 06/11/10
! 7-Feb-11 11:11
use amdgulf
!Variables definition.
define symbol alpha=0.04
define symbol inib=0.001
define symbol vp=0.3
define symbol p0=0.0001
define symbol k1=0.2
define symbol k2=0.8
define symbol C_N=8.82
define symbol C_g_mol=12
define symbol area=200000*1000^2
define symbol tera=10^12
!Find the maximum concentration of phy (excluding the accumulation in the bottom layer; k=6:80)
let max_phy=phy[k=6:80@max]
!plot max_phy
!frame/file=phy_concentration_SCM.gif
!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.
let norm_phy=phy/max_phy
!Determination of the depth of the SCM.
let depth_SCM=norm_phy[k=1:80@loc:1]
!plot depth_SCM
!frame/file=depth_SCM.gif
!Determination of the nitracline.
let d_nit=nit[k=1:80@ddc]
let nitracline=d_nit[k=40:80@loc:-0.02]
!The centered derivative of normalized phy (excluding the accumulation in the bottom layer; k=6:80@ddc).
let d_norm_phy=norm_phy[k=6:80@ddc]
!Absolute values of d_norm_phy. To avoid "s" profiles.
let abs_d_norm_phy=abs(d_norm_phy)
!plot /T=($D) abs_d_norm_phy
!frame/file=Derivative_of_normalized_phy_absolute.gif
!Graph of phytoplankton, SCM and nitracline depths and definition of the SCM zone.
fill phy
contour/overplot norm_phy EQ 1
contour/overplot d_nit[k=40:80] EQ -0.02
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
frame/file=phytoplankton.gif
!Define the primary production.
!Define Ps.
define symbol ps=($vp)/((($alpha)/(($alpha)+($inib)))*(($inib)/(($alpha)+($inib))))^(($inib)/($alpha))
!Define the photosynthesis equation.(Platt 1980)
let p=($ps)*(1-exp(-1*($alpha)*par/($ps)))*exp(-1*($inib)*par/($ps))
!Define the primary production, total, new, regenerated and f-ratio.
let new_prod=p*(phy+($p0))*(nit/(($k1)*(1+(nit/($k1))+(amm/($k2)))))
let reg_prod=p*(phy+($p0))*(amm/(($k2)*(1+(nit/($k1))+(amm/($k2)))))
let tot_prod = new_prod + reg_prod
let f_ratio = new_prod/tot_prod
!Graphs for the primary production.
!fill new_prod
!frame/file=new_prod.gif
!fill reg_prod
!frame/file=reg_prod.gif
!fill tot_prod
!frame/file=tot_prod.gif
!fill f_ratio
!frame/file=f_ratio.gif
!fill par
!frame/file=par.gif
!Definition of the primary production at the SCM.
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
fill /level=(0,1,0.5) /pal=grayscale good_locations
frame/file=Good_locations.gif
let SCM_prod=tot_prod*good_locations
let SCM_new_prod=new_prod*good_locations
let SCM_reg_prod=reg_prod*good_locations
!fill SCM_prod
!frame/file=PP_at_the_SCM.gif
let i_prod=tot_prod[k=6:80@sum]
let i_new_prod=new_prod[k=6:80@sum]
let i_reg_prod=reg_prod[k=6:80@sum]
let i_SCM_prod=SCM_prod[k=6:80@sum]
let i_SCM_new_prod=SCM_new_prod[k=6:80@sum]
let i_SCM_reg_prod=SCM_reg_prod[k=6:80@sum]
!Ratio PP at the SCM over total PP in the water column.
let PP_ratio=i_SCM_prod/i_prod
let PP_new_ratio=i_SCM_new_prod/i_new_prod
let PP_reg_ratio=i_SCM_reg_prod/i_reg_prod
!Integrated primary production and contribution of the SCM.
plot i_prod
plot/overlay i_SCM_prod
plot/overlay PP_ratio
frame/file=Integrated_PP.gif
plot i_new_prod
plot/overlay i_SCM_new_prod
plot/overlay PP_new_ratio
frame/file=Integrated_PP_new.gif
plot i_reg_prod
plot/overlay i_SCM_reg_prod
plot/overlay PP_reg_ratio
frame/file=Integrated_PP_reg.gif
!Annual primary production.
let annual_PP=i_prod[l=1:2920@sum]
let SCM_annual_PP=i_SCM_prod[l=1:2920@sum]
let contribution_of_SCM_at_annual_PP=SCM_annual_PP/annual_PP*100
!list annual_PP
!list SCM_annual_PP
!list contribution_of_SCM_at_annual_PP
!Annual new primary production.
let annual_PP_new=i_new_prod[l=1:2920@sum]
let SCM_annual_PP_new=i_SCM_new_prod[l=1:2920@sum]
let contribution_of_SCM_at_annual_PP_new=SCM_annual_PP_new/annual_PP_new*100
!list annual_PP_new
!list SCM_annual_PP_new
!list contribution_of_SCM_at_annual_PP_new
!Annual regenerated primary production.
let annual_PP_reg=i_reg_prod[l=1:2920@sum]
let SCM_annual_PP_reg=i_SCM_reg_prod[l=1:2920@sum]
let contribution_of_SCM_at_annual_PP_reg=SCM_annual_PP_reg/annual_PP_reg*100
!list annual_PP_reg
!list SCM_annual_PP_reg
!list contribution_of_SCM_at_annual_PP_reg
!Convert the N annual primary production to C annual primary production.
!To mmol N m-2 y-1 to mmol C m-2 y-1.
let C_annual_PP=annual_PP*($C_N)
let C_annual_PP_new=annual_PP_new*($C_N)
let C_annual_PP_reg=annual_PP_reg*($C_N)
let C_SCM_annual_PP=SCM_annual_PP*($C_N)
let C_SCM_annual_PP_new=SCM_annual_PP_new*($C_N)
let C_SCM_annual_PP_reg=SCM_annual_PP_reg*($C_N)
!To mmol C m-2 y-1 to g C m-2 y-1
let C_annual_PP_g=C_annual_PP*($C_g_mol)/1000
let C_annual_PP_new_g=C_annual_PP_new*($C_g_mol)/1000
let C_annual_PP_reg_g=C_annual_PP_reg*($C_g_mol)/1000
let C_SCM_annual_PP_g=C_SCM_annual_PP*($C_g_mol)/1000
let C_SCM_annual_PP_new_g=C_SCM_annual_PP_new*($C_g_mol)/1000
let C_SCM_annual_PP_reg_g=C_SCM_annual_PP_reg*($C_g_mol)/1000
!To g C m-2 y-1 to Tg C y-1
let area_C_PP=C_annual_PP_g*($area)/($tera)
let area_C_SCM_PP=C_SCM_annual_PP_g*($area)/($tera)
!list area_C_PP
!list area_C_SCM_PP
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
exit
! NOAA/PMEL TMAP
! FERRET v6
! Linux(g77) 2.6.9-22. - 08/25/06
! 5-Mar-08 11:10
use amdgulf.nc
!set region/z=-120:0/l=969:2432
set region/z=-120:0
set memory/size=200
set window/aspect=0.7/size=200
ppl dfltfnt cr
ppl axlsze 0.18 0.18
define symbol alpha = 0.06
define symbol beta = 0.0
define symbol pm = 0.3
define symbol k1 = 1.5
define symbol k2 = 0.8
define symbol phy0 = 0.0001
! ======================================================================
! Zone photique
ppl axlint 1 2
let light_fraction = par/par[k=80]
let photic = light_fraction[z=@loc:0.01]
!let parsbx = par[l=@sbx:8]
!let par10 = parsbx[z=@loc:10]
let par10 = par[z=@loc:10]
fill/nolabel/key=continuous/palette=rnb3/level=(10,100,5)(inf)/vlimits=-120:0 par
frame/file=par.gif
! Efficacité photosynthétique
let ps = ($pm)/((($alpha)/(($alpha)+($beta)))*(($beta)/(($alpha)+($beta)))^(($beta)/($alpha)))
let ff = ps*(1 - exp(-1*($alpha)*par/ps))*exp(-1*($beta)*par/ps)
! f-ratio
let dnp = ff*(nit/($k1))/(1+(nit/($k1))+(amm/($k2)))*(phy+($phy0))
let dap = ff*(amm/($k2))/(1+(nit/($k1))+(amm/($k2)))*(phy+($phy0))
let f_ratio = dnp[k=1:80@sum]/(dnp[k=1:80@sum]+dap[k=1:80@sum])
fill/nolabel/key=continuous/palette=rnb3 dnp
frame/file=dnp.gif
fill/nolabel/key=continuous/palette=rnb3 dap
frame/file=dap.gif
plot/nolabel/thick=2/vlimits=0:1 f_ratio
frame/file=f-ratio.gif
! Maximum de chlorophylle
let phymax = phy[k=@max]
let zero_at_phymax = phy - phymax
let depth_of_phymax = zero_at_phymax[z=@loc:0]
let depth_of_phymax = if (phymax gt 0.5) then zero_at_phymax[z=@loc:0] else 999
set variable/bad=999 depth_of_phymax
! Phytoplancton
set viewport upper
go margins 0.6 0.15 1.5 1.5
ppl axlint 1 4
fill/nolabel/key=continuous/palette=no_red/axes=0,0,1,1/level=(0.2,2,0.1)(inf)/vlimits=-120:0 phy
contour/over/nolabel/title=""/level=(6.0) nit
set viewport lower
go margins 0.30 0.6 1.5 1.5
ppl axlint 1 4
ppl color 2 70 70 70
plot/nolabel/line=2/thick=3/nolabel/vlimits=-120:-0.1 par10
plot/over/color=black/thick=3/title="" depth_of_phymax
frame/file=phy_layer.gif
cancel viewport
! Vitesse de chute du phytoplancton
fill/nolabel/key=continuous/palette=no_green/vlimits=-120:0/level=(-0.7,0,0.1) wp; frame/file=wp.gif
! PON cycle
ppl axlint 1 5
plot/thick=2/vlimits=0:30/nolabel phy[k=1:80@sum]
plot/over/nolabel/title=""/thick=3/dash=(0.1,0.1,0.1,0.1)/color=black bac[k=1:80@sum]
plot/over/nolabel/title=""/thick=3/dash=(0.3,0.1,0.1,0.1)/color=black zoo[k=1:80@sum]
!plot/over/nolabel/title=""/thick=3 det[k=1:80@sum]
frame/file=pon_cycle.gif
! DN cycle
let totaln = phy + bac + det + zoo + nit + amm + ldn
plot/thick=2/vlimits=0:1050/nolabel totaln[k=1:80@sum]
plot/over/nolabel/title=""/thick=3/dash=(0.1,0.1,0.1,0.1)/color=black nit[k=1:80@sum]
plot/over/nolabel/title=""/thick=3/dash=(0.3,0.1,0.1,0.1)/color=black amm[k=1:80@sum]
plot/over/nolabel/title=""/thick=3/dash=(0.3,0.1,0.3,0.1)/color=black ldn[k=1:80@sum]
frame/file=dn_cycle.gif
plot/nolabel totaln[k=1:80@sum]
frame/file=totaln.gif
! Nutriments
set viewport upper
go margins 0.6 0.18 1.5 1.5
ppl axlint 1 4
fill/nolabel/key=continuous/palette=no_green_centered/vlimits=-120:0/axes=0,0,1,1/level=(0,12,1)(inf) nit
set viewport lower
go margins 0.18 0.6 1.5 1.5
ppl axlint 1 4
fill/nolabel/key=continuous/palette=blue_green_yellow/vlimits=-120:-0.1/axes=0,1,1,1/level=(0,2,0.2)(inf) amm
frame/file=nut.gif
cancel viewport
! Autres compartiments
fill/nolabel/key=continuous/pal=rnb3 zoo; frame/file=zoo.gif
fill/nolabel/key=continuous/pal=rnb3 bac; frame/file=bac.gif
!fill/nolabel/key=continuous ldn; frame/file=ldn.gif
!fill/nolabel/key=continuous det; frame/file=det.gif
! ======================================================================
! Physique
!set region/t=1-jan-2004:31-dec-2004
!set region/t=1-jan-2005:31-dec-2005
set region/t=1-jan-2006:31-dec-2006
let tt = t[gt=temp]
!let tlo_2004 = tt[T="10-jan-2004"@itp]
!let thi_2004 = tt[T="31-may-2004"@itp]
!let tlo_2005 = tt[T="10-jan-2005"@itp]
!let thi_2005 = tt[T="31-may-2005"@itp]
!let tlo_2006 = tt[T="10-jan-2006"@itp]
!let thi_2006 = tt[T="31-may-2006"@itp]
set viewport upper
go margins 0.6 0.18 1.5 1.5
ppl axlint 0 4
fill/nolabel/key=continuous/palette=rnb3/level=(-inf)(30,33,0.2)(inf)/axes=0,0,1,1/vlimits=-120:0 salt
!contour/over/size=0.12/level=(30,33,0.2) salt
!polygon/over/axes=0,0,1,1/nolabel/title=""/color=white {`tlo_2004`, `thi_2004`,` thi_2004`, `tlo_2004`}, {-120, -120, 0, 0}
!polygon/over/nolabel/title=""/color=white {`tlo_2005`, `thi_2005`,` thi_2005`, `tlo_2005`}, {-120, -120, 0, 0}
!polygon/over/nolabel/title=""/color=white {`tlo_2006`, `thi_2006`,` thi_2006`, `tlo_2006`}, {-120, -120, 0, 0}
set viewport lower
go margins 0.18 0.6 1.5 1.5
ppl axlint 1 4
fill/nolabel/key=continuous/palette=rnb3/level=(-inf)(-2,2,0.2)(inf)/axes=0,1,1,1/vlimits=-120:-0.1 temp
!contour/over/size=0.12/level=(-2,1,0.2) temp
!polygon/over/nolabel/title=""/color=white {`tlo_2004`, `thi_2004`,` thi_2004`, `tlo_2004`}, {-120, -120, 0, 0}
!polygon/over/nolabel/title=""/color=white {`tlo_2005`, `thi_2005`,` thi_2005`, `tlo_2005`}, {-120, -120, 0, 0}
!polygon/over/nolabel/title=""/color=white {`tlo_2006`, `thi_2006`,` thi_2006`, `tlo_2006`}, {-120, -120, 0, 0}
frame/file=temp_salt.gif
cancel viewport
! Flux turbulents et radiatifs
set window/aspect=0.8/size=200
set viewport upper
go margins 0.25 0.35 1.5 1.5
ppl color 2 70 70 70
ppl axlint 1 2
ppl axatic 0 11
plot/nolabel/line=2/thick=2/vlimits=0:500 swr
plot/over/nolabel/title=""/color=black/thick=2 swr[l=@sbx:8]
set viewport lower
go margins 0.30 0.6 1.5 1.5
ppl axlint 1 5
plot/nolabel/line=2/thick=2/vlimits=-100:100 heat
plot/over/nolabel/title=""/color=black/thick=2 heat[l=@sbx:8]
frame/file=swr_heat.gif
cancel viewport
! Vent
!plot u_taus; frame/file=u_taus.gif
!plot x_taus; frame/file=x_taus.gif
!plot y_taus; frame/file=y_taus.gif
let taus = (x_taus^2 + y_taus^2)^0.5
set variable/unit="Pa"/title="surface wind stress" taus
set window/aspect=0.7/size=200
set viewport upper
go margins 0.6 0.0 1.5 1.5
ppl axlint 0 5
plot/nolabel/thick=2 taus
set viewport lower
go margins 0 0.6 1.5 1.5
ppl axlint 1 5
fill/nolabel/key=continuous/palette=rnb3/vlimits=-20:0/level=(0,0.01,0.001)(inf) num
frame/file=taus_num.gif
cancel viewport
! Turbulence
!fill/nolabel u; frame/file=u.gif
!fill/nolabel v; frame/file=v.gif
!fill/nolabel uu; frame/file=uu.gif
!fill/nolabel vv; frame/file=vv.gif
!fill/nolabel ww; frame/file=ww.gif
!fill/nolabel p; frame/file=p.gif
!fill/nolabel tke; frame/file=tke.gif
!fill/nolabel eps; frame/file=eps.gif
plot/nolabel/thick=2/vlimits=-60:0 zsbl; frame/file=zsbl.gif
!plot/nolabel zbbl; frame/file=zbbl.gif
! Non-local fluxes
!fill/nolabel/key=continuous/palette=inverse_redscale/vlimits=-50:0 gamh; frame/file=gamh.gif
!fill/nolabel/key=continuous/palette=inverse_redscale/vlimits=-50:0 gams; frame/file=gams.gif
!fill/nolabel/key=continuous/palette=inverse_redscale/vlimits=-50:0 gamu; frame/file=gamu.gif
!fill/nolabel/key=continuous/palette=inverse_redscale/vlimits=-50:0 gamv; frame/file=gamv.gif
! ======================================================================
! Résolution verticale
set window/aspect=0.8
ppl axlint 5 2
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
exit
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment