Commit a5d329e76cff1a1bd1483e59b6185ebe2d3edd1f

Authored by Dany Dumont
2 parents 11b18235 c946efdb
Exists in master and in 1 other branch snow

Merge branch 'snow' of gitlasso.uqar.ca:dumoda01/gotm_ismer

nml/bio_polynow.nml 0 → 100644
@@ -0,0 +1,152 @@ @@ -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,8 +16,9 @@ bio_sed.F90 \
16 bio_fasham.F90 \ 16 bio_fasham.F90 \
17 bio_ismer.F90 \ 17 bio_ismer.F90 \
18 bio_gsj.F90 \ 18 bio_gsj.F90 \
19 -bio_save.F90 \  
20 bio_nocera.F90 \ 19 bio_nocera.F90 \
  20 +bio_polynow.F90 \
  21 +bio_save.F90 \
21 bio_npzd4.F90 \ 22 bio_npzd4.F90 \
22 nitrate.F90 \ 23 nitrate.F90 \
23 ammonium.F90 \ 24 ammonium.F90 \
@@ -34,6 +35,7 @@ ${LIB}(bio_ismer.o) \ @@ -34,6 +35,7 @@ ${LIB}(bio_ismer.o) \
34 ${LIB}(bio_gsj.o) \ 35 ${LIB}(bio_gsj.o) \
35 ${LIB}(bio_fasham.o) \ 36 ${LIB}(bio_fasham.o) \
36 ${LIB}(bio_nocera.o) \ 37 ${LIB}(bio_nocera.o) \
  38 +${LIB}(bio_polynow.o) \
37 ${LIB}(bio_npzd4.o) \ 39 ${LIB}(bio_npzd4.o) \
38 ${LIB}(bio_sed.o) \ 40 ${LIB}(bio_sed.o) \
39 ${LIB}(bio_save.o) \ 41 ${LIB}(bio_save.o) \
src/extras/bio/ammonium.F90
@@ -180,6 +180,11 @@ @@ -180,6 +180,11 @@
180 do i=1,nlev 180 do i=1,nlev
181 amm(i) = cc(6,i) 181 amm(i) = cc(6,i)
182 end do 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 end if 188 end if
184 #endif 189 #endif
185 190
src/extras/bio/bio.F90
@@ -48,9 +48,13 @@ @@ -48,9 +48,13 @@
48 use bio_mab, only : init_bio_mab,init_var_mab,var_info_mab 48 use bio_mab, only : init_bio_mab,init_var_mab,var_info_mab
49 use bio_mab, only : light_mab,surface_fluxes_mab,do_bio_mab 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 use output, only : out_fmt,write_results,ts 54 use output, only : out_fmt,write_results,ts
52 55
53 use util 56 use util
  57 +
54 ! 58 !
55 ! default: all is private. 59 ! default: all is private.
56 private 60 private
@@ -58,6 +62,9 @@ @@ -58,6 +62,9 @@
58 ! !PUBLIC MEMBER FUNCTIONS: 62 ! !PUBLIC MEMBER FUNCTIONS:
59 public init_bio, set_env_bio, do_bio, get_bio_updates, clean_bio 63 public init_bio, set_env_bio, do_bio, get_bio_updates, clean_bio
60 logical, public :: bio_calc=.false. 64 logical, public :: bio_calc=.false.
  65 +
  66 +
  67 +! REALTYPE,public, dimension(:), allocatable :: eps_ !GG-T
61 ! 68 !
62 ! !REVISION HISTORY:! 69 ! !REVISION HISTORY:!
63 ! Original author(s): Hans Burchard & Karsten Bolding 70 ! Original author(s): Hans Burchard & Karsten Bolding
@@ -353,6 +360,17 @@ @@ -353,6 +360,17 @@
353 360
354 call var_info_npzd4() 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 case default 374 case default
357 stop "bio: no valid biomodel specified in bio.nml !" 375 stop "bio: no valid biomodel specified in bio.nml !"
358 end select 376 end select
@@ -448,9 +466,9 @@ @@ -448,9 +466,9 @@
448 ! modules 466 ! modules
449 ! 467 !
450 ! !INTERFACE: 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 I_0_,w_,w_adv_ctr_) 470 I_0_,w_,w_adv_ctr_)
453 -! 471 +
454 ! !DESCRIPTION: 472 ! !DESCRIPTION:
455 ! 473 !
456 ! !USES: 474 ! !USES:
@@ -471,6 +489,8 @@ @@ -471,6 +489,8 @@
471 REALTYPE, intent(in) :: I_0_ 489 REALTYPE, intent(in) :: I_0_
472 REALTYPE, optional, intent(in) :: w_(0:nlev) 490 REALTYPE, optional, intent(in) :: w_(0:nlev)
473 integer, optional, intent(in) :: w_adv_ctr_ 491 integer, optional, intent(in) :: w_adv_ctr_
  492 +
  493 +
474 ! 494 !
475 ! !REVISION HISTORY: 495 ! !REVISION HISTORY:
476 ! Original author(s): Hans Burchard & Karsten Bolding 496 ! Original author(s): Hans Burchard & Karsten Bolding
@@ -494,6 +514,9 @@ @@ -494,6 +514,9 @@
494 if (present(w_)) w = w_ 514 if (present(w_)) w = w_
495 if (present(w_adv_ctr_)) w_adv_ctr = w_adv_ctr_ 515 if (present(w_adv_ctr_)) w_adv_ctr = w_adv_ctr_
496 516
  517 +
  518 +
  519 +
497 return 520 return
498 end subroutine set_env_bio 521 end subroutine set_env_bio
499 !EOC 522 !EOC
@@ -742,6 +765,10 @@ @@ -742,6 +765,10 @@
742 case (9) 765 case (9)
743 call light_npzd4(nlev,bioshade_feedback) 766 call light_npzd4(nlev,bioshade_feedback)
744 call ode_solver(ode_method,numc,nlev,dt_eff,cc,do_bio_npzd4) 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 end select 772 end select
746 773
747 end do 774 end do
@@ -820,6 +847,17 @@ @@ -820,6 +847,17 @@
820 if (allocated(var_units)) deallocate(var_units) 847 if (allocated(var_units)) deallocate(var_units)
821 if (allocated(var_long)) deallocate(var_long) 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 !DD 861 !DD
824 if (allocated(lumlim1)) deallocate(lumlim1) 862 if (allocated(lumlim1)) deallocate(lumlim1)
825 if (allocated(nitlim1)) deallocate(nitlim1) 863 if (allocated(nitlim1)) deallocate(nitlim1)
@@ -829,6 +867,15 @@ @@ -829,6 +867,15 @@
829 if (allocated(ammlim2)) deallocate(ammlim2) 867 if (allocated(ammlim2)) deallocate(ammlim2)
830 if (allocated(ppnet)) deallocate(ppnet) 868 if (allocated(ppnet)) deallocate(ppnet)
831 869
  870 + if (allocated(flux_msn)) deallocate(flux_msn)
  871 + if (allocated(Flux_P)) deallocate(Flux_P)
  872 + if (allocated(Flux_D1)) deallocate(Flux_D1)
  873 + if (allocated(Flux_D2)) deallocate(Flux_D2)
  874 + if (allocated(Flux_D3)) deallocate(Flux_D3)
  875 +
  876 + if (allocated(size_msnow)) deallocate(size_msnow)
  877 + if (allocated(w_msn_lev)) deallocate(w_msn_lev)
  878 +
