Commit e51ab71835ec9d8cfc6a5f543a4895cc6dfbcb56

Authored by Ariadna Nocera
2 parents bfd9902e a5d329e7
Exists in master and in 1 other branch snow

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

nml/bio_gsj.nml
... ... @@ -111,6 +111,7 @@
111 111 g2max = 1.0
112 112 k3 = 1.0
113 113 beta = 0.625
  114 + txc4zoo = .true.
114 115 mu21 = 0.3
115 116 mu21max = 1.5
116 117 bhc = 11.1
... ...
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 + /
... ...
scripts/shell/run_enp.sh 0 → 100755
... ... @@ -0,0 +1,108 @@
  1 +#!/bin/bash
  2 +
  3 +export EXPDIR=$(pwd)
  4 +echo $EXPDIR
  5 +
  6 +if [ $# -ne 1 ]
  7 +then
  8 + echo ""
  9 + echo "Usage: $0 <exp>"
  10 + echo ""
  11 + echo " <exp> should be one of the following:"
  12 + echo " 0910_E1 "
  13 + echo " 0910_E2 "
  14 + echo " 1011_E1 "
  15 + echo " 1011_E2 "
  16 + exit
  17 +fi
  18 +
  19 +exp=$1
  20 +
  21 +echo " Linking entry parameters and files for $exp"
  22 +rm -f *.dat
  23 +rm -f gotmrun.mal
  24 +rm -f obs.nml
  25 +rm -f airsea.mal
  26 +ln -sf $exp/enp/*.mal .
  27 +ln -sf $exp/*.nml .
  28 +ln -sf $exp/*.dat .
  29 +ln -sf enp_files/*.dat .
  30 +
  31 +if [ ! airsea.mal ] || [ ! gotmrun.mal ]
  32 +then
  33 + echo " ERROR : .mal files missing"
  34 + exit
  35 +else
  36 +
  37 +echo "-----------------------------------------------------"
  38 +echo " run_enp.sh"
  39 +echo "-----------------------------------------------------"
  40 +
  41 +
  42 +# Parameters for the forcings
  43 +
  44 +
  45 +count=1
  46 +
  47 +for file in ecmwf_meteo_*.dat
  48 +do
  49 +
  50 +count=`expr 000$count | tail -4c`
  51 +#count=`expr 000$count | tail -8c`
  52 +echo $count
  53 +
  54 +if [ -f airsea.nml ]
  55 +then
  56 + rm -f airsea.nml
  57 +fi
  58 +
  59 +cat airsea.mal | sed \
  60 + -e "s/meteofile/ecmwf_meteo_$count.dat/g" \
  61 + > airsea.nml
  62 +
  63 +if [ -f airsea.nml ]
  64 +then
  65 + echo " airsea.nml created"
  66 +fi
  67 +
  68 +if [ -f gotmrun.nml ]
  69 +then
  70 + rm -f gotmrun.nml
  71 +fi
  72 +
  73 +cat gotmrun.mal | sed \
  74 + -e "s/experiment_name/$count/g" \
  75 + > gotmrun.nml
  76 +
  77 +if [ -f gotmrun.nml ]
  78 +then
  79 + echo " gotmrun.nml created"
  80 +fi
  81 +
  82 +strt=`date +%H:%M:%S`
  83 +echo " runnning with "$file
  84 +echo " started at "$strt
  85 +
  86 +./gotm_prod_IFORT >& $count.out
  87 +
  88 +end=`date +%H:%M:%S`
  89 +echo " ended at "$end
  90 +
  91 +mv $count.nc $exp/enp
  92 +mv $count.out $exp/enp/
  93 +mv ${count}_fasham.par $exp/enp/
  94 +
  95 +count=`expr $count + 1`
  96 +
  97 +# Uncoment for debugging
  98 +if [ `expr $count` == 4 ]
  99 +then
  100 + echo " Exiting"
  101 + exit
  102 +fi
  103 +
  104 +done
  105 +
  106 +fi
  107 +
  108 +exit
... ...
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,15 @@
829 867 if (allocated(ammlim2)) deallocate(ammlim2)
830 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 879 ! The external provide arrays
833 880 if (allocated(h)) deallocate(h)
834 881 if (allocated(nuh)) deallocate(nuh)
... ... @@ -912,6 +959,29 @@
912 959 allocate(var_long(numc),stat=rc)
913 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 985 !DD
916 986  
917 987 allocate(lumlim1(0:nlev),stat=rc)
... ... @@ -935,6 +1005,28 @@
935 1005 allocate(ppnet(0:nlev),stat=rc)
936 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 1030 ! The external provide arrays
939 1031 allocate(h(0:nlev),stat=rc)
940 1032 if (rc /= 0) stop 'init_bio(): Error allocating (h)'
... ...
src/extras/bio/bio_gsj.F90
... ... @@ -64,7 +64,8 @@
64 64 REALTYPE :: p0 = 0.0
65 65 REALTYPE :: z0 = 0.0
66 66 REALTYPE :: b0 = 0.0
67   - LOGICAL :: mte = .true.
  67 + LOGICAL :: mte = .false.
  68 + LOGICAL :: txc4zoo = .false.
68 69 REALTYPE :: ca1 = 3.61
69 70 REALTYPE :: ca2 = 14.58
70 71 REALTYPE :: ch1 = 3.265
... ... @@ -177,6 +178,7 @@
177 178 ! mu22 : Maximum large zooplankton loss rate
178 179 ! k6 : Half saturation constant of zooplankton loss (small and large)
179 180 !! k7 : Half saturation constant of zooplankton loss by hydrocarbon toxicity (small and large)
  181 +! txc4zoo : Logical to make hydrocarbon toxic for zooplankton
180 182 ! bhc : Slope factor of zooplankton mortality for sigmoïd exponential type curve
181 183 ! mhc : Factor of zooplankton mortality for Michaelis-Menten exponential type curve
182 184 ! hc0 : Hydrocarbon sill concentration for zooplankton mortality by hydrocarbons
... ... @@ -241,7 +243,7 @@
241 243 r11,r12,r13,r14,r21,r22,r23,r24, &
242 244 vb1,vb2,k4,k10,w_h,mu3,etaa,etah,mu4,w_d,kc,mu5, &
243 245 theta,w_p1max,w_p1min,w_p2min,w_p2max, &
244   - mte,ca1,ca2,ch1,ch2,amratio,hmratio
  246 + txc4zoo,mte,ca1,ca2,ch1,ch2,amratio,hmratio
245 247  
246 248 !EOP
247 249 !-----------------------------------------------------------------------
... ... @@ -766,10 +768,15 @@
766 768 nitlim2(ci) =qn2
767 769 ammlim2(ci) =qa2
768 770  
769   - ! Hydrocarbon inhibition factors
770   - !mu21hc = mu21+(mu21max-mu21)/(1d0 + exp(-1d0*(cc(hc,ci)-k6hc)/bhc))
771   - mu21hc = mu21+((mu21max-mu21)*(cc(hc,ci))**mhc)/((cc(hc,ci))**mhc + k6hc**mhc)
772   - mu22hc = mu21hc
  771 + ! Hydrocarbon inhibition factors
  772 + !mu21hc = mu21+(mu21max-mu21)/(1d0 + exp(-1d0*(cc(hc,ci)-k6hc)/bhc))
  773 + if (txc4zoo) then
  774 + mu21hc = mu21+((mu21max-mu21)*(cc(hc,ci))**mhc)/((cc(hc,ci))**mhc + k6hc**mhc)
  775 + mu22hc = mu21hc
  776 + else
  777 + mu21hc = mu21
  778 + mu22hc = mu22
  779 + endif
773 780  
774 781 ! Nutrient uptake by pico- and nano-phytoplankton
775 782 dd(n,p1,ci) =amr1*ff1*qn1*(cc(p1,ci)+p0)
... ...
src/extras/bio/bio_polynow.F90 0 → 100644
... ... @@ -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