Commit 8ea84af1 authored by dumoda01's avatar dumoda01
Browse files

Correction d'un bogue dans bio.F90 pour que le code fonctionne avec...

Correction d'un bogue dans bio.F90 pour que le code fonctionne avec bio_ismer.F90. Pour changer de modele biologique, il faut modifier l'indice des traceurs nit et amm dans bio.F90 et meanflow/nitrate.F90 et meanflow/ammonium.F90. Ceci devra etre regularise eventuellement.
parent e74c0f0a
......@@ -565,11 +565,11 @@
if (bio_eulerian) then
do j=1,numcc
if(j==5) then !CHG3
if(j==1) then !CHG3
do k=1,nlev
cc(j,k) = nit(k)
end do
else if (j==6) then !CHG5
else if (j==9) then !CHG5
do k=1,nlev
cc(j,k) = amm(k)
end do
......
!$Id: bio_fasham.F90,v 1.11 2007-01-06 11:49:15 kbk Exp $
!$Id: bio_ismer.F90,v 1.11 2007-01-06 11:49:15 kbk Exp $
#include"cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -54,61 +54,58 @@
!
! !LOCAL VARIABLES:
! from a namelist
REALTYPE :: p1_initial= 0.05
REALTYPE :: p2_initial= 0.05
REALTYPE :: z1_initial= 0.05
REALTYPE :: z2_initial= 0.05
REALTYPE :: b_initial= 0.001
REALTYPE :: d_initial= 0.416666666
! Nitrate and ammonium are initialized within the GOTM observation module
! REALTYPE :: n_initial= 8.3
! REALTYPE :: a_initial= 0.22
REALTYPE :: l_initial= 0.14
REALTYPE :: p0 = 0.0
REALTYPE :: z0 = 0.0
REALTYPE :: b0 = 0.0
REALTYPE :: vp1 = 1.5
REALTYPE :: alpha1 = 0.065
REALTYPE :: inib1 = 0.05
REALTYPE :: vp2 = 1.5
REALTYPE :: alpha2 = 0.065
REALTYPE :: inib2 = 0.05
REALTYPE :: theta = 0.0
REALTYPE :: w_p1min = -0.06
REALTYPE :: w_p1max = -0.38
REALTYPE :: w_p2min = -0.06
REALTYPE :: w_p2max = -0.38
REALTYPE :: kn1 = 0.2
REALTYPE :: ka1 = 0.8
REALTYPE :: kn2 = 0.2
REALTYPE :: ka2 = 0.8
REALTYPE :: mu1 = 0.05
REALTYPE :: k5 = 0.2
REALTYPE :: gamma = 0.05
REALTYPE :: w_p1 = -0.5
REALTYPE :: w_p2 = -0.5
REALTYPE :: g1max = 1.0
REALTYPE :: g2max = 1.0
REALTYPE :: k3 = 1.0
REALTYPE :: beta = 0.625
REALTYPE :: mu2 = 0.3
REALTYPE :: k6 = 0.2
REALTYPE :: delta = 0.1
REALTYPE :: epsi = 0.70
REALTYPE :: r11 = 0.55
REALTYPE :: r12 = 0.4
REALTYPE :: r13 = 0.05
REALTYPE :: r21 = 0.55
REALTYPE :: r22 = 0.4
REALTYPE :: r23 = 0.05
REALTYPE :: vb = 1.2
REALTYPE :: k4 = 0.5
REALTYPE :: mu3 = 0.15
REALTYPE :: eta = 0.0
REALTYPE :: mu4 = 0.02
REALTYPE :: mu5 = 0.00
REALTYPE :: w_d = -2.0
REALTYPE, public :: kc = 0.03
REALTYPE :: p1_init = 0.05
REALTYPE :: p2_init = 0.05
REALTYPE :: z1_init = 0.05
REALTYPE :: z2_init = 0.05
REALTYPE :: b_init = 0.001
REALTYPE :: d_init = 0.4
REALTYPE :: l_init = 0.14
REALTYPE :: p0 = 0.0
REALTYPE :: z0 = 0.0
REALTYPE :: b0 = 0.0
REALTYPE :: vp1 = 1.5
REALTYPE :: alpha1 = 0.065
REALTYPE :: inib1 = 0.05
REALTYPE :: vp2 = 1.5
REALTYPE :: alpha2 = 0.065
REALTYPE :: inib2 = 0.05
REALTYPE :: theta = 0.0
REALTYPE :: w_p1min = -0.06
REALTYPE :: w_p1max = -0.38
REALTYPE :: w_p2min = -0.06
REALTYPE :: w_p2max = -0.38
REALTYPE :: kn1 = 0.2
REALTYPE :: ka1 = 0.8
REALTYPE :: kn2 = 0.2
REALTYPE :: ka2 = 0.8
REALTYPE :: mu1 = 0.05
REALTYPE :: k5 = 0.2
REALTYPE :: gamma = 0.05
REALTYPE :: w_p1 = -0.5
REALTYPE :: w_p2 = -0.5
REALTYPE :: g1max = 1.0
REALTYPE :: g2max = 1.0
REALTYPE :: k3 = 1.0
REALTYPE :: beta = 0.625
REALTYPE :: mu2 = 0.3
REALTYPE :: k6 = 0.2
REALTYPE :: delta = 0.1
REALTYPE :: epsi = 0.70
REALTYPE :: r11 = 0.55
REALTYPE :: r12 = 0.4
REALTYPE :: r13 = 0.05
REALTYPE :: r21 = 0.55
REALTYPE :: r22 = 0.4
REALTYPE :: r23 = 0.05
REALTYPE :: vb = 1.2
REALTYPE :: k4 = 0.5
REALTYPE :: mu3 = 0.15
REALTYPE :: eta = 0.0
REALTYPE :: mu4 = 0.02
REALTYPE :: mu5 = 0.00
REALTYPE :: w_d = -2.0
REALTYPE, public :: kc = 0.03
integer :: out_unit
integer, parameter :: n=1,p1=2,p2=3,z1=4,z2=5,d=6,l=7,b=8,a=9
!EOP
......@@ -143,14 +140,14 @@
!
! !LOCAL VARIABLES:
namelist /bio_ismer_nml/ numc, &
p1_initial,p2_initial,z1_initial,z2_initial, &
b_initial,d_initial,l_initial, &
p0,z0,b0,vp1,alpha1,inib1,vp2,alpha2,inib2, &
kn1,ka1,kn2,ka2,mu1,k5,gamma,w_p1,w_p2, &
g1max,g2max,k3,beta,mu2,k6,delta,epsi, &
r11,r12,r13,r21,r22,r23, &
vb,k4,mu3,eta,mu4,w_d,kc,mu5, &
theta,w_p1max,w_p1min,w_p2min,w_p2max !CHG2
p1_init,p2_init,z1_init,z2_init, &
b_init,d_init,l_init, &
p0,z0,b0,vp1,alpha1,inib1,vp2,alpha2,inib2, &
kn1,ka1,kn2,ka2,mu1,k5,gamma,w_p1,w_p2, &
g1max,g2max,k3,beta,mu2,k6,delta,epsi, &
r11,r12,r13,r21,r22,r23, &
vb,k4,mu3,eta,mu4,w_d,kc,mu5, &
theta,w_p1max,w_p1min,w_p2min,w_p2max
!EOP
!-----------------------------------------------------------------------
!BOC
......@@ -178,28 +175,28 @@
901 format (f8.5)
! Conversion from day to second
vp1 = vp1 /secs_pr_day
vp2 = vp2 /secs_pr_day
vb = vb /secs_pr_day
mu1 = mu1 /secs_pr_day
mu2 = mu2 /secs_pr_day
mu3 = mu3 /secs_pr_day
mu4 = mu4 /secs_pr_day
mu5 = mu5 /secs_pr_day !DD
g1max = g1max /secs_pr_day
g2max = g2max /secs_pr_day
w_p1 = w_p1 /secs_pr_day
w_p2 = w_p2 /secs_pr_day
w_p1min = w_p1min /secs_pr_day !DD
w_p1max = w_p1max /secs_pr_day !DD
w_p2min = w_p2min /secs_pr_day !DD
w_p2max = w_p2max /secs_pr_day !DD
theta = theta /secs_pr_day !DD
w_d = w_d /secs_pr_day
alpha1 = alpha1/secs_pr_day
inib1 = inib1 /secs_pr_day !CHG1
alpha2 = alpha2/secs_pr_day
inib2 = inib2 /secs_pr_day !CHG1
vp1 = vp1 /secs_pr_day
vp2 = vp2 /secs_pr_day
vb = vb /secs_pr_day
mu1 = mu1 /secs_pr_day
mu2 = mu2 /secs_pr_day
mu3 = mu3 /secs_pr_day
mu4 = mu4 /secs_pr_day
mu5 = mu5 /secs_pr_day
g1max = g1max /secs_pr_day
g2max = g2max /secs_pr_day
w_p1 = w_p1 /secs_pr_day
w_p2 = w_p2 /secs_pr_day
w_p1min = w_p1min /secs_pr_day
w_p1max = w_p1max /secs_pr_day
w_p2min = w_p2min /secs_pr_day
w_p2max = w_p2max /secs_pr_day
theta = theta /secs_pr_day
w_d = w_d /secs_pr_day
alpha1 = alpha1 /secs_pr_day
inib1 = inib1 /secs_pr_day
alpha2 = alpha2 /secs_pr_day
inib2 = inib2 /secs_pr_day
out_unit=unit
......@@ -250,13 +247,13 @@
!BOC
do i=1,nlev
cc(n,i) = nprof(i) !CHG3
cc(p1,i)= p1_initial
cc(p2,i)= p2_initial
cc(z1,i)= z1_initial
cc(z2,i)= z2_initial
cc(d,i) = d_initial
cc(l,i) = l_initial
cc(b,i) = b_initial
cc(p1,i)= p1_init
cc(p2,i)= p2_init
cc(z1,i)= z1_init
cc(z2,i)= z2_init
cc(d,i) = d_init
cc(l,i) = l_init
cc(b,i) = b_init
cc(a,i) = aprof(i) !CHG5
end do
......@@ -506,7 +503,7 @@
!
! !LOCAL VARIABLES:
REALTYPE :: fac1,fac2,fac3,minal,qn1,qa1,qn2,qa2
REALTYPE :: Ps1,Ps2,ff1,ff2 !CHG1
REALTYPE :: ps1,ps2,ff1,ff2 !CHG1
integer :: i,j,ci
!EOP
!-----------------------------------------------------------------------
......@@ -531,19 +528,22 @@
! Parker (1974) - inhibition
! ff= vp*((par(ci)/I_opt)*exp(1-(par(ci)/I_opt)))**2
! Platt et al. (1980) - inhibition
Ps1= vp1/((alpha1/(alpha1+inib1))*(alpha1/(alpha1+inib1))**(inib1/alpha1))
ff1= Ps1*(1.-exp(-1.*alpha1*par(ci)/Ps1))*exp(-1.*inib1*par(ci)/Ps1)
Ps2= vp2/((alpha2/(alpha2+inib2))*(alpha2/(alpha2+inib2))**(inib2/alpha2))
ff2= Ps2*(1.-exp(-1.*alpha2*par(ci)/Ps2))*exp(-1.*inib2*par(ci)/Ps2)
! --------------------------------------------------------------------
! Light limitation factor (PI curve)
ps1= vp1/((alpha1/(alpha1+inib1))*(alpha1/(alpha1+inib1))**(inib1/alpha1))
ff1= ps1*(1.-exp(-1.*alpha1*par(ci)/ps1))*exp(-1.*inib1*par(ci)/ps1)
ps2= vp2/((alpha2/(alpha2+inib2))*(alpha2/(alpha2+inib2))**(inib2/alpha2))
ff2= ps2*(1.-exp(-1.*alpha2*par(ci)/ps2))*exp(-1.*inib2*par(ci)/ps2)
! Nutrient limitation factors
qn1=(cc(n,ci)/kn1)/(1.+cc(n,ci)/kn1+cc(a,ci)/ka1)
qa1=(cc(a,ci)/ka1)/(1.+cc(n,ci)/kn1+cc(a,ci)/ka1)
qn2=(cc(n,ci)/kn2)/(1.+cc(n,ci)/kn2+cc(a,ci)/ka2)
qa2=(cc(a,ci)/ka2)/(1.+cc(n,ci)/kn2+cc(a,ci)/ka2)
! Grazing preference normalization factors
fac1=(cc(z1,ci)+z0)/(k3*(r11*cc(p1,ci)+r12*cc(b,ci)+r13*cc(d,ci))+ &
r11*cc(p1,ci)**2+r12*cc(b,ci)**2+r13*cc(d,ci)**2)
......@@ -562,49 +562,44 @@
nitlim(ci) =qn1
ammlim(ci) =qa1
dd(p1,d,ci)=mu1*(cc(p1,ci)+p0)/(k5+cc(p1,ci)+p0)*cc(p1,ci) &
+fac3*(1.-beta)*cc(p1,ci)**2*(g1max*r11*fac1 + g2max*r21*fac2)
dd(p2,d,ci)=mu1*(cc(p2,ci)+p0)/(k5+cc(p2,ci)+p0)*cc(p2,ci) &
+fac3*(1.-beta)*g2max*r12*cc(p2,ci)**2*fac2
! Nutrient uptake by flagellates and diatoms
dd(n,p1,ci) =ff1*qn1*(cc(p1,ci)+p0)
dd(a,p1,ci) =ff1*qa1*(cc(p1,ci)+p0)
dd(n,p2,ci) =ff2*qn2*(cc(p2,ci)+p0)
dd(a,p2,ci) =ff2*qa2*(cc(p2,ci)+p0)
dd(p1,l,ci) =gamma*ff1*(qn1+qa1)*cc(p1,ci)
dd(p2,l,ci) =gamma*ff2*(qn2+qa2)*cc(p2,ci)
dd(p1,l,ci)=gamma*ff1*(qn1+qa1)*cc(p1,ci)
dd(p2,l,ci)=gamma*ff2*(qn2+qa2)*cc(p2,ci)
dd(p1,d,ci) =mu1*(cc(p1,ci)+p0)/(k5+cc(p1,ci)+p0)*cc(p1,ci) &
+fac3*(1.-beta)*cc(p1,ci)**2*(g1max*r11*fac1+g2max*r21*fac2)
dd(p2,d,ci) =mu1*(cc(p2,ci)+p0)/(k5+cc(p2,ci)+p0)*cc(p2,ci) &
+fac3*(1.-beta)*g2max*r21*cc(p2,ci)**2*fac2
dd(b,d,ci) =fac3*(1.-beta)*g1max*r12*cc(b,ci)**2*fac1
dd(b,d,ci) =fac3*(1.-beta)*g1max*r12*cc(b,ci)**2*fac1
dd(p1,z1,ci)=fac3*beta*g1max*r11*cc(p1,ci)**2*fac1
dd(b,z1,ci)=fac3*beta*g1max*r12*cc(b,ci)**2*fac1
dd(d,z1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z1,ci)
dd(z1,a,ci) =epsi*mu2*(cc(z1,ci)+z0)/(k6+cc(z1,ci)+z0)*cc(z1,ci)
dd(z1,l,ci) =delta*mu2*(cc(z1,ci)+z0)/(k6+cc(z1,ci)+z0)*cc(z1,ci)
dd(a,b,ci) =vb*minal/(k4+minal+cc(l,ci))*(cc(b,ci)+b0)
dd(l,b,ci) =vb*cc(l,ci)/(k4+minal+cc(l,ci))*(cc(b,ci)+b0)
dd(z2,d,ci) =(1.-epsi-delta)*mu2*(cc(z2,ci)+z0)/(k6+cc(z2,ci)+z0)*cc(z2,ci)
dd(z2,a,ci) =epsi*mu2*(cc(z2,ci)+z0)/(k6+cc(z2,ci)+z0)*cc(z2,ci)
dd(z2,l,ci) =delta*mu2*(cc(z2,ci)+z0)/(k6+cc(z2,ci)+z0)*cc(z2,ci)
! Taux de chute du phytoplancton en fonction de la croissance
! ws(p,ci)=w_pmin+(w_pmax-w_pmin)*exp(-ff/theta)
! ws(p,ci)=w_pmax-(w_pmax-w_pmin)*(ff/theta/(1.+ff/theta))
ws(p1,ci)=w_p1
ws(p2,ci)=w_p2
dd(a,b,ci) =vb*minal/(k4+minal+cc(l,ci))*(cc(b,ci)+b0)
dd(l,b,ci) =vb*cc(l,ci)/(k4+minal+cc(l,ci))*(cc(b,ci)+b0)
do i=1,numc
do j=1,numc
......
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