Commit 764531e6 authored by Gwenaelle Gremion's avatar Gwenaelle Gremion
Browse files

Maybe the last one...

parent 8f1bf069
......@@ -1078,7 +1078,8 @@ end if
REALTYPE :: q1,q2
REALTYPE :: fac,min67
!! Size variation for each particle type
REALTYPE ::size_phy,size_dph,size_dzo,size_fp
REALTYPE ::size_phy,size_dph,size_dzo,size_fp
REALTYPE ::size_phy_max,size_dph_max,size_dzo_max,size_fp_max
REALTYPE ::diam_phy,diam_dph,diam_dzo,diam_fp,diam_msn
!Collision & Aggregation
!! Sedimentation rate for each particle type
......@@ -1086,7 +1087,8 @@ end if
REALTYPE ::densFlu
REALTYPE ::Rp,Rdph,Rdzo,Rfp
REALTYPE ::Re_phy,Re_dph,Re_dzo,Re_fp
REALTYPE ::CSF_phy,CSF_dph,CSF_dzo,CSF_fp,CSF_msn
REALTYPE ::CSF_phy,CSF_dph,CSF_dzo,CSF_fp,CSF_msn
REALTYPE ::CSF_phy_calc,CSF_dph_calc,CSF_dzo_calc,CSF_fp_calc,CSF_msn_calc
!! Maximum loss for aggregation for each particle type
REALTYPE ::pprime
REALTYPE ::d1rime
......@@ -1345,7 +1347,7 @@ endif !#4
!-------------------------------------------------------------------------------------
!! Sedimentation rate for each particle type
!! Usuefull parameters of Sedimentation rate for each particle type
!-------------------------------------------------------------------------------------
!----------Definition of the equivalent diameter of our particles [Bagheri 2015]-Unit of size [m]
......@@ -1363,16 +1365,59 @@ diam_dzo = sign(abs(((size_dzo*4.)*(size_dzo*4.)*(size_dzo*2.)))**(1./3.),((size
diam_fp = sign(abs(((size_fp*4.)*(size_fp*4.)*(size_fp*2.)))**(1./3.),((size_fp*4.)*(size_fp*4.)*(size_fp*2.)))
!--» Does CFL limit
CFL = (depth_bio/nlev)/dt_bio
!----------Calculation of the CSF factor
!--Phytoplankton
CSF_phy = (size_phy*2)/sqrt((size_phy*2)*(size_phy*2))
if(CSF_phy .ge. 0.0 .and. CSF_phy.lt. 0.4) then !#5.5
CSF_phy_calc = 2.18-(2.09*CSF_phy)
else if (CSF_phy .ge. 0.4 .and. CSF_phy .lt. 0.8) then !#5.6
CSF_phy_calc = 0.946*(CSF_phy)**(-0.378)
else if (CSF_phy .ge. 0.8 .and. CSF_phy .le. 1.0) then !#5.6
CSF_phy_calc = 1.0 ! consider as a sphere
else !#5.6
write (*,*) 'Error in CSF values for phytoplankton : CSF .NE. [0-1]', CSF_phy
endif !#5.6
!--Dead Phytoplankton
CSF_dph = (size_dph*2)/sqrt((size_dph*2)*(size_dph*2))
CSF_dph = (size_dph*2)/sqrt((size_dph*2)*(size_dph*2))
write(*,*) 'CSF_dph',CSF_dph
if(CSF_dph .ge. 0.0 .and. CSF_dph.lt. 0.4) then !#5.7
CSF_dph_calc = 2.18-(2.09*CSF_dph)
else if (CSF_dph .ge. 0.4 .and. CSF_dph .lt. 0.8) then !#5.7
CSF_dph_calc = 0.946*(CSF_dph)**(-0.378)
else if (CSF_dph .ge. 0.8 .and. CSF_dph .le. 1.0) then !#5.7
CSF_dph_calc = 1.0 ! consider as a sphere
else !#5.7
write (*,*) 'Error in CSF values for Dead phytoplankton : CSF .NE. [0-1]',CSF_dph
endif !#5.7
!--Dead Zooplankton
CSF_dzo = (size_dzo*2)/sqrt((size_dzo*4)*(size_dzo*4))
!--Fecla Pellets
CSF_fp = (size_fp*2)/sqrt((size_fp*4)*(size_fp*4))
CSF_dzo = (size_dzo*2)/sqrt((size_dzo*4)*(size_dzo*4))
if(CSF_dzo .ge. 0.0 .and. CSF_dzo.lt. 0.4) then !#5.8
CSF_dzo_calc = 2.18-(2.09*CSF_dzo)
else if (CSF_dzo .ge. 0.4 .and. CSF_dzo .lt. 0.8) then !#5.8
CSF_dzo_calc = 0.946*(CSF_dzo)**(-0.378)
else if (CSF_dzo .ge. 0.8 .and. CSF_dzo .le. 1.0) then !#5.8
CSF_dzo_calc = 1.0 ! consider as a sphere
else !#5.8
write (*,*) 'Error in CSF values for dead zooplankton : CSF .NE. [0-1]',CSF_dzo
endif !#5.8
!--Fecal Pellets
CSF_fp = (size_fp*2)/sqrt((size_fp*4)*(size_fp*4))
write(*,*) 'CSF_fp',CSF_fp
if(CSF_fp .ge. 0.0 .and. CSF_fp.lt. 0.4) then !#5.9
CSF_fp_calc = 2.18-(2.09*CSF_fp)
else if (CSF_fp .ge. 0.4 .and. CSF_fp .lt. 0.8) then !#5.9
CSF_fp_calc = 0.946*(CSF_fp)**(-0.378)
else if (CSF_fp .ge. 0.8 .and. CSF_fp .le. 1.0) then !#5.9
CSF_fp_calc = 1.0 ! consider as a sphere
else !#5.9
write (*,*) 'Error in CSF values for fecal pellets : CSF .NE. [0-1]',CSF_fp
endif !#5.9
!----------Calcul of densities
......@@ -1382,7 +1427,41 @@ densFlu = rho_0
Rp = (rho_p-densFlu)
Rdph= (rho_dph-densFlu)
Rdzo =(rho_dzo-densFlu)
Rfp =(rho_fp-densFlu)
Rfp =(rho_fp-densFlu)
Rmsn = (rho_msn-densFlu)
!-----------------------------------------------------------------------------------
!! ---Safety check
!-----------------------------------------------------------------------------------
!----------Estimation of the maximum size allowed for particles
!--» Comparaison with CFL limit
size_phy_max = ((CFL/0.93)**2)*(1/(g*(Rp/densFlu)))
size_dph_max = ((CFL/0.93)**2)*(1/(g*(Rdph/densFlu)))
size_dzo_max = ((CFL/0.93)**2)*(1/(g*(Rdzo/densFlu)))
size_fp_max = ((CFL/0.93)**2)*(1/(g*(Rfp/densFlu)))
!---------- Attribution of the good size
if (size_phy .gt. size_phy_max) then
size_phy = size_phy_max
write(*,*) 'Size of Phy OVERPASSES Max.Size of Phy to respect CFL limit'
endif
if (size_dph .gt. size_dph_max) then
size_dph = size_dph_max
write(*,*) 'Size of Dph OVERPASSES Max.Size of Dph to respect CFL limit'
endif
if (size_dzo .gt. size_dzo_max) then
size_dzo = size_dzo_max
write(*,*) 'Size of Dzo OVERPASSES Max.Size of Dzo to respect CFL limit'
endif
if (size_fp .gt. size_fp_max) then
size_fp = size_fp_max
write(*,*) 'Size of Fp OVERPASSES Max.Size of FP to respect CFL limit'
endif
!-------------------------------------------------------------------------------------
!! Calculation of Sedimentation rates
!-------------------------------------------------------------------------------------
!!--------!Calculated by value from the .nml
if (Phys_w .eq. 0.0 ) then !#5
......@@ -1472,68 +1551,29 @@ else if (Phys_w .eq. 3.0) then !#5
else if (Phys_w .eq. 4.0) then !#5
!--Phytoplankton
if(CSF_phy .ge. 0.0 .and. CSF_phy.lt. 0.4) then !#5.5
CSF_phy = 2.18-(2.09*CSF_phy)
else if (CSF_phy .ge. 0.4 .and. CSF_phy .lt. 0.8) then !#5.6
CSF_phy = 0.946*(CSF_phy)**(-0.378)
else if (CSF_phy .ge. 0.8 .and. CSF_phy .le. 1.0) then !#5.6
CSF_phy = 1.0 ! consider as a sphere
else !#5.6
write (*,*) 'Error in CSF values for phytoplankton : CSF .NE. [0-1]', CSF_phy
endif !#5.6
w_p_m=(1/(18*(kinvis*densFlu)))*(1/CSF_phy)*(Rp)*g*(diam_phy)**2 ![m/s]
! w_p_m=(1/(18*(kinvis*densFlu)))*(1/CSF_phy_calc)*(Rp)*g*(diam_phy)**2 ![m/s]
w_p_m=(1/(18*(kinvis*densFlu)))*(1/CSF_phy_calc)*(Rp/densFlu)*g*(diam_phy)**2 ![m/s]
!--Dead phytoplankton
if(CSF_dph .ge. 0.0 .and. CSF_dph.lt. 0.4) then !#5.7
CSF_dph = 2.18-(2.09*CSF_dph)
else if (CSF_dph .ge. 0.4 .and. CSF_dph .lt. 0.8) then !#5.7
CSF_dph = 0.946*(CSF_dph)**(-0.378)
else if (CSF_dph .ge. 0.8 .and. CSF_dph .le. 1.0) then !#5.7
CSF_dph = 1.0 ! consider as a sphere
else !#5.7
write (*,*) 'Error in CSF values for Dead phytoplankton : CSF .NE. [0-1]',CSF_dph
endif !#5.7
w_dph_m=(1/(18*(kinvis*densFlu)))*(1/CSF_dph)*(Rdph)*g*(diam_dph)**2 ![m/s]
! w_dph_m=(1/(18*(kinvis*densFlu)))*(1/CSF_dph_calc)*(Rdph)*g*(diam_dph)**2 ![m/s]
w_dph_m=(1/(18*(kinvis*densFlu)))*(1/CSF_dph_calc)*(Rdph/densFlu)*g*(diam_dph)**2 ![m/s]
!--Dead Zooplankton
if(CSF_dzo .ge. 0.0 .and. CSF_dzo.lt. 0.4) then !#5.8
CSF_dzo = 2.18-(2.09*CSF_dzo)
else if (CSF_dzo .ge. 0.4 .and. CSF_dzo .lt. 0.8) then !#5.8
CSF_dzo = 0.946*(CSF_dzo)**(-0.378)
else if (CSF_dzo .ge. 0.8 .and. CSF_dzo .le. 1.0) then !#5.8
CSF_dzo = 1.0 ! consider as a sphere
else !#5.8
write (*,*) 'Error in CSF values for dead zooplankton : CSF .NE. [0-1]',CSF_dzo
endif !#5.8
w_dzo_m=(1/(18*(kinvis*densFlu)))*(1/CSF_dzo)*(Rdzo)*g*(diam_dzo)**2 ![m/s]
! w_dzo_m=(1/(18*(kinvis*densFlu)))*(1/CSF_dzo_calc)*(Rdzo)*g*(diam_dzo)**2 ![m/s]
w_dzo_m=(1/(18*(kinvis*densFlu)))*(1/CSF_dzo_calc)*(Rdzo/densFlu)*g*(diam_dzo)**2 ![m/s]
!--Fecal pellets
if(CSF_fp .ge. 0.0 .and. CSF_fp.lt. 0.4) then !#5.9
CSF_fp = 2.18-(2.09*CSF_fp)
else if (CSF_fp .ge. 0.4 .and. CSF_fp .lt. 0.8) then !#5.9
CSF_fp = 0.946*(CSF_fp)**(-0.378)
else if (CSF_fp .ge. 0.8 .and. CSF_fp .le. 1.0) then !#5.9
CSF_fp = 1.0 ! consider as a sphere
else !#5.9
write (*,*) 'Error in CSF values for fecal pellets : CSF .NE. [0-1]',CSF_fp
endif !#5.9
w_fp_m=(1/(18*(kinvis*densFlu)))*(1/CSF_fp)*(Rfp)*g*(diam_fp)**2 ![m/s]
! w_fp_m=(1/(18*(kinvis*densFlu)))*(1/CSF_fp_calc)*(Rfp)*g*(diam_fp)**2 ![m/s]
w_fp_m=(1/(18*(kinvis*densFlu)))*(1/CSF_fp_calc)*(Rfp/densFlu)*g*(diam_fp)**2 ![m/s]
!!--------Depending on CSF + Re
else if (Phys_w .eq. 5.0) then !#5
!--Phytoplankton
if (CSF_phy .eq. 1.0) then ! Considered as a sphere
w_p_m = -(((Rp/densFlu)*g*(diam_phy**2))/(18*kinvis)) ![m/s]
!! write(*,*) 'CSF_phy = 0 --> Sphere, then Stokes Law ',w_p_m
! w_p_m = -(((Rp/densFlu)*g*(diam_phy**2))/(18*kinvis)) ![m/s]
w_p_m=(1/(18*(kinvis*densFlu)))*(1/CSF_phy_calc)*(Rp/densFlu)*g*(diam_phy)**2 ![m/s]
!! write(*,*) 'CSF_phy = 1 --> Sphere, then Stokes Law ',w_p_m
! Comparaison with the Stokes range ! VanRijn 1993
Re_phy = abs(w_p_m*(diam_phy/kinvis))
if (Re_phy .gt. 1.0) then
......@@ -1543,51 +1583,55 @@ else if (Phys_w .eq. 5.0) then !#5
else ! No spherical
if(diam_phy .le. 0.0001 )then
! If the diameter of phy (d) --> 1 < d <= 100 micrometers (VanRijn 1993)
w_p_m =-(((Rp/densFlu)*g*(diam_phy**2))/(18*kinvis)) ![m/s]
!! write(*,*) 'CSF .ne. 0.0 --> Diameter of phy : 1< d <= 100 micrometers, settling =' ,w_p_m
elseif(diam_phy .gt. 0.0001 .and. diam_phy .le. 0.001)then
! w_p_m =-(((Rp/densFlu)*g*(diam_phy**2))/(18*kinvis)) ![m/s]
w_p_m=(1/(18*(kinvis*densFlu)))*(1/CSF_phy_calc)*(Rp/densFlu)*g*(diam_phy)**2 ![m/s]
!! write(*,*) 'CSF .ne. 1.0 --> Diameter of phy : 1< d <= 100 micrometers, settling =' ,w_p_m
elseif(diam_phy .gt. 0.0001 .and. diam_phy .lt. 0.001)then
! If the diameter of Phy (d) --> 100< d micrometers (VanRijn 1993)
w_p_m= ((10.0*kinvis)/diam_phy)*(((1+((0.01*(Rp/densFlu)*g*((diam_phy)**3.0))/(kinvis**2.0)))**0.5)-1) ![m/s]
! w_p_m = -(((10*kinvis)/diam_phy)*&
! ((1+((0.01*(Rp/densFlu)*g*(diam_phy)**3.0) /kinvis**2.0)**0.5) -1)) ![m/s]
!! write(*,*) 'CSF .ne. 0.0 --> Diameter of phy : 100< d micrometers, settling =' ,w_p_m
elseif(diam_phy .gt. 0.001) then
!! write(*,*) 'CSF .ne. 1.0 --> Diameter of phy : 100< d micrometers, settling =' ,w_p_m
elseif(diam_phy .ge. 0.001) then
! If the diameter of Phy (d) --> d > 1000 micrometers (VanRijn 1993)
w_p_m = -(1.1*((Rp/densFlu)*g*diam_phy)**0.5) ![m/s]
! w_p_m = (1.1*((Rp/densFlu)*g*diam_phy)**0.5) ![m/s]
w_p_m = (0.93*sqrt(Rp*g*diam_phy/densFlu))![m/s]
!! write(*,*) 'Diameter of Phy : d > 1000 micrometers, settling =' ,w_p_m
endif
endif
!--Dead Phytoplankton
write(*,*) 'CSF_dph_Calculated',CSF_dph_calc
write(*,*) 'diam_dph',diam_dph
if (CSF_dph .eq. 1.0) then ! Considered as a sphere
w_dph_m = -(((Rdph/densFlu)*g*(diam_dph**2))/(18*kinvis)) ![m/s]
!! write(*,*) 'CSF_dph = 0 --> Sphere, then Stokes Law ',w_dph_m
! w_dph_m = -(((Rdph/densFlu)*g*(diam_dph**2))/(18*kinvis)) ![m/s]
w_dph_m=(1/(18*(kinvis*densFlu)))*(1/CSF_dph_calc)*(Rdph/densFlu)*g*(diam_dph)**2 ![m/s]
write(*,*) 'CSF_dph = 1 --> Sphere, then Stokes Law ',w_dph_m
! Comparaison with the Stokes range ! VanRijn 1993
Re_dph = abs(w_dph_m*(diam_dph/kinvis))
if (Re_dph .gt. 1.0) then
w_dph_m = -diam_dph**0.5/secs_pr_day ![m/s]
!! write(*,*) 'Reynolds number for Dead-phytoplankton > 1',w_dph_m
write(*,*) 'Reynolds number for Dead-phytoplankton > 1',w_dph_m
endif
else ! No spherical
if(diam_dph .le. 0.0001 )then
! If the diameter of dph (d) --> 1 < d <= 100 micrometers (VanRijn 1993)
w_dph_m =-(((Rdph/densFlu)*g*(diam_dph**2))/(18*kinvis)) ![m/s]
!! write(*,*) 'CSF .ne. 0.0 --> Diameter of dph : 1< d <= 100 micrometers, settling =' ,w_dph_m
elseif(diam_dph .gt. 0.0001 .and. diam_dph .le. 0.001 )then
! w_dph_m =-(((Rdph/densFlu)*g*(diam_dph**2))/(18*kinvis)) ![m/s]
w_dph_m=(1/(18*(kinvis*densFlu)))*(1/CSF_dph_calc)*(Rdph/densFlu)*g*(diam_dph)**2 ![m/s]
write(*,*) 'CSF .ne. 1.0 --> Diameter of dph : 1< d <= 100 micrometers, settling =' ,w_dph_m
elseif(diam_dph .gt. 0.0001 .and. diam_dph .lt. 0.001 )then
! If the diameter of dph (d) --> 100< d micrometers (VanRijn 1993)
w_dph_m= ((10.0*kinvis)/diam_dph)*(((1+((0.01*(Rdph/densFlu)*g*((diam_dph)**3.0))/(kinvis**2.0)))**0.5)-1) ![m/s]
! w_dph_m = -(((10*kinvis)/diam_dph)*&
! ((1+((0.01*(Rdph/densFlu)*g*(diam_dph)**3.0) /kinvis**2.0)**0.5) -1)) ![m/s]
!! write(*,*) 'CSF .ne. 0.0 --> Diameter of dph : 100< d micrometers, settling =' ,w_dph_m
elseif(diam_dph .gt. 0.001) then
write(*,*) 'CSF .ne. 1.0 --> Diameter of dph : 100< d micrometers, settling =' ,w_dph_m
elseif(diam_dph .ge. 0.001) then
! If the diameter of dph (d) --> d > 1000 micrometers (VanRijn 1993)
w_dph_m = -(1.1*((Rdph/densFlu)*g*diam_dph)**0.5) ![m/s]
!! write(*,*) 'Diameter of dph : d > 1000 micrometers, settling =' ,w_dph_m
! w_dph_m = (1.1*((Rdph/densFlu)*g*diam_dph)**0.5) ![m/s]
w_dph_m = (0.93*sqrt(Rdph*g*diam_dph/densFlu)) ![m/s]
write(*,*) 'Diameter of dph : d > 1000 micrometers, settling =' ,w_dph_m
endif
endif
!--Dead Zooplankton
if (CSF_dzo .eq. 1.0) then ! Considered as a sphere
w_dzo_m = -(((Rdzo/densFlu)*g*(diam_dzo**2))/(18*kinvis)) ![m/s]
!! write(*,*) 'CSF_dzo = 0 --> Sphere, then Stokes Law ',w_dzo_m
! w_dzo_m = -(((Rdzo/densFlu)*g*(diam_dzo**2))/(18*kinvis)) ![m/s]
w_dzo_m=(1/(18*(kinvis*densFlu)))*(1/CSF_dzo_calc)*(Rdzo/densFlu)*g*(diam_dzo)**2 ![m/s]
!! write(*,*) 'CSF_dzo = 1 --> Sphere, then Stokes Law ',w_dzo_m
! Comparaison with the Stokes range ! VanRijn 1993
Re_dzo = abs(w_dzo_m*(diam_dzo/kinvis))
if (Re_dzo .gt. 1.0) then
......@@ -1597,47 +1641,48 @@ else if (Phys_w .eq. 5.0) then !#5
else ! No spherical
if(diam_dzo .le. 0.0001 )then
! If the diameter of dzo (d) --> 1 < d <= 100 micrometers (VanRijn 1993)
w_dzo_m =-(((Rdzo/densFlu)*g*(diam_dzo**2))/(18*kinvis)) ![m/s]
!! write(*,*) 'CSF .ne. 0.0 --> Diameter of dzo: 1< d <= 100 micrometers, settling =' ,w_dzo_m
elseif(diam_dzo .gt. 0.0001 .and. diam_dzo .le. 0.001)then
! w_dzo_m =-(((Rdzo/densFlu)*g*(diam_dzo**2))/(18*kinvis)) ![m/s]
w_dzo_m=(1/(18*(kinvis*densFlu)))*(1/CSF_dzo_calc)*(Rdzo/densFlu)*g*(diam_dzo)**2 ![m/s]
!! write(*,*) 'CSF .ne.1.0 --> Diameter of dzo: 1< d <= 100 micrometers, settling =' ,w_dzo_m
elseif(diam_dzo .gt. 0.0001 .and. diam_dzo .lt. 0.001)then
! If the diameter of dzo (d) --> 100< d micrometers (VanRijn 1993)
w_dzo_m= ((10.0*kinvis)/diam_dzo)*(((1+((0.01*(Rdzo/densFlu)*g*((diam_dzo)**3.0))/(kinvis**2.0)))**0.5)-1) ![m/s]
! w_dzo_m = -(((10*kinvis)/diam_dzo)*&
! ((1+((0.01*(Rdzo/densFlu)*g*(diam_dzo)**3.0) /kinvis**2.0)**0.5) -1)) ![m/s]
!! write(*,*) 'CSF .ne. 0.0 --> Diameter of dzo : 100< d micrometers, settling =' ,w_dzo_m
elseif(diam_dzo .gt. 0.001) then
!! write(*,*) 'CSF .ne. 1.0 --> Diameter of dzo : 100< d micrometers, settling =' ,w_dzo_m
elseif(diam_dzo .ge. 0.001) then
! If the diameter of Dzo (d) --> d > 1000 micrometers (VanRijn 1993)
w_dzo_m = -(1.1*((Rdzo/densFlu)*g*diam_dzo)**0.5) ![m/s]
! w_dzo_m = (1.1*((Rdzo/densFlu)*g*diam_dzo)**0.5) ![m/s]
w_dzo_m = (0.93*sqrt(Rdzo*g*diam_dzo/densFlu)) ![m/s]
!! write(*,*) 'Diameter of Dzo : d > 1000 micrometers, settling =' ,w_dzo_m
endif
endif
!--Fecal pellets
write(*,*) 'CSF_fp_Calculated',CSF_fp_calc
write(*,*) 'diam_fp',diam_fp
if (CSF_fp .eq. 1.0) then ! Considered as a sphere
w_fp_m = -(((Rfp/densFlu)*g*(diam_fp**2))/(18*kinvis)) ![m/s]
!! write(*,*) 'CSF_fp = 0 --> Sphere, then Stokes Law ',w_fp_m
! w_fp_m = -(((Rfp/densFlu)*g*(diam_fp**2))/(18*kinvis)) ![m/s]
w_fp_m=(1/(18*(kinvis*densFlu)))*(1/CSF_fp_calc)*(Rfp/densFlu)*g*(diam_fp)**2 ![m/s]
write(*,*) 'CSF_fp = 1 --> Sphere, then Stokes Law ',w_fp_m
! Comparaison with the Stokes range ! VanRijn 1993
Re_fp = abs(w_fp_m*(diam_fp/kinvis))
if (Re_fp .gt. 1.0) then
w_fp_m = -diam_fp**0.5/secs_pr_day ![m/s]
!! write(*,*) 'Reynolds number for Fecal pellets > 1',w_fp_m
write(*,*) 'Reynolds number for Fecal pellets > 1',w_fp_m
endif
else ! No spherical
if( diam_fp .le. 0.0001 )then
! If the diameter of fp (d) --> 1 < d <= 100 micrometers (VanRijn 1993)
w_fp_m =-(((Rfp/densFlu)*g*(diam_fp**2))/(18*kinvis)) ![m/s]
!! write(*,*) 'CSF .ne. 0.0 --> Diameter of fp: 1< d <= 100 micrometers, settling =' ,w_fp_m
elseif(diam_fp .gt. 0.0001 .and. diam_fp .le. 0.001)then
! w_fp_m =-(((Rfp/densFlu)*g*(diam_fp**2))/(18*kinvis)) ![m/s]
w_fp_m=(1/(18*(kinvis*densFlu)))*(1/CSF_fp_calc)*(Rfp/densFlu)*g*(diam_fp)**2 ![m/s]
write(*,*) 'CSF .ne. 1.0 --> Diameter of fp: 1< d <= 100 micrometers, settling =' ,w_fp_m
elseif(diam_fp .gt. 0.0001 .and. diam_fp .lt. 0.001)then
! If the diameter of fp (d) --> 100< d micrometers (VanRijn 1993)
w_fp_m= ((10.0*kinvis)/diam_fp)*(((1+((0.01*(Rfp/densFlu)*g*((diam_fp)**3.0))/(kinvis**2.0)))**0.5)-1) ![m/s]
! w_fp_m = -(((10*kinvis)/diam_fp)*&
! ((1+((0.01*(Rfp/densFlu)*g*(diam_fp)**3.0) /kinvis**2.0)**0.5) -1)) ![m/s]
!! write(*,*) 'CSF .ne. 0.0 --> Diameter of fp : 100< d micrometers, settling =' ,w_fp_m
elseif(diam_fp .gt. 0.001) then
write(*,*) 'CSF .ne. 1.0 --> Diameter of fp : 100< d micrometers, settling =' ,w_fp_m
elseif(diam_fp .ge. 0.001) then
! If the diameter of Fp (d) --> d > 1000 micrometers (VanRijn 1993)
! w_fp_m = -(1.1*((Rfp/densFlu)*g*diam_fp)**0.5) ![m/s]
w_fp_m = -(1.1*((Rfp/densFlu)*g*diam_fp)**0.5) ![m/s]
!! write(*,*) 'Diameter of Fp : d > 1000 micrometers, settling =' ,w_fp_m
! w_fp_m = (1.1*((Rfp/densFlu)*g*diam_fp)**0.5) ![m/s]
w_fp_m = (0.93*sqrt(Rdzo*g*diam_dzo/densFlu)) ![m/s]
write(*,*) 'Diameter of Fp : d > 1000 micrometers, settling =' ,w_fp_m
endif
endif
else !#5
......@@ -1676,7 +1721,6 @@ write(*,*) 'Reynolds number for fecal pellets > 1'
endif !#9
endif
!Everyone will settle at the end of the loop (see below)
......@@ -2155,6 +2199,7 @@ else !#2.1
endif !#2.1
!! ---Determination of physic_Br
physic_Br = (2*kB*T_degK)/(3*dynvis)
!-------------------------------------------------------------------------------------
!-------------------------------------------------------------------------------------
......@@ -2320,14 +2365,16 @@ endif !#1
!-----------------------------------------------------------------------------------
! SIZE Marine Snow with aggregation
!-----------------------------------------------------------------------------------
! ---Maximum size at dissagregation (Alldredge 1990)
if(dm_msn .eq. 1.0) then
diam_msn_max = coef1*(eps(ci))**(-coef2) ! [m]
write(*,*)'At depth-----',ci
write(*,*)'Maximum size diameter of Msn from eps :', diam_msn_max
else
! ---Maximum size at dissagregation
if(dm_msn .eq. 1.0) then !--» Comparaison with CFL limit
diam_msn_max = ((CFL/0.93)**2)*(1/(g*(Rmsn/densFlu)))
else !--» From the nml
diam_msn_max = diam_msn_us ! [m]
if (diam_msn_us .gt. ((CFL/0.93)**2)*(1/(g*(Rmsn/densFlu))) ) then
write(*,*)'The Max. Diam mentionned in the nml do not allow to respect CFL limit',ci
stop
endif
endif
! ---Flux from particules to msn [mmol/m3/s]
......@@ -2604,19 +2651,17 @@ endif
! We want to use a calculated settling velocity for the msn
! Settling velocity send to the advection scheme as well as the size of the msn
!-------------------------------------------------------------------------------------
write(*,*)'Depth',ci
write(*,*)'[msn]',cc(d4,ci)
write(*,*) 'Diameter of msn :',cc(size_msn,ci)
!--» cc(size_msn,ci) --> is the diameter after coag and frag
Rmsn = (rho_msn-densFlu)
!--» cc(size_msn,ci) --> is the diameter after coag and frag
!if (cc(d4,ci) .le. cons_min) then
! w_msn_m = 0.0
! write(*,*)'[msn] lt Cons_min, settling velocity set to :',w_msn_m
if (cc(d4,ci) .le. cons_min) then
w_msn_m = 0.0
write(*,*)'[msn] lt Cons_min, settling velocity set to :',w_msn_m
!--» We set here the concentration limit in the water column from free settling of marine snow vs flocculation settling (Metha 1989)
!elseif (cc(d4,ci) .lt. cons_max) then !#1
if (cc(d4,ci) .lt. cons_max) then !#1
elseif (cc(d4,ci) .lt. cons_max) then !#1
! if (cc(d4,ci) .lt. cons_max) then !#1
!! --- Calculated by value from the .nml
if (w_msnow .eq. 0.0 ) then !#2
w_msn_m = w_msn ![m/s]
......@@ -2647,108 +2692,47 @@ write(*,*) 'Diameter of msn :',cc(size_msn,ci)
else if (w_msnow .eq. 4.0) then !#2
if(CSF .ge. 0.0 .and. CSF.lt. 0.4) then !#2.3
CSF_msn = 2.18-(2.09*CSF)
CSF_msn_calc = 2.18-(2.09*CSF)
else if (CSF .ge. 0.4 .and. CSF .lt. 0.8) then!#2.3
CSF_msn = 0.946*(CSF)**(-0.378)
CSF_msn_calc = 0.946*(CSF)**(-0.378)
else if (CSF .ge. 0.8 .and. CSF .le. 1.0) then!#2.3
CSF_msn = 1.0 ! consider as a sphere
CSF_msn_calc = 1.0 ! consider as a sphere
else !#2.3
write (*,*) 'Error in CSF values for Marine snow : CSF .NE. [0-1]'
endif !#2.3
w_msn_m=(1/(18*(kinvis*densFlu)))*(1/CSF_msn)*(Rmsn)*g*(cc(size_msn,ci))**2 ![m/s]
elseif (w_msnow .eq. 5.0) then !#2!
! if( diam_msn_us .gt. 0.000001 .and. diam_msn_us .le. 0.0001 )then
write(*,*) 'Diameter of msn :',cc(size_msn,ci)
if(cc(size_msn,ci) .le. 0.0001 )then
! If the diameter of Msn (d) --> 1< d <= 100 micrometers (VanRijn 1993)
w_msn_m = -(((Rmsn/densFlu)*g*(cc(size_msn,ci)**2))/(18*kinvis)) ![m/s]
write(*,*) 'Diameter of msn : d <= 100 micrometers, settling (Stokes Law is used !) =' ,w_msn_m
elseif(cc(size_msn,ci) .gt. 0.0001 .and. cc(size_msn,ci) .lt. 0.001 ) then
! If the diameter of Msn (d) --> 100< d <= 1000 micrometers (VanRijn 1993)
w_msn_m = -(((10*kinvis)/cc(size_msn,ci))*&
((1+((0.01*(Rmsn/densFlu)*g*cc(size_msn,ci)**3.0) /kinvis**2.0)**0.5) -1)) ![m/s]
write(*,*) 'Diameter of msn : 100< d <= 1000 micrometers, settling =' ,w_msn_m
else !(cc(size_msn,ci).gt. 0.001) then
! If the diameter of Msn (d) --> d > 1000 micrometers (VanRijn 1993)
w_msn_m = -(1.1*((Rmsn/densFlu)*g*cc(size_msn,ci))**0.5) ![m/s]
write(*,*) 'Diameter of msn : d > 1000 micrometers, settling =' ,w_msn_m
endif
elseif (w_msnow .eq. 6.0) then !#2!
if (CSF .eq. 1.0) then ! Considered as a sphere
w_msn_m = -(((Rmsn/densFlu)*g*(cc(size_msn,ci)**2))/(18*kinvis)) ![m/s]
write(*,*) 'CSF_msn = 0 --> Sphere, then Stokes Law ',w_msn_m
! Comparaison with the Stokes range ! VanRijn 1993
Re_msn = abs(w_msn_m*(cc(size_msn,ci)/kinvis))
if (Re_msn .gt. 1.0) then
w_msn_m = -(cc(size_msn,ci)**0.5/secs_pr_day) ![m/s]
write(*,*) 'Reynolds number for msn > 1',w_msn_m
endif
else ! No spherical
if(cc(size_msn,ci).le. 0.0001 )then
! If the diameter of msn (d) --> 1 < d <= 100 micrometers (VanRijn 1993)
w_msn_m =-(((Rmsn/densFlu)*g*(cc(size_msn,ci)**2))/(18*kinvis)) ![m/s]
write(*,*) 'CSF .ne. 0.0 --> Diameter of msn: 1< d <= 100 micrometers, settling =' ,w_msn_m
elseif(cc(size_msn,ci) .gt. 0.0001 )then
! If the diameter of dzo (d) --> 100< d micrometers (VanRijn 1993)
w_msn_m = -(((10*kinvis)/cc(size_msn,ci))*&
((1+((0.01*(Rmsn/densFlu)*g*(cc(size_msn,ci))**3.0) /kinvis**2.0)**0.5) -1)) ![m/s]
write(*,*) 'CSF .ne. 0.0 --> Diameter of msn : 100< d micrometers, settling =' ,w_msn_m
endif
endif
elseif (w_msnow .eq. 7.0) then !#2!
w_msn_m=(1/(18*(kinvis*densFlu)))*(1/CSF_msn_calc)*(Rmsn)*g*(cc(size_msn,ci))**2 ![m/s]
!! ---[Komar 1978] and VanRijn 1993
elseif (w_msnow .eq. 5.0) then !#2!
! If the diameter of Msn (d) --> d <= 100 micrometers (Komar 1978)
if(cc(size_msn,ci) .le. 0.0001 )then
if(cc(size_msn,ci) .le. 0.0001 )then
if(CSF .ge. 0.0 .and. CSF.lt. 0.4) then !#2.3
CSF_msn = 2.18-(2.09*CSF)
CSF_msn_calc = 2.18-(2.09*CSF)
else if (CSF .ge. 0.4 .and. CSF .lt. 0.8) then!#2.3
CSF_msn = 0.946*(CSF)**(-0.378)
CSF_msn_calc = 0.946*(CSF)**(-0.378)
else if (CSF .ge. 0.8 .and. CSF .le. 1.0) then!#2.3
CSF_msn = 1.0 ! consider as a sphere
CSF_msn_calc = 1.0 ! consider as a sphere
else !#2.3
write (*,*) 'Error in CSF values for Marine snow : CSF .NE. [0-1]'
endif !#2.3
w_msn_m=(1/(18*(kinvis*densFlu)))*(1/CSF_msn)*(Rmsn/densFlu)*g*(cc(size_msn,ci))**2 ![m/s]
w_msn_m=(1/(18*(kinvis*densFlu)))*(1/CSF_msn_calc)*(Rmsn/densFlu)*g*(cc(size_msn,ci))**2 ![m/s]
write(*,*) 'Diameter of msn : d <= 100 micrometers, settling (Stokes Law is used !) =' ,w_msn_m
! If the diameter of Msn (d) --> 100< d <= 1000 micrometers (VanRijn 1993)
elseif(cc(size_msn,ci) .gt. 0.0001 .and. cc(size_msn,ci) .lt. 0.001 ) then
elseif(cc(size_msn,ci) .gt. 0.0001 .and. cc(size_msn,ci) .lt. 0.001 ) then
w_msn_m= ((10.0*kinvis)/cc(size_msn,ci))*(((1+((0.01*(Rmsn/densFlu)*g*(cc(size_msn,ci)**3.0))/(kinvis**2.0)))**0.5)-1) ![m/s]
write(*,*) 'Diameter of msn : 100< d <= 1000 micrometers, settling =' ,w_msn_m
! w_msn_m = -(((10.0*kinvis)/cc(size_msn,ci))* &
! ((1+((0.01*(Rmsn/densFlu)*g*(cc(size_msn,ci)**3.0))/kinvis**2.0)**0.5) -1))
! If the diameter of Msn (d) --> d > 1000 micrometers (VanRijn 1993)
elseif (cc(size_msn,ci) .ge. 0.001 .and. cc(size_msn,ci) .le. diam_msn_max) then
! w_msn_m = -(1.1*(((Rmsn/densFlu)*g*(cc(size_msn,ci)))**0.5)) ![m/s]
! w_msn_m = -(((cc(size_msn,ci))**(1/2))/secs_pr_day)
w_msn_m = -(1.1*(((Rmsn/densFlu)*g*cc(size_msn,ci))**(1/2)))
! write(*,*) 'Diameter of msn : d > 1000 micrometers, settling =' ,w_msn_m
else
w_msn_m = w_msn
write(*,*) ' Diam_msn_max is Overpass, value form nml is used',w_msn_m
endif
if (abs(w_msn_m) .gt. (depth_bio/nlev)/dt_bio )then
write(*,*) 'CFL Constrain is OVERPASS for W-msn'
w_msn_m = w_msn
write(*,*) 'settling',w_msn_m
endif
write(*,*) 'Diameter of msn : 100< d <= 1000 micrometers, settling =' ,w_msn_m
elseif( cc(size_msn,ci) .ge. 0.001 ) then
w_msn_m = (0.93*sqrt(Rmsn*g*cc(size_msn,ci)/densFlu)) ![m/s]
write(*,*) 'Diameter of msn : d > 1000 micrometers, settling =' ,w_msn_m
else
write(*,*) ' No size mentioned for Msn',cc(size_msn,ci)
stop
endif
else !#2!