Commit b15ffe85ad30e3acc49b740da8b454d0fc2cf577

Authored by Gwenaelle Gremion
1 parent 5652bb2b
Exists in master and in 1 other branch snow

Depot initial du modele bio_polynow

nml/bio_polynow.nml 0 → 100644
... ... @@ -0,0 +1,152 @@
  1 +#$Id$
  2 +!-------------------------------------------------------------------------------
  3 +! Fasham et al. biological model with modifications by Kuehn and Radach
  4 +!
  5 +! numc= number of compartments for geobiochemical model
  6 +!
  7 +! p_initial= initial phytoplankton concentration [mmol n/m3]
  8 +! z_initial= initial zooplakton concentration [mmol n/m3]
  9 +! b_initial= initial bacteria concentration [mmol n/m3]
  10 +! dph_initial= initial dph concentration [mmol n/m3]
  11 +! dzo_initial= initial dzo concentration [mmol n/m3]
  12 +! fp_initial= initial fp concentration [mmol n/m3]
  13 +! msn_initial= initial dzo concentration [mmol n/m3]
  14 +! n_initial= *** see obs.nml *** [mmol n/m3]
  15 +! a_initial= *** see obs.nml *** [mmol n/m3]
  16 +! l_initial= initial LDON concentration [mmol n/m3]
  17 +! p0 = minimum phytoplankton concentration [mmol n/m3]
  18 +! z0 = minimum zooplakton concentration [mmol n/m3]
  19 +! b0 = minimum bacteria concentration [mmol n/m3]
  20 +! mu5 = nitrification rate [1/day] !!GG-CHG1
  21 +! vp = maximum phytoplankton uptake rate [1/day]
  22 +! alpha = slope of the PI-curvea [m2/(W day)]
  23 +! inib = inhibition slope of the PI-curve (positive) [m2/(W day)]
  24 +! kc = attenuation constant for the self shading effect [m**2/mmol N]
  25 +! k1 = half saturation constant nitrate uptake [mmol n/m3]
  26 +! k2 = half saturation constant ammonium uptake [mmol n/m3]
  27 +! mu1 = phytoplankton mortality rate [1/day]
  28 +! k5 = half saturation constant phytoplankton mortality [mmol n/m3]
  29 +! gamma = exudation fraction [-]
  30 +! capt = Percentage of living phyto. captured in msn [%/day] - GG-D
  31 +! sp_mort = Phytoplankton non grazing mortality [1/day] - GG-D
  32 +! sp_mort2 = Quadratic mortality/aggrgation rate coefficient [1/day] - GG-D
  33 +! w_p = phytoplankton settling velocity [m/day]
  34 +! stip = Stickiness of choosen Phytoplankton species [-] - GG-D
  35 +! stidph = Stickiness of dead Phytoplankton [-] - GG-D
  36 +! gmax = maximum ingestion rate [1/day]
  37 +! k3 = half saturation constant ingestion [mmol n/m3]
  38 +! beta = grazing efficiency [-]
  39 +! betamsn = grazing efficiency on marine snow [-] - GG-D
  40 +! mu2 = maximum zooplankton loss rate [1/day]
  41 +! k6 = half saturation zooplankton loss [mmol n/m3]
  42 +! delta = fractional zooplankton loss to LDON [-]
  43 +! epsi = fractional zooplankton loss to ammonium [-]
  44 +! r1 = grazing preference phytoplankton [-]
  45 +! r2 = grazing preference bacteria [-]
  46 +! r3 = grazing preference dead phytoplankton (dph) [-] - GG-D
  47 +! r4 = grazing preference dead zooplankton (dzo) [-] - GG-D
  48 +! r5 = grazing preference fecal pellets (fp) [-] - GG-D
  49 +! r6 = grazing preference marine snow (msn) [-] - GG-D
  50 +!zingest = Proportion of grazed matter added to zoo. biomass [-] - GG-D
  51 +! eg = Percentage of eggestion [%/day] - GG-D
  52 +! stidzo = Stickiness of choosen zooplankton species [-] - GG-D
  53 +! stifp = Stickiness of fecal pellets [-] - GG-D
  54 +! pmin = intensity rariadtion in the water column
  55 +! w_zmax = Max. swimming speed for zoo (not exceed 320) [1/day]
  56 +! bertha = amplitud coefficient
  57 +! parcrit =min. phyto concentration needed for zooplankton
  58 +! vb = maximum bacterial uptake rate [1/day]
  59 +! k4 = half saturation bacterial uptake [mmol n/m3]
  60 +! mu3 = bacteria excretion rate [1/day]
  61 +! eta = uptake ratio ammonium:LDON [-]
  62 +! mbac = Percentage of bacerias captured in msn [%/day] - GG-D
  63 +! dphlossl = Dph breakdown rate [%/day] - GG-D
  64 +! dzolossl = Percentage of Dzo loss in LDON [%/day] - GG-D
  65 +! dzolossb = Percentage of Dzo loss in bacteria respiration [%/day] - GG-D
  66 +! fplossl = Percentage of fp loss in LDON [%/day] - GG-D
  67 +! fplossb = Percentage of fp loss in bacteria respiration [%/day] - GG-D
  68 +! w_d1 = [1/day]
  69 +! w_d2 = [1/day]
  70 +! w_d3 = [1/day]
  71 +! w_d4 = [1/day]
  72 +! mldon = Percentage of LDON used to constitute matrice of msn [%/day] - GG-D
  73 +!lmin = LDON limit concentration to become the matrix of msn [mmol n/m3]- GG-D
  74 +!Coag_coef = Specification by user of utilisation of model calculated Coagulation coefficient(false) or given parameter(true) [true.false] - GG-D
  75 +!betap = Coagulation coefficient of Phytoplankton [1/day]- GG-D
  76 +!betadph = Coagulation coefficient of dead Phytoplankton [1/day]- GG-D
  77 +!betadzo = Coagulation coefficient of deadzooplankton [1/day]- GG-D
  78 +!betafp = Coagulation coefficient of fecal pellets [1/day]- GG-D
  79 +!-------------------------------------------------------------------------------
  80 + &bio_polynow_nml
  81 + numc= 10
  82 + p_initial= 0.012
  83 + z_initial= 0.012
  84 + b_initial= 0.001
  85 + dph_initial= 0.012
  86 + dzo_initial= 0.012
  87 + fp_initial= 0.012
  88 + msn_initial= 0.012
  89 + l_initial= 0.1
  90 + p0= 0.0001
  91 + z0= 0.0001
  92 + b0= 0.0001
  93 + mu5= 0.1
  94 + vp= 0.3
  95 + alpha= 0.04
  96 + inib= 0.06
  97 + kc= 0.03
  98 + k1= 1.0
  99 + k2= 0.8
  100 + mu1= 0.05
  101 + k5= 0.2
  102 + gamma= 0.0
  103 + capt= 0.0
  104 + sp_mort= 0.0
  105 + sp_mort2= 0.0
  106 + w_p= 0.5
  107 + stip= 0.0
  108 + stidph= 0.0
  109 + gmax= 0.6
  110 + k3= 1.0
  111 + beta= 0.625
  112 + betamsn= 0.0
  113 + mu2= 0.3
  114 + k6= 0.2
  115 + delta= 0.0
  116 + epsi= 0.70
  117 + r1= 0.1
  118 + r2= 0.2
  119 + r3= 0.3
  120 + r4= 0.1
  121 + r5= 0.2
  122 + r6= 0.1
  123 + zingest= 0.0
  124 + eg= 0.0
  125 + stidzo= 0.0
  126 + stifp= 0.0
  127 + pmin= 0.7
  128 + w_zmax= 320
  129 + bertha= 0.05
  130 + parcrit= 10
  131 + vb= 0.
  132 + k4= 0.5
  133 + mu3= 0.03
  134 + eta= 0.0
  135 + mbac= 0.0
  136 + dphlossl= 0.0
  137 + dzolossl= 0.0
  138 + dzolossb= 0.0
  139 + fplossl= 0.0
  140 + fplossb= 0.0
  141 + w_d1= 0
  142 + w_d2= 0
  143 + w_d3= 0
  144 + w_d4= 0
  145 + mldon= 0.0
  146 + lmin= 0.0
  147 + coag_coef= .false.
  148 + betap= 0.0
  149 + betadph= 0.0
  150 + betadzo= 0.0
  151 + betafp= 0.0
  152 + /