832 ! The external provide arrays 879 ! The external provide arrays
833 if (allocated(h)) deallocate(h) 880 if (allocated(h)) deallocate(h)
834 if (allocated(nuh)) deallocate(nuh) 881 if (allocated(nuh)) deallocate(nuh)
@@ -912,6 +959,29 @@ @@ -912,6 +959,29 @@
912 allocate(var_long(numc),stat=rc) 959 allocate(var_long(numc),stat=rc)
913 if (rc /= 0) stop 'init_bio(): Error allocating var_long)' 960 if (rc /= 0) stop 'init_bio(): Error allocating var_long)'
914 961
  962 +!Stickiness
  963 + allocate(sti_2p(0:nlev),stat=rc)
  964 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_2p)'
  965 + allocate(sti_pdph(0:nlev),stat=rc)
  966 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_pdph)'
  967 + allocate(sti_pdzo(0:nlev),stat=rc)
  968 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_pdzo)'
  969 + allocate(sti_pfp(0:nlev),stat=rc)
  970 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_pfp)'
  971 + allocate(sti_2dph(0:nlev),stat=rc)
  972 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_2dph)'
  973 + allocate(sti_dphdzo(0:nlev),stat=rc)
  974 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_dphdzo)'
  975 + allocate(sti_dphfp(0:nlev),stat=rc)
  976 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_dphfp)'
  977 + allocate(sti_2dzo(0:nlev),stat=rc)
  978 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_2dzo)'
  979 + allocate(sti_dzofp(0:nlev),stat=rc)
  980 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_dzofp)'
  981 + allocate(sti_2fp(0:nlev),stat=rc)
  982 + if (rc /= 0) STOP 'init_bio: Error allocating (sti_2fp)'
  983 +
  984 +
915 !DD 985 !DD
916 986
917 allocate(lumlim1(0:nlev),stat=rc) 987 allocate(lumlim1(0:nlev),stat=rc)
@@ -935,6 +1005,28 @@ @@ -935,6 +1005,28 @@
935 allocate(ppnet(0:nlev),stat=rc) 1005 allocate(ppnet(0:nlev),stat=rc)
936 if (rc /= 0) stop 'init_bio(): Error allocating (ppnet)' 1006 if (rc /= 0) stop 'init_bio(): Error allocating (ppnet)'
937 1007
  1008 +
  1009 +
  1010 + allocate(flux_msn(0:nlev),stat=rc)
  1011 + if (rc /= 0) stop 'init_bio(): Error allocating (flux_msn)'
  1012 +
  1013 + allocate(Flux_P(0:nlev),stat=rc)
  1014 + if (rc /= 0) stop 'init_bio(): Error allocating (Flux_P)'
  1015 + allocate(Flux_D1(0:nlev),stat=rc)
  1016 + if (rc /= 0) stop 'init_bio(): Error allocating (Flux_D1)'
  1017 + allocate(Flux_D2(0:nlev),stat=rc)
  1018 + if (rc /= 0) stop 'init_bio(): Error allocating (Flux_D2)'
  1019 + allocate(Flux_D3(0:nlev),stat=rc)
  1020 + if (rc /= 0) stop 'init_bio(): Error allocating (Flux_D3)'
  1021 +
  1022 + allocate(size_msnow(0:nlev),stat=rc)
  1023 + if (rc /= 0) stop 'init_bio(): Error allocating (size_msnow)'
  1024 +
  1025 +
  1026 + allocate(w_msn_lev(0:nlev),stat=rc)
  1027 + if (rc /= 0) stop 'init_bio(): Error allocating (w_msn_lev)'
  1028 +
  1029 +