... ...
src/extras/bio/Makefile
... ... @@ -16,8 +16,9 @@ bio_sed.F90 \
16 16 bio_fasham.F90 \
17 17 bio_ismer.F90 \
18 18 bio_gsj.F90 \
19   -bio_save.F90 \
20 19 bio_nocera.F90 \
  20 +bio_polynow.F90 \
  21 +bio_save.F90 \
21 22 bio_npzd4.F90 \
22 23 nitrate.F90 \
23 24 ammonium.F90 \
... ... @@ -34,6 +35,7 @@ ${LIB}(bio_ismer.o) \
34 35 ${LIB}(bio_gsj.o) \
35 36 ${LIB}(bio_fasham.o) \
36 37 ${LIB}(bio_nocera.o) \
  38 +${LIB}(bio_polynow.o) \
37 39 ${LIB}(bio_npzd4.o) \
38 40 ${LIB}(bio_sed.o) \
39 41 ${LIB}(bio_save.o) \
... ...
src/extras/bio/ammonium.F90
... ... @@ -180,6 +180,11 @@
180 180 do i=1,nlev
181 181 amm(i) = cc(6,i)
182 182 end do
  183 + else if (bio_model.eq.9) then ! GG-A
  184 + do i=1,nlev
  185 + amm(i) = cc(6,i)
  186 + end do
  187 +
183 188 end if
184 189 #endif
185 190  
... ...
src/extras/bio/bio.F90
... ... @@ -48,9 +48,13 @@
48 48 use bio_mab, only : init_bio_mab,init_var_mab,var_info_mab
49 49 use bio_mab, only : light_mab,surface_fluxes_mab,do_bio_mab
50 50  
  51 + use bio_polynow, only : init_bio_polynow,init_var_polynow,var_info_polynow !GG-A
  52 + use bio_polynow, only : light_polynow,do_bio_polynow !GG-A
  53 +
51 54 use output, only : out_fmt,write_results,ts
52 55  
53 56 use util
  57 +
54 58 !
55 59 ! default: all is private.
56 60 private
... ... @@ -58,6 +62,9 @@
58 62 ! !PUBLIC MEMBER FUNCTIONS:
59 63 public init_bio, set_env_bio, do_bio, get_bio_updates, clean_bio
60 64 logical, public :: bio_calc=.false.
  65 +
  66 +
  67 +! REALTYPE,public, dimension(:), allocatable :: eps_ !GG-T
61 68 !
62 69 ! !REVISION HISTORY:!
63 70 ! Original author(s): Hans Burchard & Karsten Bolding
... ... @@ -353,6 +360,17 @@
353 360  
354 361 call var_info_npzd4()
355 362  
  363 + case (10) ! The model for the north Water polynya - NPZD- Sedimentation GG-A
  364 +
  365 + call init_bio_polynow(namlst,'bio_polynow.nml',unit)
  366 +
  367 + call allocate_memory(nlev)
  368 +
  369 + call init_var_polynow(nlev)
  370 +
  371 + call var_info_polynow()
  372 +
  373 +
356 374 case default
357 375 stop "bio: no valid biomodel specified in bio.nml !"
358 376 end select
... ... @@ -448,9 +466,9 @@
448 466 ! modules
449 467 !
450 468 ! !INTERFACE:
451   - subroutine set_env_bio(nlev,h_,t_,s_,nit_,amm_,hcb_,rho_,nuh_,rad_,wind_, &
  469 + subroutine set_env_bio(nlev,h_,t_,s_,nit_,amm_,hcb_,rho_,nuh_,rad_,wind_, &
452 470 I_0_,w_,w_adv_ctr_)
453   -!
  471 +
454 472 ! !DESCRIPTION:
455 473 !
456 474 ! !USES:
... ... @@ -471,6 +489,8 @@
471 489 REALTYPE, intent(in) :: I_0_
472 490 REALTYPE, optional, intent(in) :: w_(0:nlev)
473 491 integer, optional, intent(in) :: w_adv_ctr_
  492 +
  493 +
474 494 !
475 495 ! !REVISION HISTORY:
476 496 ! Original author(s): Hans Burchard & Karsten Bolding
... ... @@ -494,6 +514,9 @@
494 514 if (present(w_)) w = w_
495 515 if (present(w_adv_ctr_)) w_adv_ctr = w_adv_ctr_
496 516  
  517 +
  518 +
  519 +
497 520 return
498 521 end subroutine set_env_bio
499 522 !EOC
... ... @@ -742,6 +765,10 @@
742 765 case (9)
743 766 call light_npzd4(nlev,bioshade_feedback)
744 767 call ode_solver(ode_method,numc,nlev,dt_eff,cc,do_bio_npzd4)
  768 + case (10)
  769 + call light_polynow(nlev,bioshade_feedback)
  770 + call ode_solver(ode_method,numc,nlev,dt_eff,cc,do_bio_polynow)
  771 +
745 772 end select
746 773  
747 774 end do
... ... @@ -820,6 +847,17 @@
820 847 if (allocated(var_units)) deallocate(var_units)
821 848 if (allocated(var_long)) deallocate(var_long)
822 849  
  850 +!Stickiness
  851 + if (allocated(sti_2p)) deallocate(sti_2p)
  852 + if (allocated(sti_pdph)) deallocate(sti_pdph)
  853 + if (allocated(sti_pdzo)) deallocate(sti_pdzo)
  854 + if (allocated(sti_pfp)) deallocate(sti_pfp)
  855 + if (allocated(sti_2dph)) deallocate(sti_2dph)
  856 + if (allocated(sti_dphdzo)) deallocate(sti_dphdzo)
  857 + if (allocated(sti_dphfp)) deallocate(sti_dphfp)
  858 + if (allocated(sti_2dzo)) deallocate(sti_2dzo)
  859 + if (allocated(sti_dzofp)) deallocate(sti_dzofp)
  860 + if (allocated(sti_2fp)) deallocate(sti_2fp)
823 861 !DD
824 862 if (allocated(lumlim1)) deallocate(lumlim1)
825 863 if (allocated(nitlim1)) deallocate(nitlim1)
... ... @@ -829,6 +867,16 @@
829 867 if (allocated(ammlim2)) deallocate(ammlim2)
830 868 if (allocated(ppnet)) deallocate(ppnet)
831 869  
  870 +
  871 + if (allocated(flux_msn)) deallocate(flux_msn)
  872 + if (allocated(Flux_P)) deallocate(Flux_P)
  873 + if (allocated(Flux_D1)) deallocate(Flux_D1)
  874 + if (allocated(Flux_D2)) deallocate(Flux_D2)
  875 + if (allocated(Flux_D3)) deallocate(Flux_D3)
  876 +
  877 + if (allocated(size_msnow)) deallocate(size_msnow)
  878 + if (allocated(w_msn_lev)) deallocate(w_msn_lev)
  879 +
832 880 ! The external provide arrays
833 881 if (allocated(h)) deallocate(h)
834 882 if (allocated(nuh)) deallocate(nuh)
... ... @@ -912,6 +960,27 @@
912 960 allocate(var_long(numc),stat=rc)
913 961 if (rc /= 0) stop 'init_bio(): Error allocating var_long)'
914 962  
  963 +!Stickiness
  964 + allocate(sti_2p(0:nlev),stat=rc)
  965 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_2p)'
  966 + allocate(sti_pdph(0:nlev),stat=rc)
  967 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_pdph)'
  968 + allocate(sti_pdzo(0:nlev),stat=rc)
  969 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_pdzo)'
  970 + allocate(sti_pfp(0:nlev),stat=rc)
  971 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_pfp)'
  972 + allocate(sti_2dph(0:nlev),stat=rc)
  973 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_2dph)'
  974 + allocate(sti_dphdzo(0:nlev),stat=rc)
  975 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_dphdzo)'
  976 + allocate(sti_dphfp(0:nlev),stat=rc)
  977 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_dphfp)'
  978 + allocate(sti_2dzo(0:nlev),stat=rc)
  979 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_2dzo)'
  980 + allocate(sti_dzofp(0:nlev),stat=rc)
  981 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_dzofp)'
  982 + allocate(sti_2fp(0:nlev),stat=rc)
  983 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_2fp)'
915 984 !DD
916 985  
917 986 allocate(lumlim1(0:nlev),stat=rc)
... ... @@ -935,6 +1004,28 @@
935 1004 allocate(ppnet(0:nlev),stat=rc)
936 1005 if (rc /= 0) stop 'init_bio(): Error allocating (ppnet)'
937 1006  
  1007 +
  1008 +
  1009 + allocate(flux_msn(0:nlev),stat=rc)
  1010 + if (rc /= 0) stop 'init_bio(): Error allocating (flux_msn)'
  1011 +
  1012 + allocate(Flux_P(0:nlev),stat=rc)
  1013 + if (rc /= 0) stop 'init_bio(): Error allocating (Flux_P)'
  1014 + allocate(Flux_D1(0:nlev),stat=rc)
  1015 + if (rc /= 0) stop 'init_bio(): Error allocating (Flux_D1)'
  1016 + allocate(Flux_D2(0:nlev),stat=rc)
  1017 + if (rc /= 0) stop 'init_bio(): Error allocating (Flux_D2)'
  1018 + allocate(Flux_D3(0:nlev),stat=rc)
  1019 + if (rc /= 0) stop 'init_bio(): Error allocating (Flux_D3)'
  1020 +
  1021 + allocate(size_msnow(0:nlev),stat=rc)
  1022 + if (rc /= 0) stop 'init_bio(): Error allocating (size_msnow)'
  1023 +
  1024 +
  1025 + allocate(w_msn_lev(0:nlev),stat=rc)
  1026 + if (rc /= 0) stop 'init_bio(): Error allocating (w_msn_lev)'
  1027 +
  1028 +