938 ! The external provide arrays 1030 ! The external provide arrays
939 allocate(h(0:nlev),stat=rc) 1031 allocate(h(0:nlev),stat=rc)
940 if (rc /= 0) stop 'init_bio(): Error allocating (h)' 1032 if (rc /= 0) stop 'init_bio(): Error allocating (h)'
src/extras/bio/bio_polynow.F90 0 → 100644
@@ -0,0 +1,3315 @@ @@ -0,0 +1,3315 @@
  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,rho
  34 + use output
  35 + use observations, only : aa,g2
  36 + use turbulence, only : eps
  37 + use meanflow, only : Rho_0
  38 +
  39 +
  40 + ! use eqstate, only : eqstate1 ! In situ density in kg.m-3
  41 +
  42 +
  43 + private
  44 +!
  45 +! !PUBLIC MEMBER FUNCTIONS:
  46 + public init_bio_polynow, init_var_polynow, var_info_polynow, &
  47 + light_polynow, do_bio_polynow, end_bio_polynow
  48 + REALTYPE, public,parameter :: pi= 3.141592654
  49 + REALTYPE, public,parameter :: g= 9.80665 !m/s2
  50 + REALTYPE :: pres = 10.1325! gauge pressure (absolute pressure - 10.1325 bar)
  51 + REALTYPE,public ::gauss_p
  52 +
  53 +
  54 +
  55 +!-----LOCAL VARIABLES:---------- from a namelist : bio_polynow.nml----------------------
  56 +
  57 + REALTYPE :: dt_bio
  58 + REALTYPE :: splitfac_bio
  59 + REALTYPE :: depth_bio
  60 +!INITIAL and Minimum concentration for the variable
  61 +
  62 + REALTYPE :: p_init_value=1.0
  63 + REALTYPE :: p_initial=0.01
  64 + REALTYPE :: z_p_gauss_init= 2.0
  65 + REALTYPE :: sigma_p=2.0
  66 +
  67 + REALTYPE :: zoo_init_value=1.0
  68 + REALTYPE :: z_initial=0.01
  69 + REALTYPE :: z_zoo_gauss_init= 2.0
  70 + REALTYPE :: sigma_zoo=2.0
  71 +
  72 + REALTYPE :: b_initial= 0.001
  73 +
  74 +! Nitrate and ammonium are initialized within the GOTM observation module
  75 +! REALTYPE :: n_initial= 8.3
  76 +! REALTYPE :: a_initial= 0.22
  77 +!Classes de détritus et LDON
  78 +
  79 + REALTYPE :: dph_init_value=1.0
  80 + REALTYPE :: dph_initial=0.01
  81 + REALTYPE :: z_dph_gauss_init= 2.0
  82 + REALTYPE :: sigma_dph=2.0
  83 +
  84 + REALTYPE :: dzo_init_value=1.0
  85 + REALTYPE :: dzo_initial=0.01
  86 + REALTYPE :: z_dzo_gauss_init= 2.0
  87 + REALTYPE :: sigma_dzo=2.0
  88 +
  89 + REALTYPE :: fp_init_value=1.0
  90 + REALTYPE :: fp_initial=0.01
  91 + REALTYPE :: z_fp_gauss_init= 2.0
  92 + REALTYPE :: sigma_fp=2.0
  93 +
  94 + REALTYPE :: msn_init_value=1.0
  95 + REALTYPE :: msn_initial=0.01
  96 + REALTYPE :: z_msn_gauss_init= 2.0
  97 + REALTYPE :: sigma_msn=2.0
  98 +
  99 + REALTYPE :: l_initial= 0.14
  100 + REALTYPE :: p0 = 0.0
  101 + REALTYPE :: z0 = 0.0
  102 + REALTYPE :: b0 = 0.0
  103 + REALTYPE :: mu5 = 0.02 !! GG-CHG1
  104 +!Phytoplankton
  105 + REALTYPE :: vp = 1.5
  106 + REALTYPE :: alpha = 0.065
  107 + REALTYPE :: inib = 0.05
  108 + REALTYPE, public :: kc = 0.03
  109 + REALTYPE :: k1 = 0.2
  110 + REALTYPE :: k2 = 0.8
  111 + REALTYPE :: mu1 = 0.05
  112 + REALTYPE :: k5 = 0.2
  113 + REALTYPE :: gamma = 0.05
  114 + REALTYPE :: txloss_p = 0.7 ! GG-D
  115 + REALTYPE :: txloss_dph = 0.05 ! GG-D
  116 +
  117 +!Zooplankton
  118 + REALTYPE :: gmax = 1.0
  119 + REALTYPE :: k3 = 1.0
  120 + REALTYPE :: beta = 0.625
  121 + REALTYPE :: mu2 = 0.3
  122 + REALTYPE :: k6 = 0.2
  123 + REALTYPE :: delta = 0.1
  124 + REALTYPE :: epsi = 0.70
  125 + REALTYPE :: eg = 0.05 ! GG-D
  126 + REALTYPE :: r1 = 0.55
  127 + REALTYPE :: r2 = 0.4
  128 + REALTYPE :: r3 = 0.05 !dph GG-D
  129 + REALTYPE :: r4 = 0.05 !dzo GG-D
  130 + REALTYPE :: r5 = 0.05 !fp GG-D
  131 + REALTYPE :: r6 = 0.05 !msn GG-D
  132 + REALTYPE :: txloss_dzo = 0.05 ! GG-D
  133 + REALTYPE :: txloss_fp = 0.05 ! GG-D
  134 +! Vertical migration(From Ariadna Nocera)
  135 + !LOGICAL and integer doesn't work :: Migra_zoo=.true.
  136 + REALTYPE :: Migra_zoo= 1.0
  137 + REALTYPE :: pmin = 0.05
  138 + REALTYPE :: w_zmax = 100.0 !! GG-B
  139 + REALTYPE :: bertha = 0.05 !! GG-B
  140 + REALTYPE :: parcrit = 0.02 !! GG-B
  141 +!Bacterias
  142 + REALTYPE :: vb = 1.2
  143 + REALTYPE :: remi = 0.1
  144 + REALTYPE :: k4 = 0.5
  145 + REALTYPE :: mu3 = 0.15
  146 + REALTYPE :: eta = 0.0
  147 + REALTYPE :: mbac = 0.0 ! GG-D
  148 + REALTYPE ::dphlossb =0.4
  149 + REALTYPE :: dphlossl = 10.0 ! GG-D
  150 + REALTYPE :: dzolossl = 10.0 ! GG-D
  151 + REALTYPE :: dzolossb = 10.0 ! GG-D
  152 + REALTYPE :: fplossl = 10.0 ! GG-D
  153 + REALTYPE :: fplossb = 10.0 ! GG-D
  154 + REALTYPE :: msnlossb =0.6
  155 +!LDON
  156 + REALTYPE :: leak=0.1
  157 + REALTYPE :: mldon = 0.02 ! GG-D
  158 + REALTYPE :: lmin = 0.02 ! GG-D
  159 +!detritus/Settling
  160 + ! LOGICAL :: Phys_w= .true.
  161 + REALTYPE :: size_w=0.0
  162 + REALTYPE :: Phys_w= 0.0
  163 + REALTYPE :: w_msnow= 0.0
  164 + REALTYPE :: w_p = -0.5
  165 + REALTYPE :: w_dph = -1.0 !!GG-C
  166 + REALTYPE :: w_dzo = -10.0 !!GG-C
  167 + REALTYPE :: w_fp = -100.0 !!GG-C
  168 + REALTYPE :: w_msn = -2.0 !!GG-C
  169 +
  170 + REALTYPE :: rho_p = 0.02
  171 + REALTYPE :: rho_dph = 0.02
  172 + REALTYPE :: rho_dzo = 0.02
  173 + REALTYPE :: rho_fp = 0.02
  174 + REALTYPE :: rho_msn = 0.02
  175 +!Aggregation
  176 +! LOGICAL :: Coag_coef=.true.
  177 + REALTYPE :: Coag_coef=0.0 ! If true : utilisation of given parameters / False : utilisation of model calculate coefficient
  178 +! Coefficient de Kernel sans calcul via la physique
  179 + REALTYPE :: betap_p = 0.2
  180 + REALTYPE :: betap_dph= 1
  181 + REALTYPE :: betap_dzo= 1
  182 + REALTYPE :: betap_fp= 1
  183 +
  184 + REALTYPE :: betadph_dph = 0.2
  185 + REALTYPE :: betadph_dzo= 1
  186 + REALTYPE :: betadph_fp= 1
  187 +
  188 + REALTYPE :: betadzo_dzo = 0.02
  189 + REALTYPE :: betadzo_fp = 0.02
  190 + REALTYPE :: betafp_fp = 0.02
  191 +!Calcul de la collision avec la physique
  192 + REALTYPE :: sti_cst = 0.0
  193 + REALTYPE :: stip_p = -0.5
  194 + REALTYPE :: stip_dph = -0.5
  195 + REALTYPE :: stip_dzo = -0.5
  196 + REALTYPE :: stip_fp = -0.5
  197 + REALTYPE :: stidph_dph = -0.5
  198 + REALTYPE :: stidph_dzo = -0.5
  199 + REALTYPE :: stidph_fp = -0.5
  200 + REALTYPE :: stidzo_dzo = -0.5
  201 + REALTYPE :: stidzo_fp = -0.5
  202 + REALTYPE :: stifp_fp = -0.5
  203 +!Collision rate and Settling
  204 + REALTYPE :: CSF =1.0
  205 + REALTYPE :: size_rand = 1.0
  206 + REALTYPE :: size_phy_us = -0.5
  207 + REALTYPE :: size_phy_up = -0.5
  208 + REALTYPE :: size_dph_us = 0.00001
  209 + REALTYPE :: size_dph_up = 0.00001
  210 + REALTYPE :: size_dzo_us= 0.000100
  211 + REALTYPE :: size_dzo_up= 0.000100
  212 + REALTYPE :: size_fp_us= 0.000050
  213 + REALTYPE :: size_fp_up= 0.000050
  214 + REALTYPE :: size_msn = -0.5
  215 + REALTYPE :: dm_msn = 0.0
  216 + REALTYPE :: diam_msn_us = 0.01
  217 + REALTYPE :: litt_msn_w = 0.01
  218 +!Parametres pour l'aggregation physique
  219 + REALTYPE :: dynvis = -0.5
  220 + REALTYPE :: kinvis = -0.5
  221 + REALTYPE :: kB = -0.5
  222 +!Fragmentation - Concentration seuil d'agrégat avant qu'un pourcentage parte dans le dph
  223 + !logical :: Frag_meth=.true. !Utilisation de la physique ou pas pour la fragmentation
  224 +! integer :: Frag_meth=0.0
  225 + REALTYPE :: Frag_meth=0.0
  226 + REALTYPE :: swim_brk = 0.8
  227 +REALTYPE ::Floc_coef = 0.1
  228 +!Tests parameter
  229 + REALTYPE ::betaBr=1.0
  230 + REALTYPE ::betaSh =1.0
  231 + REALTYPE ::betaDs =1.0
  232 + REALTYPE ::eps_const =1.0
  233 + REALTYPE ::eps_n =1.0
  234 + REALTYPE ::cons_min= 0.00001
  235 +
  236 + REALTYPE ::write_screen
  237 +
  238 +
  239 +REALTYPE ::coef1
  240 +REALTYPE ::coef2
  241 +REALTYPE ::RFV
  242 +REALTYPE ::coef3
  243 +REALTYPE ::coef4
  244 +REALTYPE ::coef5
  245 +
  246 +REALTYPE ::cons_max
  247 +
  248 + integer :: out_unit
  249 +! 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
  250 +! GG d1= dph , d2= dzo , d3= fp , d4 = msn, aug_si_d4= size_msn
  251 + integer, parameter :: p=1,z=2,b=3,d1=4,n=5,a=6,l=7,d2=8,d3=9,d4=10, &
  252 + taille_intrm=11,taille_coag=12, taille_frag=13,taille_msn=14,settl_msn=15
  253 +
  254 +
  255 +!EOP
  256 +!-----------------------------------------------------------------------
  257 +
  258 + contains
  259 +
  260 +!-----------------------------------------------------------------------
  261 +!BOP
  262 +!
  263 +! !IROUTINE: Initialise the bio module
  264 +!
  265 +! !INTERFACE:
  266 + subroutine init_bio_polynow(namlst,fname,unit)
  267 +!
  268 +! !DESCRIPTION:
  269 +! Here, the bio namelist bio_polynow.nml is read and
  270 +! various variables (rates and settling velocities)
  271 +! are transformed into SI units.
  272 +!
  273 +! !USES:
  274 + IMPLICIT NONE
  275 +!
  276 +! !INPUT PARAMETERS:
  277 + integer, intent(in) :: namlst
  278 + character(len=*), intent(in) :: fname
  279 + character(len=20) :: pfile
  280 + integer, intent(in) :: unit
  281 +!
  282 +! !REVISION HISTORY:
  283 +! Original author(s): Hans Burchard & Karsten Bolding
  284 +!
  285 +! !LOCAL VARIABLES:
  286 + namelist /bio_polynow_nml/ numc, &
  287 +
  288 + dt_bio,splitfac_bio,depth_bio,p_init_value,p_initial,z_p_gauss_init,sigma_p, &
  289 +zoo_init_value,z_initial,z_zoo_gauss_init,sigma_zoo, &
  290 +b_initial, &
  291 +dph_init_value,dph_initial,z_dph_gauss_init,sigma_dph, &
  292 +dzo_init_value,dzo_initial,z_dzo_gauss_init,sigma_dzo, &
  293 +fp_init_value,fp_initial,z_fp_gauss_init,sigma_fp, &
  294 + msn_init_value,msn_initial,z_msn_gauss_init,sigma_msn, &
  295 + l_initial,p0,z0,b0,mu5, &
  296 + vp,alpha,inib,kc,k1,k2,mu1,k5,gamma,txloss_p,txloss_dph, & ! phytoplankton
  297 + gmax,k3,beta,mu2,k6,delta,epsi,eg,r1,r2,r3,r4,r5,r6, & ! zooplankton
  298 + txloss_dzo,txloss_fp, &
  299 + Migra_zoo,pmin,w_zmax,bertha,parcrit, & !Vertical migration from Nocera
  300 + vb,remi,k4,mu3,eta,mbac,dphlossb,dphlossl,dzolossl,dzolossb,fplossl,fplossb,msnlossb, & !Bacterias
  301 + leak,mldon,lmin, & !LDON
  302 + size_w,Phys_w,w_msnow,w_p,w_dph,w_dzo,w_fp,w_msn, & !Detritus
  303 +rho_p,rho_dph,rho_dzo,rho_fp,rho_msn, &
  304 + Coag_coef, &
  305 + betap_p,betap_dph,betap_dzo,betap_fp, &
  306 + betadph_dph,betadph_dzo,betadph_fp, &
  307 + betadzo_dzo,betadzo_fp,betafp_fp , & !Aggregation
  308 + sti_cst, &
  309 + stip_p,stip_dph,stip_dzo,stip_fp,stidph_dph,stidph_dzo,stidph_fp,stidzo_dzo,stidzo_fp,stifp_fp, &
  310 + CSF,size_rand,size_phy_us,size_phy_up,size_dph_us,size_dph_up,size_dzo_us,size_dzo_up,&
  311 + size_fp_us,size_fp_up,size_msn,dm_msn,diam_msn_us,litt_msn_w,&
  312 + dynvis,kinvis,kB, &
  313 + Frag_meth,swim_brk, &
  314 +Floc_coef, &
  315 + betaBr,betaSh,betaDs, &
  316 + eps_const,eps_n,cons_min, &
  317 + coef1,coef2,RFV,coef3,coef4,coef5,cons_max,&
  318 + write_screen
  319 +
  320 +!EOP
  321 +!-----------------------------------------------------------------------
  322 +!BOC
  323 + LEVEL2 'init_bio_polynow'
  324 +
  325 + open(namlst,file=fname,action='read',status='old',err=98)
  326 + read(namlst,nml=bio_polynow_nml,err=99)
  327 + close(namlst)
  328 +
  329 + numcc=numc
  330 +!----Print some parameter values in standard output and save them in a separate file [out_fn]_polynow.par
  331 + pfile = trim(out_fn) // '_polynow.par'
  332 + open(10,status='unknown',action='write',file=pfile)
  333 + LEVEL3 'Biogeochemical parameters saved in ', pfile
  334 +
  335 +!dt_bio
  336 +!splitfac_bio
  337 + !p_init_value=1.0
  338 + write(*,900) ' p_initial = ',p_initial
  339 + write(10,901) p_initial
  340 + !z_p_gauss_init= -10
  341 + !sigma_p= 2.0
  342 +!zoo_init_value
  343 + write(*,900) ' z_initial = ',z_initial
  344 + write(10,901) z_initial
  345 +! z_zoo_gauss_init
  346 +! sigma_zoo
  347 + write(*,900) ' b_initial = ',b_initial
  348 + write(10,901) b_initial
  349 +!dph_init_value=1.0
  350 + write(*,900) ' dph_initial = ',dph_initial
  351 + write(10,901) dph_initial
  352 + !z_dph_gauss_init= -10
  353 + !sigma_dph= 2.0
  354 +!dzo_init_value=1.0
  355 + write(*,900) ' dzo_initial = ',dzo_initial
  356 + write(10,901) dzo_initial
  357 + !z_dzo_gauss_init= -10
  358 + !sigma_dzo= 2.0
  359 +!fp_init_value=1.0
  360 + write(*,900) ' fp_initial = ',fp_initial
  361 + write(10,901) fp_initial
  362 + !z_fp_gauss_init= -10
  363 + !sigma_fp= 2.0
  364 +!msn_init_value=1.0
  365 + write(*,900) ' msn_initial = ',msn_initial
  366 + write(10,901) msn_initial
  367 + !z_msn_gauss_init= -10
  368 + !sigma_msn= 2.0
  369 + write(*,900) ' l_initial = ',l_initial
  370 + write(10,901) l_initial
  371 + write(*,900) ' p0 = ',p0
  372 + write(10,901) p0
  373 + write(*,900) ' z0 = ',z0
  374 + write(10,901) z0
  375 + write(*,900) ' b0 = ',b0
  376 + write(10,901) b0
  377 + write(*,900) ' mu5 = ',mu5
  378 + write(10,901) mu5
  379 + write(*,900) ' vp = ',vp
  380 + write(10,901) vp
  381 + write(*,900) ' alpha = ',alpha
  382 + write(10,901) alpha
  383 + write(*,900) ' inib = ',inib
  384 + write(10,901) inib
  385 + write(*,900) ' kc = ',kc
  386 + write(10,901) kc
  387 + write(*,900) ' k1 = ',k1
  388 + write(10,901) k1
  389 + write(*,900) ' k2 = ',k2
  390 + write(10,901) k2
  391 + write(*,900) ' mu1 = ',mu1
  392 + write(10,901) mu1
  393 + write(*,900) ' k5 = ',k5
  394 + write(10,901) k5
  395 + write(*,900) ' gamma = ',gamma
  396 + write(10,901) gamma
  397 + write(*,900) ' txloss_p = ',txloss_p
  398 + write(10,901) txloss_p
  399 + write(*,900) ' txloss_dph = ',txloss_dph
  400 + write(10,901) txloss_dph
  401 + write(*,900) ' gmax = ',gmax
  402 + write(10,901) gmax
  403 + write(*,900) ' k3 = ',k3
  404 + write(10,901) k3
  405 + write(*,900) ' beta = ',beta
  406 + write(10,901) beta
  407 + write(*,900) ' mu2 = ',mu2
  408 + write(10,901) mu2
  409 + write(*,900) ' k6 = ',k6
  410 + write(10,901) k6
  411 + write(*,900) ' delta = ',delta
  412 + write(10,901) delta
  413 + write(*,900) ' epsi = ',epsi
  414 + write(10,901) epsi
  415 + write(*,900) ' eg = ',eg
  416 + write(10,901) eg
  417 + write(*,900) ' r1 = ',r1
  418 + write(10,901) r1
  419 + write(*,900) ' r2 = ',r2
  420 + write(10,901) r2
  421 + write(*,900) ' r3 = ',r3
  422 + write(10,901) r3
  423 + write(*,900) ' r4 = ',r4
  424 + write(10,901) r4
  425 + write(*,900) ' r5 = ',r5
  426 + write(10,901) r5
  427 + write(*,900) ' r6 = ',r6
  428 + write(10,901) r6
  429 + write(*,900) ' txloss_dzo = ',txloss_dzo
  430 + write(10,901) txloss_dzo
  431 + write(*,900) ' txloss_fp = ',txloss_fp
  432 + write(10,901) txloss_fp
  433 + write(*,900) ' Migra_zoo = ',Migra_zoo
  434 + write(10,901) Migra_zoo
  435 + write(*,900) ' pmin = ',pmin
  436 + write(10,901) pmin
  437 + write(*,900) ' w_zmax = ',w_zmax
  438 + write(10,901) w_zmax
  439 + write(*,900) ' bertha = ',bertha
  440 + write(10,901) bertha
  441 + write(*,900) ' parcrit = ',parcrit
  442 + write(10,901) parcrit
  443 + write(*,900) ' vb = ',vb
  444 + write(10,901) vb
  445 +!remi
  446 + write(*,900) ' k4 = ',k4
  447 + write(10,901) k4
  448 + write(*,900) ' mu3 = ',mu3
  449 + write(10,901) mu3
  450 + write(*,900) ' eta = ',eta
  451 + write(10,901) eta
  452 + write(*,900) ' mbac = ',mbac
  453 + write(10,901) mbac
  454 + write(*,900) ' dphlossb = ',dphlossb
  455 + write(10,901) dphlossb
  456 + write(*,900) ' dphlossl = ',dphlossl
  457 + write(10,901) dphlossl
  458 + write(*,900) ' dzolossl = ',dzolossl
  459 + write(10,901) dzolossl
  460 + write(*,900) ' dzolossb = ',dzolossb
  461 + write(10,901) dzolossb
  462 + write(*,900) ' fplossl = ',fplossl
  463 + write(10,901) fplossl
  464 + write(*,900) ' fplossb = ',fplossb
  465 + write(10,901) fplossb
  466 + write(*,900) ' msnlossb = ',msnlossb
  467 + write(10,901) msnlossb
  468 +!leak
  469 + write(*,900) ' mldon = ',mldon
  470 + write(10,901) mldon
  471 + write(*,900) ' lmin = ',lmin
  472 + write(10,901) lmin
  473 +! size_w
  474 + write(*,900) ' Phys_w = ',Phys_w
  475 + write(10,901) Phys_w
  476 +!w_msnow
  477 + write(*,900) ' w_p = ',w_p
  478 + write(10,901) w_p
  479 + write(*,900) ' w_dph = ',w_dph
  480 + write(10,901) w_dph
  481 + write(*,900) ' w_dzo = ',w_dzo
  482 + write(10,901) w_dzo
  483 + write(*,900) ' w_fp = ',w_fp
  484 + write(10,901) w_fp
  485 + write(*,900) ' w_msn = ',w_msn
  486 + write(10,901) w_msn
  487 +
  488 + ! write(*,900) ' rho_p = ',rho_p
  489 + ! write(10,901) rho_p
  490 +! write(*,900) ' rho_dph = ',rho_dph
  491 +! write(10,901) rho_dph
  492 + write(*,900) ' rho_dzo = ',rho_dzo
  493 + write(10,901) rho_dzo
  494 + write(*,900) ' rho_fp = ',rho_fp
  495 + write(10,901) rho_fp
  496 + write(*,900) ' rho_msn = ',rho_msn
  497 + write(10,901) rho_msn
  498 + write(*,900) ' coag_coef = ',coag_coef
  499 + write(10,901) coag_coef
  500 + write(*,900) ' betap_p = ',betap_p
  501 + write(10,901) betap_p
  502 +
  503 +!betap_dph,betap_dzo,betap_fp
  504 +
  505 + write(*,900) ' betadph_dph = ',betadph_dph
  506 + write(10,901) betadph_dph
  507 +
  508 +! betadph_dzo,betadph_fp,
  509 +
  510 + write(*,900) ' betadzo_dzo = ',betadzo_dzo
  511 + write(10,901) betadzo_dzo
  512 +!betadzo_fp
  513 + write(*,900) ' betafp_fp = ',betafp_fp
  514 + write(10,901) betafp_fp
  515 +!sti_cst
  516 + write(*,900) ' stip_p = ',stip_p
  517 + write(10,901) stip_p
  518 + write(*,900) ' stip_dph = ',stip_dph
  519 + write(10,901) stip_dph
  520 + write(*,900) ' stip_dzo = ',stip_dzo
  521 + write(10,901) stip_dzo
  522 + write(*,900) ' stip_fp = ',stip_fp
  523 + write(10,901) stip_fp
  524 + write(*,900) ' stidph_dph = ',stidph_dph
  525 + write(10,901) stidph_dph
  526 + write(*,900) ' stidph_dzo = ',stidph_dzo
  527 + write(10,901) stidph_dzo
  528 + write(*,900) ' stidph_fp = ',stidph_fp
  529 + write(10,901) stidph_fp
  530 + write(*,900) ' stidzo_dzo = ',stidzo_dzo
  531 + write(10,901) stidzo_dzo
  532 + write(*,900) ' stidzo_fp = ',stidzo_fp
  533 + write(10,901) stidzo_fp
  534 + write(*,900) ' stifp_fp = ',stifp_fp
  535 + write(10,901) stifp_fp
  536 + write(*,900) ' size_phy_us = ',size_phy_us
  537 + write(10,901) size_phy_us
  538 +!size_phy_up
  539 +!CSF
  540 + write(*,900) ' size_dph_us = ',size_dph_us
  541 + write(10,901) size_dph_us
  542 + write(*,900) ' size_dzo_us = ',size_dzo_us
  543 + write(10,901) size_dzo_us
  544 + write(*,900) ' size_fp_us = ',size_fp_us
  545 + write(10,901) size_fp_us
  546 +
  547 + !size_dph_up = 0.00001
  548 + !size_dzo_up= 0.000100
  549 + !size_fp_up= 0.000050
  550 + write(*,900) ' size_msn = ',size_msn
  551 + write(10,901) size_msn
  552 +!dm_msn
  553 +!diam_msn_us
  554 +!litt_msn_w
  555 + write(*,900) ' dynvis = ',dynvis
  556 + write(10,901) dynvis
  557 + write(*,900) ' kinvis = ',kinvis
  558 + write(10,901) kinvis
  559 + write(*,900) ' kB = ',kB
  560 + write(10,901) kB
  561 + write(*,900) ' Frag_meth = ',Frag_meth
  562 + write(10,901) Frag_meth
  563 + write(*,900) ' swim_brk = ', swim_brk
  564 + write(10,901) swim_brk
  565 +!betaBr
  566 +!betaSh
  567 +!betaDs
  568 +!eps_const
  569 +!eps
  570 +!cons_min
  571 +!Floc_coef
  572 +!coef1,coef2,coef3,coef4,coef5
  573 +!RFV
  574 +!cons_max
  575 +
  576 +900 format (a,f8.5)
  577 +901 format (f8.5)
  578 +
  579 +! Conversion from day to second
  580 + mu5 = mu5 /secs_pr_day
  581 + vp = vp /secs_pr_day
  582 + alpha = alpha /secs_pr_day
  583 + inib = inib /secs_pr_day
  584 + mu1 = mu1 /secs_pr_day
  585 +
  586 + gmax = gmax /secs_pr_day
  587 + mu2 = mu2 /secs_pr_day
  588 + w_zmax = w_zmax /secs_pr_day
  589 +
  590 + vb = vb /secs_pr_day
  591 + remi = remi/secs_pr_day
  592 + mu3 = mu3 /secs_pr_day
  593 + mbac = mbac /secs_pr_day
  594 + dphlossb =dphlossb/secs_pr_day
  595 + dphlossl = dphlossl/secs_pr_day
  596 + dzolossl = dzolossl/secs_pr_day
  597 + dzolossb = dzolossb/secs_pr_day
  598 + fplossl = fplossl/secs_pr_day
  599 + fplossb = fplossb/secs_pr_day
  600 + msnlossb= msnlossb/secs_pr_day
  601 +leak=leak/secs_pr_day
  602 + mldon = mldon /secs_pr_day
  603 +
  604 + w_p = w_p /secs_pr_day
  605 + w_dph = w_dph /secs_pr_day
  606 + w_dzo = w_dzo /secs_pr_day
  607 + w_fp = w_fp /secs_pr_day
  608 + w_msn = w_msn /secs_pr_day
  609 +
  610 +litt_msn_w =litt_msn_w /secs_pr_day
  611 +!Phytoplankton
  612 +txloss_p = txloss_p /secs_pr_day
  613 +betap_p = betap_p /secs_pr_day ! GG-D
  614 +betap_dph = betap_dph /secs_pr_day ! GG-D
  615 +betap_dzo = betap_dzo /secs_pr_day ! GG-D
  616 +betap_fp = betap_fp /secs_pr_day ! GG-D
  617 +
  618 +!Dead-Phytoplankton
  619 +txloss_dph= txloss_dph /secs_pr_day
  620 +betadph_dph =betadph_dph/secs_pr_day
  621 +betadph_dzo=betadph_dzo/secs_pr_day
  622 +betadph_fp=betadph_fp/secs_pr_day
  623 +
  624 +!Dead-Zooplankton
  625 +txloss_dzo= txloss_dzo /secs_pr_day
  626 +betadzo_dzo = betadzo_dzo /secs_pr_day
  627 +betadzo_fp = betadzo_fp /secs_pr_day
  628 +
  629 +!Fecal pellets
  630 +txloss_fp= txloss_fp /secs_pr_day
  631 +betafp_fp = betafp_fp /secs_pr_day
  632 +
  633 +
  634 + swim_brk = swim_brk /secs_pr_day
  635 + !eps cm2. sec-3
  636 +
  637 + out_unit=unit
  638 +
  639 + LEVEL3 'polynow bio module initialised ...'
  640 +
  641 + return
  642 +
  643 +98 LEVEL2 'I could not open bio_polynow.nml'
  644 + LEVEL2 'If thats not what you want you have to supply bio_polynow.nml'
  645 + LEVEL2 'See the bio example on www.gotm.net for a working bio_polynow.nml'
  646 + return
  647 +99 FATAL 'I could not read bio_polynow.nml'
  648 + stop 'init_bio_polynow'
  649 + end subroutine init_bio_polynow
  650 +!EOC
  651 +
  652 +!-----------------------------------------------------------------------
  653 +!BOP
  654 +!
  655 +! !IROUTINE: Initialise the concentration variables
  656 +!
  657 +! !INTERFACE:
  658 + subroutine init_var_polynow(nlev)
  659 +!
  660 +! !DESCRIPTION:
  661 +! Here, the the initial conditions are set and the settling velocities are
  662 +! transferred to all vertical levels. All concentrations are declared
  663 +! as non-negative variables, and it is defined which variables would be
  664 +! taken up by benthic filter feeders.
  665 +!
  666 +! !USES:
  667 + use observations, only: nprof,aprof !CHG3-5
  668 + use meanflow, only: nit,amm,T,S !CHG3-5
  669 +
  670 + IMPLICIT NONE
  671 +
  672 +!
  673 +! !INPUT PARAMETERS:
  674 + integer, intent(in) :: nlev
  675 +
  676 +!
  677 +! !REVISION HISTORY:
  678 +! Original author(s): Hans Burchard & Karsten Bolding
  679 +
  680 +! !LOCAL VARIABLES:
  681 + integer :: i,j
  682 + REALTYPE ::gauss_p,gauss_dph,gauss_dzo,gauss_fp,gauss_msn,gauss_zoo
  683 +
  684 +!EOP
  685 +!-----------------------------------------------------------------------
  686 +!BOC
  687 +
  688 +!-----------------------------------------------------------------------------------
  689 +!-----------------------------------------------------------------------------------
  690 +! Variable INITIAL PROFILES
  691 +!-----------------------------------------------------------------------------------
  692 +!-----------------------------------------------------------------------------------
  693 +
  694 + do i=1,nlev
  695 +
  696 +!-----------------------------------------------------------------------------------
  697 +! Phytoplankton initial profile
  698 +!-----------------------------------------------------------------------------------
  699 +
  700 +!! ---If p_init_value .eq.1 --» Cst initial value for all the depth as mentionned in the nml.
  701 +if (p_init_value .eq. 1.0) then
  702 + cc(p,i)=p_initial
  703 +!! ---If p_init_value .eq.0 --» Initial profile describe according to gaussian curve (Mean + standard error)
  704 +else
  705 + gauss_p=p_initial*exp(-((i-z_p_gauss_init)**2/(2*(sigma_p**2))))
  706 + cc(p,i)= gauss_p
  707 +endif
  708 +
  709 +!-----------------------------------------------------------------------------------
  710 +! Zooplankton initial profiles
  711 +!-----------------------------------------------------------------------------------
  712 +
  713 +! ---If zoo_init_value .eq.1 --» Cst initial value for all the depth as mentionned in the nml.
  714 +if (zoo_init_value .eq. 1.0) then
  715 + cc(z,i)=z_initial
  716 +! ---If zoo_init_value.eq.0 --» Initial profile describe according to gaussian curve (Mean + standard error)
  717 +else
  718 + gauss_zoo=z_initial*exp(-((i-z_zoo_gauss_init)**2/(2*(sigma_zoo**2))))
  719 + cc(z,i)= gauss_zoo
  720 +endif
  721 +!-----------------------------------------------------------------------------------
  722 +! Dead- Phytoplankton initial profile
  723 +!-----------------------------------------------------------------------------------
  724 +
  725 +!! ---If dph_init_value .eq.1 --» Cst initial value for all the depth as mentionned in the nml.
  726 +if (dph_init_value .eq. 1.0) then
  727 + cc(d1,i)=dph_initial
  728 +!! ---If dph_init_value .eq.0 --» Initial profile describe according to gaussian curve (Mean + standard error)
  729 +else
  730 + gauss_dph=dph_initial*exp(-((i-z_dph_gauss_init)**2/(2*(sigma_dph**2))))
  731 + cc(d1,i)= gauss_dph
  732 +endif
  733 +
  734 +!-----------------------------------------------------------------------------------
  735 +! Dead- Zooplankton initial profile
  736 +!-----------------------------------------------------------------------------------
  737 +
  738 +!! ---If dzo_init_value .eq.1 --» Cst initial value for all the depth as mentionned in the nml.
  739 +if (dzo_init_value .eq. 1.0) then
  740 + cc(d2,i)=dzo_initial
  741 +!! ---If dzo_init_value .eq.0 --» Initial profile describe according to gaussian curve (Mean + standard error)
  742 +else
  743 + gauss_dzo=dzo_initial*exp(-((i-z_dzo_gauss_init)**2/(2*(sigma_dzo**2))))
  744 + cc(d2,i)= gauss_dzo
  745 +endif
  746 +
  747 +!-----------------------------------------------------------------------------------
  748 +! Fecal pellets initial profile
  749 +!-----------------------------------------------------------------------------------
  750 +
  751 +!! ---If fp_init_value .eq.1 --» Cst initial value for all the depth as mentionned in the nml.
  752 +if (fp_init_value .eq. 1.0) then
  753 + cc(d3,i)=fp_initial
  754 +!! ---If fp_init_value .eq.0 --» Initial profile describe according to gaussian curve (Mean + standard error)
  755 +else
  756 + gauss_fp=fp_initial*exp(-((i-z_fp_gauss_init)**2/(2*(sigma_fp**2))))
  757 + cc(d3,i)= gauss_fp
  758 +endif
  759 +
  760 +!-----------------------------------------------------------------------------------
  761 +! Marine snow initial profile
  762 +!-----------------------------------------------------------------------------------
  763 +
  764 +!! ---If msn_init_value .eq.1 --» Cst initial value for all the depth as mentionned in the nml.
  765 +if (msn_init_value .eq. 1.0) then
  766 + cc(d4,i)=msn_initial
  767 +!! ---If msn_init_value.eq.0 --» Initial profile describe according to gaussian curve (Mean + standard error)
  768 +else
  769 + gauss_msn=msn_initial*exp(-((i-z_msn_gauss_init)**2/(2*(sigma_msn**2))))
  770 + cc(d4,i)= gauss_msn
  771 +endif
  772 +
  773 +
  774 +!-----------------------------------------------------------------------------------
  775 +! Bacteria- Nitrate/ammonium / LDON initial profiles
  776 +!-----------------------------------------------------------------------------------
  777 + cc(b,i)=b_initial
  778 + cc(n,i)=nprof(i)
  779 + cc(a,i)=aprof(i)
  780 + cc(l,i)=l_initial
  781 +
  782 + end do
  783 +
  784 +!-----------------------------------------------------------------------------------
  785 +! Settling/swimming velocity
  786 +!-----------------------------------------------------------------------------------
  787 +
  788 + do i=0,nlev
  789 + ws(z,i) = _ZERO_
  790 + ws(b,i) = _ZERO_
  791 + ws(n,i) = _ZERO_
  792 + ws(a,i) = _ZERO_
  793 + ws(l,i) = _ZERO_
  794 +
  795 +if(Phys_w .eq. 0.0) then
  796 + ws(p,i) = w_p
  797 + ws(d1,i)= w_dph
  798 + ws(d2,i)= w_dzo
  799 + ws(d3,i)= w_fp
  800 + ws(d4,i)= w_msn
  801 +else
  802 + ws(p,i) =_ZERO_
  803 + ws(d1,i)=_ZERO_
  804 + ws(d2,i)=_ZERO_
  805 + ws(d3,i)=_ZERO_
  806 + ws(d4,i)=_ZERO_
  807 +
  808 +end if
  809 +
  810 +!-----------------------------------------------------------------------------------
  811 +! Marine Snow Size and settling velocity
  812 +!-----------------------------------------------------------------------------------
  813 + cc(taille_intrm,i) =_ZERO_
  814 + cc(taille_coag,i)=_ZERO_
  815 + cc(taille_frag,i)=_ZERO_
  816 +
  817 + cc(taille_msn,i)=_ZERO_
  818 + ws(taille_msn,i)=_ZERO_
  819 +
  820 + cc(settl_msn,i)= _ZERO_
  821 + ws(settl_msn,i) =_ZERO_
  822 +
  823 + end do
  824 +
  825 + posconc(p) = 1
  826 + posconc(z) = 1
  827 + posconc(b) = 1
  828 + posconc(n) = 1
  829 + posconc(a) = 1
  830 + posconc(l) = 1
  831 +
  832 + posconc(d1) = 1 !GG-C
  833 + posconc(d2) = 1 !GG-C
  834 + posconc(d3) = 1 !GG-C
  835 + posconc(d4) = 1 !GG-C
  836 +
  837 +#if 0
  838 + mussels_inhale(p) = .true.
  839 + mussels_inhale(z) = .true.
  840 + mussels_inhale(b) = .false.
  841 + mussels_inhale(n) = .false.
  842 + mussels_inhale(a) = .false.
  843 + mussels_inhale(l) = .true.
  844 +
  845 + mussels_inhale(d1) = .true.
  846 + mussels_inhale(d2) = .true.
  847 + mussels_inhale(d3) = .true.
  848 + mussels_inhale(d4) = .true.
  849 +
  850 +#endif
  851 +
  852 + LEVEL3 'polynow variables initialised ...'
  853 +
  854 + return
  855 +
  856 + end subroutine init_var_polynow
  857 +!EOC
  858 +
  859 +!-----------------------------------------------------------------------
  860 +!BOP
  861 +!
  862 +! !IROUTINE: Providing info on variables
  863 +!
  864 +! !INTERFACE:
  865 + subroutine var_info_polynow()
  866 +!
  867 +! !DESCRIPTION:
  868 +! This subroutine provides information about the variable names as they
  869 +! will be used when storing data in NetCDF files.
  870 +!
  871 +! !USES:
  872 + IMPLICIT NONE
  873 +!
  874 +! !REVISION HISTORY:
  875 +! Original author(s): Hans Burchard & Karsten Bolding
  876 +!
  877 +! !LOCAL VARIABLES:
  878 +!EOP
  879 +!-----------------------------------------------------------------------
  880 +!BOC
  881 + var_names(1) = 'phy'
  882 + var_units(1) = 'mmol/m**3'
  883 + var_long(1) = 'phytoplankton'
  884 +
  885 + var_names(2) = 'zoo'
  886 + var_units(2) = 'mmol/m**3'
  887 + var_long(2) = 'zooplankton'
  888 +
  889 + var_names(3) = 'bac'
  890 + var_units(3) = 'mmol/m**3'
  891 + var_long(3) = 'bacteria'
  892 +
  893 + var_names(4) = 'dph'
  894 + var_units(4) = 'mmol/m**3'
  895 + var_long(4) = 'dead phytoplankton'
  896 +
  897 + var_names(5) = 'nit'
  898 + var_units(5) = 'mmol/m**3'
  899 + var_long(5) = 'nitrate'
  900 +
  901 + var_names(6) = 'amm'