938 1029 ! The external provide arrays
939 1030 allocate(h(0:nlev),stat=rc)
940 1031 if (rc /= 0) stop 'init_bio(): Error allocating (h)'
... ...
src/extras/bio/bio_polynow.F90 0 → 100644
... ... @@ -0,0 +1,2757 @@
  1 +!$id: bio_polynow.F90,v 1.11 2016-05-05 11:49:15 dd Exp $
  2 +#include"cppdefs.h"
  3 +!-----------------------------------------------------------------------
  4 +!BOP
  5 +!
  6 +! !MODULE: bio_fasham --- Fasham et al. biological model \label{sec:bio-fasham}
  7 +!
  8 +! !INTERFACE:
  9 + module bio_polynow
  10 +!
  11 +!----DESCRIPTION:--------------------------------------------------------------
  12 +! The model developed by Fashametal1990
  13 +! uses nitrogen as 'currency' according to the evidence that in
  14 +! most cases nitrogen is the limiting macronutrient. It consists of
  15 +! seven state variables: phytoplankton, zooplankton, bacteria,
  16 +! particulate organic matter (detritus), dissolved organic matter
  17 +! and the nutrients nitrate and ammonium.
  18 +! The structure of the biogeochemical model in XXX states variables
  19 +! bacteria (bac),
  20 +! phytoplankton (phy),
  21 +! detritus (det),
  22 +! zooplankton (zoo),
  23 +! labile dissolved
  24 +! organic nitrogen (don),
  25 +! ammonium (amm) and nitrate (nit)
  26 +! XXX
  27 +
  28 +! The concentrations are in mmol N\m^-3,and all fluxes are conservative.
  29 +!---------------------------------------------------------------------------------
  30 +
  31 +! !USES:
  32 +! default: all is private.
  33 + use bio_var ! S,T,zlev
  34 + use output
  35 + use observations, only : aa,g2
  36 + use turbulence, only : eps
  37 + use meanflow, only : Rho_0
  38 + use eqstate, only : eqstate1 ! In situ density in kg.m-3
  39 +
  40 +
  41 + private
  42 +!
  43 +! !PUBLIC MEMBER FUNCTIONS:
  44 + public init_bio_polynow, init_var_polynow, var_info_polynow, &
  45 + light_polynow, do_bio_polynow, end_bio_polynow
  46 + REALTYPE, public,parameter :: pi= 3.141592654
  47 + REALTYPE, public,parameter :: g= 9.80665 !m/s2
  48 + REALTYPE :: pres = 10.1325! gauge pressure (absolute pressure - 10.1325 bar)
  49 + REALTYPE,public ::gauss_p
  50 +
  51 +
  52 +
  53 +!-----LOCAL VARIABLES:---------- from a namelist : bio_polynow.nml----------------------
  54 +
  55 +!INITIAL and Minimum concentration for the variable
  56 +
  57 + REALTYPE :: p_init_value=1.0
  58 + REALTYPE :: p_initial=0.01
  59 + REALTYPE :: z_p_gauss_init= 2.0
  60 + REALTYPE :: sigma_p=2.0
  61 +
  62 + REALTYPE :: zoo_init_value=1.0
  63 + REALTYPE :: z_initial=0.01
  64 + REALTYPE :: z_zoo_gauss_init= 2.0
  65 + REALTYPE :: sigma_zoo=2.0
  66 +
  67 + REALTYPE :: b_initial= 0.001
  68 +
  69 +! Nitrate and ammonium are initialized within the GOTM observation module
  70 +! REALTYPE :: n_initial= 8.3
  71 +! REALTYPE :: a_initial= 0.22
  72 +!Classes de détritus et LDON
  73 +
  74 + REALTYPE :: dph_init_value=1.0
  75 + REALTYPE :: dph_initial=0.01
  76 + REALTYPE :: z_dph_gauss_init= 2.0
  77 + REALTYPE :: sigma_dph=2.0
  78 +
  79 + REALTYPE :: dzo_init_value=1.0
  80 + REALTYPE :: dzo_initial=0.01
  81 + REALTYPE :: z_dzo_gauss_init= 2.0
  82 + REALTYPE :: sigma_dzo=2.0
  83 +
  84 + REALTYPE :: fp_init_value=1.0
  85 + REALTYPE :: fp_initial=0.01
  86 + REALTYPE :: z_fp_gauss_init= 2.0
  87 + REALTYPE :: sigma_fp=2.0
  88 +
  89 + REALTYPE :: msn_init_value=1.0
  90 + REALTYPE :: msn_initial=0.01
  91 + REALTYPE :: z_msn_gauss_init= 2.0
  92 + REALTYPE :: sigma_msn=2.0
  93 +
  94 + REALTYPE :: l_initial= 0.14
  95 + REALTYPE :: p0 = 0.0
  96 + REALTYPE :: z0 = 0.0
  97 + REALTYPE :: b0 = 0.0
  98 + REALTYPE :: mu5 = 0.02 !! GG-CHG1
  99 +!Phytoplankton
  100 + REALTYPE :: vp = 1.5
  101 + REALTYPE :: alpha = 0.065
  102 + REALTYPE :: inib = 0.05
  103 + REALTYPE, public :: kc = 0.03
  104 + REALTYPE :: k1 = 0.2
  105 + REALTYPE :: k2 = 0.8
  106 + REALTYPE :: mu1 = 0.05
  107 + REALTYPE :: k5 = 0.2
  108 + REALTYPE :: gamma = 0.05
  109 + REALTYPE :: txloss_p = 0.7 ! GG-D
  110 + REALTYPE :: txloss_dph = 0.05 ! GG-D
  111 +
  112 +!Zooplankton
  113 + REALTYPE :: gmax = 1.0
  114 + REALTYPE :: k3 = 1.0
  115 + REALTYPE :: beta = 0.625
  116 + REALTYPE :: mu2 = 0.3
  117 + REALTYPE :: k6 = 0.2
  118 + REALTYPE :: delta = 0.1
  119 + REALTYPE :: epsi = 0.70
  120 + REALTYPE :: eg = 0.05 ! GG-D
  121 + REALTYPE :: r1 = 0.55
  122 + REALTYPE :: r2 = 0.4
  123 + REALTYPE :: r3 = 0.05 !dph GG-D
  124 + REALTYPE :: r4 = 0.05 !dzo GG-D
  125 + REALTYPE :: r5 = 0.05 !fp GG-D
  126 + REALTYPE :: r6 = 0.05 !msn GG-D
  127 + REALTYPE :: zingest = 0.05 ! GG-D
  128 + REALTYPE :: txloss_dzo = 0.05 ! GG-D
  129 + REALTYPE :: txloss_fp = 0.05 ! GG-D
  130 +! Vertical migration(From Ariadna Nocera)
  131 + !LOGICAL and integer doesn't work :: Migra_zoo=.true.
  132 + REALTYPE :: Migra_zoo= 1.0
  133 + REALTYPE :: pmin = 0.05
  134 + REALTYPE :: w_zmax = 100.0 !! GG-B
  135 + REALTYPE :: bertha = 0.05 !! GG-B
  136 + REALTYPE :: parcrit = 0.02 !! GG-B
  137 +!Bacterias
  138 + REALTYPE :: vb = 1.2
  139 + REALTYPE :: remi = 0.1
  140 + REALTYPE :: k4 = 0.5
  141 + REALTYPE :: mu3 = 0.15
  142 + REALTYPE :: eta = 0.0
  143 + REALTYPE :: mbac = 0.0 ! GG-D
  144 + REALTYPE ::dphlossb =0.4
  145 + REALTYPE :: dphlossl = 10.0 ! GG-D
  146 + REALTYPE :: dzolossl = 10.0 ! GG-D
  147 + REALTYPE :: dzolossb = 10.0 ! GG-D
  148 + REALTYPE :: fplossl = 10.0 ! GG-D
  149 + REALTYPE :: fplossb = 10.0 ! GG-D
  150 + REALTYPE :: msnlossb =0.6
  151 +!LDON
  152 + REALTYPE :: leak=0.1
  153 + REALTYPE :: mldon = 0.02 ! GG-D
  154 + REALTYPE :: lmin = 0.02 ! GG-D
  155 +!detritus/Settling
  156 + ! LOGICAL :: Phys_w= .true.
  157 + REALTYPE :: size_w=0.0
  158 + REALTYPE :: Phys_w= 0.0
  159 + REALTYPE :: w_msnow= 0.0
  160 + REALTYPE :: w_p = -0.5
  161 + REALTYPE :: w_dph = -1.0 !!GG-C
  162 + REALTYPE :: w_dzo = -10.0 !!GG-C
  163 + REALTYPE :: w_fp = -100.0 !!GG-C
  164 + REALTYPE :: w_msn = -2.0 !!GG-C
  165 +
  166 + REALTYPE :: rho_p = 0.02
  167 + REALTYPE :: rho_dph = 0.02
  168 + REALTYPE :: rho_dzo = 0.02
  169 + REALTYPE :: rho_fp = 0.02
  170 + REALTYPE :: rho_msn = 0.02
  171 +!Aggregation
  172 +! LOGICAL :: Coag_coef=.true.
  173 + REALTYPE :: Coag_coef=0.0 ! If true : utilisation of given parameters / False : utilisation of model calculate coefficient
  174 +! Coefficient de Kernel sans calcul via la physique
  175 + REALTYPE :: betap_p = 0.2
  176 + REALTYPE :: betap_dph= 1
  177 + REALTYPE :: betap_dzo= 1
  178 + REALTYPE :: betap_fp= 1
  179 +
  180 + REALTYPE :: betadph_dph = 0.2
  181 + REALTYPE :: betadph_dzo= 1
  182 + REALTYPE :: betadph_fp= 1
  183 +
  184 + REALTYPE :: betadzo_dzo = 0.02
  185 + REALTYPE :: betadzo_fp = 0.02
  186 + REALTYPE :: betafp_fp = 0.02
  187 +!Calcul de la collision avec la physique
  188 + REALTYPE :: sti_cst = 0.0
  189 + REALTYPE :: stip_p = -0.5
  190 + REALTYPE :: stip_dph = -0.5
  191 + REALTYPE :: stip_dzo = -0.5
  192 + REALTYPE :: stip_fp = -0.5
  193 + REALTYPE :: stidph_dph = -0.5
  194 + REALTYPE :: stidph_dzo = -0.5
  195 + REALTYPE :: stidph_fp = -0.5
  196 + REALTYPE :: stidzo_dzo = -0.5
  197 + REALTYPE :: stidzo_fp = -0.5
  198 + REALTYPE :: stifp_fp = -0.5
  199 +!Collision rate and Settling
  200 + REALTYPE :: min_flux_msn = 2.0E-09
  201 + REALTYPE :: size_rand = 1.0
  202 + REALTYPE :: size_phy_us = -0.5
  203 + REALTYPE :: size_phy_up = -0.5
  204 + REALTYPE :: size_dph_us = 0.00001
  205 + REALTYPE :: size_dph_up = 0.00001
  206 + REALTYPE :: size_dzo_us= 0.000100
  207 + REALTYPE :: size_dzo_up= 0.000100
  208 + REALTYPE :: size_fp_us= 0.000050
  209 + REALTYPE :: size_fp_up= 0.000050
  210 + REALTYPE :: size_msn = -0.5
  211 +!Parametres pour l'aggregation physique
  212 + REALTYPE :: dynvis = -0.5
  213 + REALTYPE :: kinvis = -0.5
  214 + REALTYPE :: kB = -0.5
  215 +!Fragmentation - Concentration seuil d'agrégat avant qu'un pourcentage parte dans le dph
  216 + !logical :: Frag_meth=.true. !Utilisation de la physique ou pas pour la fragmentation
  217 +! integer :: Frag_meth=0.0
  218 + REALTYPE :: Frag_meth=0.0
  219 + REALTYPE :: swim_brk = 0.8
  220 +REALTYPE ::Floc_coef = 0.1
  221 +REALTYPE ::lim_size=3.0
  222 +!Tests parameter
  223 + REALTYPE ::betaBr=1.0
  224 + REALTYPE ::betaSh =1.0
  225 + REALTYPE ::betaDs =1.0
  226 + REALTYPE ::eps_const =1.0
  227 + REALTYPE ::eps_n =1.0
  228 + REALTYPE ::cons_min= 0.00001
  229 +
  230 + REALTYPE ::write_screen
  231 +
  232 + integer :: out_unit
  233 + integer, parameter :: p=1,z=2,b=3,d1=4,n=5,a=6,l=7,d2=8,d3=9,d4=10,aug_si_d4=11,taille_msn=12
  234 +! GG d1= dph , d2= dzo , d3= fp , d4 = msn, aug_si_d4= size_msn
  235 +
  236 +!EOP
  237 +!-----------------------------------------------------------------------
  238 +
  239 + contains
  240 +
  241 +!-----------------------------------------------------------------------
  242 +!BOP
  243 +!
  244 +! !IROUTINE: Initialise the bio module
  245 +!
  246 +! !INTERFACE:
  247 + subroutine init_bio_polynow(namlst,fname,unit)
  248 +!
  249 +! !DESCRIPTION:
  250 +! Here, the bio namelist bio_polynow.nml is read and
  251 +! various variables (rates and settling velocities)
  252 +! are transformed into SI units.
  253 +!
  254 +! !USES:
  255 + IMPLICIT NONE
  256 +!
  257 +! !INPUT PARAMETERS:
  258 + integer, intent(in) :: namlst
  259 + character(len=*), intent(in) :: fname
  260 + character(len=20) :: pfile
  261 + integer, intent(in) :: unit
  262 +!
  263 +! !REVISION HISTORY:
  264 +! Original author(s): Hans Burchard & Karsten Bolding
  265 +!
  266 +! !LOCAL VARIABLES:
  267 + namelist /bio_polynow_nml/ numc, &
  268 +
  269 + p_init_value,p_initial,z_p_gauss_init,sigma_p, &
  270 +zoo_init_value,z_initial,z_zoo_gauss_init,sigma_zoo, &
  271 +b_initial, &
  272 +dph_init_value,dph_initial,z_dph_gauss_init,sigma_dph, &
  273 +dzo_init_value,dzo_initial,z_dzo_gauss_init,sigma_dzo, &
  274 +fp_init_value,fp_initial,z_fp_gauss_init,sigma_fp, &
  275 + msn_init_value,msn_initial,z_msn_gauss_init,sigma_msn, &
  276 + l_initial,p0,z0,b0,mu5, &
  277 + vp,alpha,inib,kc,k1,k2,mu1,k5,gamma,txloss_p,txloss_dph, & ! phytoplankton
  278 + gmax,k3,beta,mu2,k6,delta,epsi,eg,r1,r2,r3,r4,r5,r6,zingest, & ! zooplankton
  279 + txloss_dzo,txloss_fp, &
  280 + Migra_zoo,pmin,w_zmax,bertha,parcrit, & !Vertical migration from Nocera
  281 + vb,remi,k4,mu3,eta,mbac,dphlossb,dphlossl,dzolossl,dzolossb,fplossl,fplossb,msnlossb, & !Bacterias
  282 + leak,mldon,lmin, & !LDON
  283 + size_w,Phys_w,w_msnow,w_p,w_dph,w_dzo,w_fp,w_msn, & !Detritus
  284 +rho_p,rho_dph,rho_dzo,rho_fp,rho_msn, &
  285 + Coag_coef, &
  286 + betap_p,betap_dph,betap_dzo,betap_fp, &
  287 + betadph_dph,betadph_dzo,betadph_fp, &
  288 + betadzo_dzo,betadzo_fp,betafp_fp , & !Aggregation
  289 + sti_cst, &
  290 + stip_p,stip_dph,stip_dzo,stip_fp,stidph_dph,stidph_dzo,stidph_fp,stidzo_dzo,stidzo_fp,stifp_fp, &
  291 + min_flux_msn,size_rand,size_phy_us,size_phy_up,size_dph_us,size_dph_up,size_dzo_us,size_dzo_up,&
  292 + size_fp_us,size_fp_up,size_msn,&
  293 + dynvis,kinvis,kB, &
  294 + Frag_meth,swim_brk, &
  295 +Floc_coef,lim_size, &
  296 + betaBr,betaSh,betaDs, &
  297 + eps_const,eps_n,cons_min, &
  298 + write_screen
  299 +
  300 +!EOP
  301 +!-----------------------------------------------------------------------
  302 +!BOC
  303 + LEVEL2 'init_bio_polynow'
  304 +
  305 + open(namlst,file=fname,action='read',status='old',err=98)
  306 + read(namlst,nml=bio_polynow_nml,err=99)
  307 + close(namlst)
  308 +
  309 + numcc=numc
  310 +!----Print some parameter values in standard output and save them in a separate file [out_fn]_polynow.par
  311 + pfile = trim(out_fn) // '_polynow.par'
  312 + open(10,status='unknown',action='write',file=pfile)
  313 + LEVEL3 'Biogeochemical parameters saved in ', pfile
  314 +
  315 +
  316 + !p_init_value=1.0
  317 + write(*,900) ' p_initial = ',p_initial
  318 + write(10,901) p_initial
  319 + !z_p_gauss_init= -10
  320 + !sigma_p= 2.0
  321 +!zoo_init_value
  322 + write(*,900) ' z_initial = ',z_initial
  323 + write(10,901) z_initial
  324 +! z_zoo_gauss_init
  325 +! sigma_zoo
  326 + write(*,900) ' b_initial = ',b_initial
  327 + write(10,901) b_initial
  328 +!dph_init_value=1.0
  329 + write(*,900) ' dph_initial = ',dph_initial
  330 + write(10,901) dph_initial
  331 + !z_dph_gauss_init= -10
  332 + !sigma_dph= 2.0
  333 +!dzo_init_value=1.0
  334 + write(*,900) ' dzo_initial = ',dzo_initial
  335 + write(10,901) dzo_initial
  336 + !z_dzo_gauss_init= -10
  337 + !sigma_dzo= 2.0
  338 +!fp_init_value=1.0
  339 + write(*,900) ' fp_initial = ',fp_initial
  340 + write(10,901) fp_initial
  341 + !z_fp_gauss_init= -10
  342 + !sigma_fp= 2.0
  343 +!msn_init_value=1.0
  344 + write(*,900) ' msn_initial = ',msn_initial
  345 + write(10,901) msn_initial
  346 + !z_msn_gauss_init= -10
  347 + !sigma_msn= 2.0
  348 + write(*,900) ' l_initial = ',l_initial
  349 + write(10,901) l_initial
  350 + write(*,900) ' p0 = ',p0
  351 + write(10,901) p0
  352 + write(*,900) ' z0 = ',z0
  353 + write(10,901) z0
  354 + write(*,900) ' b0 = ',b0
  355 + write(10,901) b0
  356 + write(*,900) ' mu5 = ',mu5
  357 + write(10,901) mu5
  358 + write(*,900) ' vp = ',vp
  359 + write(10,901) vp
  360 + write(*,900) ' alpha = ',alpha
  361 + write(10,901) alpha
  362 + write(*,900) ' inib = ',inib
  363 + write(10,901) inib
  364 + write(*,900) ' kc = ',kc
  365 + write(10,901) kc
  366 + write(*,900) ' k1 = ',k1
  367 + write(10,901) k1
  368 + write(*,900) ' k2 = ',k2
  369 + write(10,901) k2
  370 + write(*,900) ' mu1 = ',mu1
  371 + write(10,901) mu1
  372 + write(*,900) ' k5 = ',k5
  373 + write(10,901) k5
  374 + write(*,900) ' gamma = ',gamma
  375 + write(10,901) gamma
  376 + write(*,900) ' txloss_p = ',txloss_p
  377 + write(10,901) txloss_p
  378 + write(*,900) ' txloss_dph = ',txloss_dph
  379 + write(10,901) txloss_dph
  380 + write(*,900) ' gmax = ',gmax
  381 + write(10,901) gmax
  382 + write(*,900) ' k3 = ',k3
  383 + write(10,901) k3
  384 + write(*,900) ' beta = ',beta
  385 + write(10,901) beta
  386 + write(*,900) ' mu2 = ',mu2
  387 + write(10,901) mu2
  388 + write(*,900) ' k6 = ',k6
  389 + write(10,901) k6
  390 + write(*,900) ' delta = ',delta
  391 + write(10,901) delta
  392 + write(*,900) ' epsi = ',epsi
  393 + write(10,901) epsi
  394 + write(*,900) ' eg = ',eg
  395 + write(10,901) eg
  396 + write(*,900) ' r1 = ',r1
  397 + write(10,901) r1
  398 + write(*,900) ' r2 = ',r2
  399 + write(10,901) r2
  400 + write(*,900) ' r3 = ',r3
  401 + write(10,901) r3
  402 + write(*,900) ' r4 = ',r4
  403 + write(10,901) r4
  404 + write(*,900) ' r5 = ',r5
  405 + write(10,901) r5
  406 + write(*,900) ' r6 = ',r6
  407 + write(10,901) r6
  408 + write(*,900) ' zingest = ',zingest
  409 + write(10,901) zingest
  410 + write(*,900) ' txloss_dzo = ',txloss_dzo
  411 + write(10,901) txloss_dzo
  412 + write(*,900) ' txloss_fp = ',txloss_fp
  413 + write(10,901) txloss_fp
  414 + write(*,900) ' Migra_zoo = ',Migra_zoo
  415 + write(10,901) Migra_zoo
  416 + write(*,900) ' pmin = ',pmin
  417 + write(10,901) pmin
  418 + write(*,900) ' w_zmax = ',w_zmax
  419 + write(10,901) w_zmax
  420 + write(*,900) ' bertha = ',bertha
  421 + write(10,901) bertha
  422 + write(*,900) ' parcrit = ',parcrit
  423 + write(10,901) parcrit
  424 + write(*,900) ' vb = ',vb
  425 + write(10,901) vb
  426 +!remi
  427 + write(*,900) ' k4 = ',k4
  428 + write(10,901) k4
  429 + write(*,900) ' mu3 = ',mu3
  430 + write(10,901) mu3
  431 + write(*,900) ' eta = ',eta
  432 + write(10,901) eta
  433 + write(*,900) ' mbac = ',mbac
  434 + write(10,901) mbac
  435 + write(*,900) ' dphlossb = ',dphlossb
  436 + write(10,901) dphlossb
  437 + write(*,900) ' dphlossl = ',dphlossl
  438 + write(10,901) dphlossl
  439 + write(*,900) ' dzolossl = ',dzolossl
  440 + write(10,901) dzolossl
  441 + write(*,900) ' dzolossb = ',dzolossb
  442 + write(10,901) dzolossb
  443 + write(*,900) ' fplossl = ',fplossl
  444 + write(10,901) fplossl
  445 + write(*,900) ' fplossb = ',fplossb
  446 + write(10,901) fplossb
  447 + write(*,900) ' msnlossb = ',msnlossb
  448 + write(10,901) msnlossb
  449 +!leak
  450 + write(*,900) ' mldon = ',mldon
  451 + write(10,901) mldon
  452 + write(*,900) ' lmin = ',lmin
  453 + write(10,901) lmin
  454 +! size_w
  455 + write(*,900) ' Phys_w = ',Phys_w
  456 + write(10,901) Phys_w
  457 +!w_msnow
  458 + write(*,900) ' w_p = ',w_p
  459 + write(10,901) w_p
  460 + write(*,900) ' w_dph = ',w_dph
  461 + write(10,901) w_dph
  462 + write(*,900) ' w_dzo = ',w_dzo
  463 + write(10,901) w_dzo
  464 + write(*,900) ' w_fp = ',w_fp
  465 + write(10,901) w_fp
  466 + write(*,900) ' w_msn = ',w_msn
  467 + write(10,901) w_msn
  468 +
  469 + ! write(*,900) ' rho_p = ',rho_p
  470 + ! write(10,901) rho_p
  471 +! write(*,900) ' rho_dph = ',rho_dph
  472 +! write(10,901) rho_dph
  473 + write(*,900) ' rho_dzo = ',rho_dzo
  474 + write(10,901) rho_dzo
  475 + write(*,900) ' rho_fp = ',rho_fp
  476 + write(10,901) rho_fp
  477 + write(*,900) ' rho_msn = ',rho_msn
  478 + write(10,901) rho_msn
  479 + write(*,900) ' coag_coef = ',coag_coef
  480 + write(10,901) coag_coef
  481 + write(*,900) ' betap_p = ',betap_p
  482 + write(10,901) betap_p
  483 +
  484 +!betap_dph,betap_dzo,betap_fp
  485 +
  486 + write(*,900) ' betadph_dph = ',betadph_dph
  487 + write(10,901) betadph_dph
  488 +
  489 +! betadph_dzo,betadph_fp,
  490 +
  491 + write(*,900) ' betadzo_dzo = ',betadzo_dzo
  492 + write(10,901) betadzo_dzo
  493 +!betadzo_fp
  494 + write(*,900) ' betafp_fp = ',betafp_fp
  495 + write(10,901) betafp_fp
  496 +!sti_cst
  497 + write(*,900) ' stip_p = ',stip_p
  498 + write(10,901) stip_p
  499 + write(*,900) ' stip_dph = ',stip_dph
  500 + write(10,901) stip_dph
  501 + write(*,900) ' stip_dzo = ',stip_dzo
  502 + write(10,901) stip_dzo
  503 + write(*,900) ' stip_fp = ',stip_fp
  504 + write(10,901) stip_fp
  505 + write(*,900) ' stidph_dph = ',stidph_dph
  506 + write(10,901) stidph_dph
  507 + write(*,900) ' stidph_dzo = ',stidph_dzo
  508 + write(10,901) stidph_dzo
  509 + write(*,900) ' stidph_fp = ',stidph_fp
  510 + write(10,901) stidph_fp
  511 + write(*,900) ' stidzo_dzo = ',stidzo_dzo
  512 + write(10,901) stidzo_dzo
  513 + write(*,900) ' stidzo_fp = ',stidzo_fp
  514 + write(10,901) stidzo_fp
  515 + write(*,900) ' stifp_fp = ',stifp_fp
  516 + write(10,901) stifp_fp
  517 +!min_flux_msn
  518 + write(*,900) ' size_phy_us = ',size_phy_us
  519 + write(10,901) size_phy_us
  520 +!size_phy_up
  521 + write(*,900) ' size_dph_us = ',size_dph_us
  522 + write(10,901) size_dph_us
  523 + write(*,900) ' size_dzo_us = ',size_dzo_us
  524 + write(10,901) size_dzo_us
  525 + write(*,900) ' size_fp_us = ',size_fp_us
  526 + write(10,901) size_fp_us
  527 +
  528 + !size_dph_up = 0.00001
  529 + !size_dzo_up= 0.000100
  530 + !size_fp_up= 0.000050
  531 + write(*,900) ' size_msn = ',size_msn
  532 + write(10,901) size_msn
  533 + write(*,900) ' dynvis = ',dynvis
  534 + write(10,901) dynvis
  535 + write(*,900) ' kinvis = ',kinvis
  536 + write(10,901) kinvis
  537 + write(*,900) ' kB = ',kB
  538 + write(10,901) kB
  539 + write(*,900) ' Frag_meth = ',Frag_meth
  540 + write(10,901) Frag_meth
  541 + write(*,900) ' swim_brk = ', swim_brk
  542 + write(10,901) swim_brk
  543 +!betaBr
  544 +!betaSh
  545 +!betaDs
  546 +!eps_const
  547 +!eps
  548 +!cons_min
  549 +!Floc_coef
  550 +!lim_size
  551 +
  552 +900 format (a,f8.5)
  553 +901 format (f8.5)
  554 +
  555 +! Conversion from day to second
  556 + mu5 = mu5 /secs_pr_day
  557 + vp = vp /secs_pr_day
  558 + alpha = alpha /secs_pr_day
  559 + inib = inib /secs_pr_day
  560 + mu1 = mu1 /secs_pr_day
  561 +
  562 + gmax = gmax /secs_pr_day
  563 + mu2 = mu2 /secs_pr_day
  564 + w_zmax = w_zmax /secs_pr_day
  565 +
  566 + vb = vb /secs_pr_day
  567 + remi = remi/secs_pr_day
  568 + mu3 = mu3 /secs_pr_day
  569 + mbac = mbac /secs_pr_day
  570 + dphlossb =dphlossb/secs_pr_day
  571 + dphlossl = dphlossl/secs_pr_day
  572 + dzolossl = dzolossl/secs_pr_day
  573 + dzolossb = dzolossb/secs_pr_day
  574 + fplossl = fplossl/secs_pr_day
  575 + fplossb = fplossb/secs_pr_day
  576 + msnlossb= msnlossb/secs_pr_day
  577 +leak=leak/secs_pr_day
  578 + mldon = mldon /secs_pr_day
  579 +
  580 + w_p = w_p /secs_pr_day
  581 + w_dph = w_dph /secs_pr_day
  582 + w_dzo = w_dzo /secs_pr_day
  583 + w_fp = w_fp /secs_pr_day
  584 + w_msn = w_msn /secs_pr_day
  585 +
  586 +
  587 +!Phytoplankton
  588 +txloss_p = txloss_p /secs_pr_day
  589 +betap_p = betap_p /secs_pr_day ! GG-D
  590 +betap_dph = betap_dph /secs_pr_day ! GG-D
  591 +betap_dzo = betap_dzo /secs_pr_day ! GG-D
  592 +betap_fp = betap_fp /secs_pr_day ! GG-D
  593 +
  594 +!Dead-Phytoplankton
  595 +txloss_dph= txloss_dph /secs_pr_day
  596 +betadph_dph =betadph_dph/secs_pr_day
  597 +betadph_dzo=betadph_dzo/secs_pr_day
  598 +betadph_fp=betadph_fp/secs_pr_day
  599 +
  600 +!Dead-Zooplankton
  601 +txloss_dzo= txloss_dzo /secs_pr_day
  602 +betadzo_dzo = betadzo_dzo /secs_pr_day
  603 +betadzo_fp = betadzo_fp /secs_pr_day
  604 +
  605 +!Fecal pellets
  606 +txloss_fp= txloss_fp /secs_pr_day
  607 +betafp_fp = betafp_fp /secs_pr_day
  608 +
  609 + dynvis = dynvis/secs_pr_day
  610 + kinvis = dynvis/secs_pr_day
  611 +
  612 + swim_brk = swim_brk /secs_pr_day
  613 + !eps cm2. sec-3
  614 +
  615 + out_unit=unit
  616 +
  617 + LEVEL3 'polynow bio module initialised ...'
  618 +
  619 + return
  620 +
  621 +98 LEVEL2 'I could not open bio_polynow.nml'
  622 + LEVEL2 'If thats not what you want you have to supply bio_polynow.nml'
  623 + LEVEL2 'See the bio example on www.gotm.net for a working bio_polynow.nml'
  624 + return
  625 +99 FATAL 'I could not read bio_polynow.nml'
  626