Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gotm_ismer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Dany Dumont
gotm_ismer
Commits
a5d329e7
Commit
a5d329e7
authored
Oct 03, 2018
by
Dany Dumont
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'snow' of gitlasso.uqar.ca:dumoda01/gotm_ismer
parents
11b18235
c946efdb
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
3809 additions
and
11 deletions
+3809
-11
nml/bio_polynow.nml
nml/bio_polynow.nml
+152
-0
src/extras/bio/Makefile
src/extras/bio/Makefile
+3
-1
src/extras/bio/ammonium.F90
src/extras/bio/ammonium.F90
+5
-0
src/extras/bio/bio.F90
src/extras/bio/bio.F90
+94
-2
src/extras/bio/bio_polynow.F90
src/extras/bio/bio_polynow.F90
+3315
-0
src/extras/bio/bio_save.F90
src/extras/bio/bio_save.F90
+181
-6
src/extras/bio/bio_var.F90
src/extras/bio/bio_var.F90
+36
-1
src/extras/bio/nitrate.F90
src/extras/bio/nitrate.F90
+4
-0
src/observations/observations.F90
src/observations/observations.F90
+19
-1
No files found.
nml/bio_polynow.nml
0 → 100644
View file @
a5d329e7
#$Id$
!-------------------------------------------------------------------------------
! Fasham et al. biological model with modifications by Kuehn and Radach
!
! numc= number of compartments for geobiochemical model
!
! p_initial= initial phytoplankton concentration [mmol n/m3]
! z_initial= initial zooplakton concentration [mmol n/m3]
! b_initial= initial bacteria concentration [mmol n/m3]
! dph_initial= initial dph concentration [mmol n/m3]
! dzo_initial= initial dzo concentration [mmol n/m3]
! fp_initial= initial fp concentration [mmol n/m3]
! msn_initial= initial dzo concentration [mmol n/m3]
! n_initial= *** see obs.nml *** [mmol n/m3]
! a_initial= *** see obs.nml *** [mmol n/m3]
! l_initial= initial LDON concentration [mmol n/m3]
! p0 = minimum phytoplankton concentration [mmol n/m3]
! z0 = minimum zooplakton concentration [mmol n/m3]
! b0 = minimum bacteria concentration [mmol n/m3]
! mu5 = nitrification rate [1/day] !!GG-CHG1
! vp = maximum phytoplankton uptake rate [1/day]
! alpha = slope of the PI-curvea [m2/(W day)]
! inib = inhibition slope of the PI-curve (positive) [m2/(W day)]
! kc = attenuation constant for the self shading effect [m**2/mmol N]
! k1 = half saturation constant nitrate uptake [mmol n/m3]
! k2 = half saturation constant ammonium uptake [mmol n/m3]
! mu1 = phytoplankton mortality rate [1/day]
! k5 = half saturation constant phytoplankton mortality [mmol n/m3]
! gamma = exudation fraction [-]
! capt = Percentage of living phyto. captured in msn [%/day] - GG-D
! sp_mort = Phytoplankton non grazing mortality [1/day] - GG-D
! sp_mort2 = Quadratic mortality/aggrgation rate coefficient [1/day] - GG-D
! w_p = phytoplankton settling velocity [m/day]
! stip = Stickiness of choosen Phytoplankton species [-] - GG-D
! stidph = Stickiness of dead Phytoplankton [-] - GG-D
! gmax = maximum ingestion rate [1/day]
! k3 = half saturation constant ingestion [mmol n/m3]
! beta = grazing efficiency [-]
! betamsn = grazing efficiency on marine snow [-] - GG-D
! mu2 = maximum zooplankton loss rate [1/day]
! k6 = half saturation zooplankton loss [mmol n/m3]
! delta = fractional zooplankton loss to LDON [-]
! epsi = fractional zooplankton loss to ammonium [-]
! r1 = grazing preference phytoplankton [-]
! r2 = grazing preference bacteria [-]
! r3 = grazing preference dead phytoplankton (dph) [-] - GG-D
! r4 = grazing preference dead zooplankton (dzo) [-] - GG-D
! r5 = grazing preference fecal pellets (fp) [-] - GG-D
! r6 = grazing preference marine snow (msn) [-] - GG-D
!zingest = Proportion of grazed matter added to zoo. biomass [-] - GG-D
! eg = Percentage of eggestion [%/day] - GG-D
! stidzo = Stickiness of choosen zooplankton species [-] - GG-D
! stifp = Stickiness of fecal pellets [-] - GG-D
! pmin = intensity rariadtion in the water column
! w_zmax = Max. swimming speed for zoo (not exceed 320) [1/day]
! bertha = amplitud coefficient
! parcrit =min. phyto concentration needed for zooplankton
! vb = maximum bacterial uptake rate [1/day]
! k4 = half saturation bacterial uptake [mmol n/m3]
! mu3 = bacteria excretion rate [1/day]
! eta = uptake ratio ammonium:LDON [-]
! mbac = Percentage of bacerias captured in msn [%/day] - GG-D
! dphlossl = Dph breakdown rate [%/day] - GG-D
! dzolossl = Percentage of Dzo loss in LDON [%/day] - GG-D
! dzolossb = Percentage of Dzo loss in bacteria respiration [%/day] - GG-D
! fplossl = Percentage of fp loss in LDON [%/day] - GG-D
! fplossb = Percentage of fp loss in bacteria respiration [%/day] - GG-D
! w_d1 = [1/day]
! w_d2 = [1/day]
! w_d3 = [1/day]
! w_d4 = [1/day]
! mldon = Percentage of LDON used to constitute matrice of msn [%/day] - GG-D
!lmin = LDON limit concentration to become the matrix of msn [mmol n/m3]- GG-D
!Coag_coef = Specification by user of utilisation of model calculated Coagulation coefficient(false) or given parameter(true) [true.false] - GG-D
!betap = Coagulation coefficient of Phytoplankton [1/day]- GG-D
!betadph = Coagulation coefficient of dead Phytoplankton [1/day]- GG-D
!betadzo = Coagulation coefficient of deadzooplankton [1/day]- GG-D
!betafp = Coagulation coefficient of fecal pellets [1/day]- GG-D
!-------------------------------------------------------------------------------
&bio_polynow_nml
numc= 10
p_initial= 0.012
z_initial= 0.012
b_initial= 0.001
dph_initial= 0.012
dzo_initial= 0.012
fp_initial= 0.012
msn_initial= 0.012
l_initial= 0.1
p0= 0.0001
z0= 0.0001
b0= 0.0001
mu5= 0.1
vp= 0.3
alpha= 0.04
inib= 0.06
kc= 0.03
k1= 1.0
k2= 0.8
mu1= 0.05
k5= 0.2
gamma= 0.0
capt= 0.0
sp_mort= 0.0
sp_mort2= 0.0
w_p= 0.5
stip= 0.0
stidph= 0.0
gmax= 0.6
k3= 1.0
beta= 0.625
betamsn= 0.0
mu2= 0.3
k6= 0.2
delta= 0.0
epsi= 0.70
r1= 0.1
r2= 0.2
r3= 0.3
r4= 0.1
r5= 0.2
r6= 0.1
zingest= 0.0
eg= 0.0
stidzo= 0.0
stifp= 0.0
pmin= 0.7
w_zmax= 320
bertha= 0.05
parcrit= 10
vb= 0.
k4= 0.5
mu3= 0.03
eta= 0.0
mbac= 0.0
dphlossl= 0.0
dzolossl= 0.0
dzolossb= 0.0
fplossl= 0.0
fplossb= 0.0
w_d1= 0
w_d2= 0
w_d3= 0
w_d4= 0
mldon= 0.0
lmin= 0.0
coag_coef= .false.
betap= 0.0
betadph= 0.0
betadzo= 0.0
betafp= 0.0
/
src/extras/bio/Makefile
View file @
a5d329e7
...
...
@@ -16,8 +16,9 @@ bio_sed.F90 \
bio_fasham.F90
\
bio_ismer.F90
\
bio_gsj.F90
\
bio_save.F90
\
bio_nocera.F90
\
bio_polynow.F90
\
bio_save.F90
\
bio_npzd4.F90
\
nitrate.F90
\
ammonium.F90
\
...
...
@@ -34,6 +35,7 @@ ${LIB}(bio_ismer.o) \
${LIB}
(
bio_gsj.o
)
\
${LIB}
(
bio_fasham.o
)
\
${LIB}
(
bio_nocera.o
)
\
${LIB}
(
bio_polynow.o
)
\
${LIB}
(
bio_npzd4.o
)
\
${LIB}
(
bio_sed.o
)
\
${LIB}
(
bio_save.o
)
\
...
...
src/extras/bio/ammonium.F90
View file @
a5d329e7
...
...
@@ -180,6 +180,11 @@
do
i
=
1
,
nlev
amm
(
i
)
=
cc
(
6
,
i
)
end
do
else
if
(
bio_model
.eq.
9
)
then
! GG-A
do
i
=
1
,
nlev
amm
(
i
)
=
cc
(
6
,
i
)
end
do
end
if
#endif
...
...
src/extras/bio/bio.F90
View file @
a5d329e7
...
...
@@ -48,9 +48,13 @@
use
bio_mab
,
only
:
init_bio_mab
,
init_var_mab
,
var_info_mab
use
bio_mab
,
only
:
light_mab
,
surface_fluxes_mab
,
do_bio_mab
use
bio_polynow
,
only
:
init_bio_polynow
,
init_var_polynow
,
var_info_polynow
!GG-A
use
bio_polynow
,
only
:
light_polynow
,
do_bio_polynow
!GG-A
use
output
,
only
:
out_fmt
,
write_results
,
ts
use
util
!
! default: all is private.
private
...
...
@@ -58,6 +62,9 @@
! !PUBLIC MEMBER FUNCTIONS:
public
init_bio
,
set_env_bio
,
do_bio
,
get_bio_updates
,
clean_bio
logical
,
public
::
bio_calc
=
.false.
! REALTYPE,public, dimension(:), allocatable :: eps_ !GG-T
!
! !REVISION HISTORY:!
! Original author(s): Hans Burchard & Karsten Bolding
...
...
@@ -353,6 +360,17 @@
call
var_info_npzd4
()
case
(
10
)
! The model for the north Water polynya - NPZD- Sedimentation GG-A
call
init_bio_polynow
(
namlst
,
'bio_polynow.nml'
,
unit
)
call
allocate_memory
(
nlev
)
call
init_var_polynow
(
nlev
)
call
var_info_polynow
()
case
default
stop
"bio: no valid biomodel specified in bio.nml !"
end
select
...
...
@@ -448,9 +466,9 @@
! modules
!
! !INTERFACE:
subroutine
set_env_bio
(
nlev
,
h_
,
t_
,
s_
,
nit_
,
amm_
,
hcb_
,
rho_
,
nuh_
,
rad_
,
wind_
,
&
subroutine
set_env_bio
(
nlev
,
h_
,
t_
,
s_
,
nit_
,
amm_
,
hcb_
,
rho_
,
nuh_
,
rad_
,
wind_
,
&
I_0_
,
w_
,
w_adv_ctr_
)
!
! !DESCRIPTION:
!
! !USES:
...
...
@@ -471,6 +489,8 @@
REALTYPE
,
intent
(
in
)
::
I_0_
REALTYPE
,
optional
,
intent
(
in
)
::
w_
(
0
:
nlev
)
integer
,
optional
,
intent
(
in
)
::
w_adv_ctr_
!
! !REVISION HISTORY:
! Original author(s): Hans Burchard & Karsten Bolding
...
...
@@ -494,6 +514,9 @@
if
(
present
(
w_
))
w
=
w_
if
(
present
(
w_adv_ctr_
))
w_adv_ctr
=
w_adv_ctr_
return
end
subroutine
set_env_bio
!EOC
...
...
@@ -742,6 +765,10 @@
case
(
9
)
call
light_npzd4
(
nlev
,
bioshade_feedback
)
call
ode_solver
(
ode_method
,
numc
,
nlev
,
dt_eff
,
cc
,
do_bio_npzd4
)
case
(
10
)
call
light_polynow
(
nlev
,
bioshade_feedback
)
call
ode_solver
(
ode_method
,
numc
,
nlev
,
dt_eff
,
cc
,
do_bio_polynow
)
end
select
end
do
...
...
@@ -820,6 +847,17 @@
if
(
allocated
(
var_units
))
deallocate
(
var_units
)
if
(
allocated
(
var_long
))
deallocate
(
var_long
)
!Stickiness
if
(
allocated
(
sti_2p
))
deallocate
(
sti_2p
)
if
(
allocated
(
sti_pdph
))
deallocate
(
sti_pdph
)
if
(
allocated
(
sti_pdzo
))
deallocate
(
sti_pdzo
)
if
(
allocated
(
sti_pfp
))
deallocate
(
sti_pfp
)
if
(
allocated
(
sti_2dph
))
deallocate
(
sti_2dph
)
if
(
allocated
(
sti_dphdzo
))
deallocate
(
sti_dphdzo
)
if
(
allocated
(
sti_dphfp
))
deallocate
(
sti_dphfp
)
if
(
allocated
(
sti_2dzo
))
deallocate
(
sti_2dzo
)
if
(
allocated
(
sti_dzofp
))
deallocate
(
sti_dzofp
)
if
(
allocated
(
sti_2fp
))
deallocate
(
sti_2fp
)
!DD
if
(
allocated
(
lumlim1
))
deallocate
(
lumlim1
)
if
(
allocated
(
nitlim1
))
deallocate
(
nitlim1
)
...
...
@@ -829,6 +867,15 @@
if
(
allocated
(
ammlim2
))
deallocate
(
ammlim2
)
if
(
allocated
(
ppnet
))
deallocate
(
ppnet
)
if
(
allocated
(
flux_msn
))
deallocate
(
flux_msn
)
if
(
allocated
(
Flux_P
))
deallocate
(
Flux_P
)
if
(
allocated
(
Flux_D1
))
deallocate
(
Flux_D1
)
if
(
allocated
(
Flux_D2
))
deallocate
(
Flux_D2
)
if
(
allocated
(
Flux_D3
))
deallocate
(
Flux_D3
)
if
(
allocated
(
size_msnow
))
deallocate
(
size_msnow
)
if
(
allocated
(
w_msn_lev
))
deallocate
(
w_msn_lev
)
! The external provide arrays
if
(
allocated
(
h
))
deallocate
(
h
)
if
(
allocated
(
nuh
))
deallocate
(
nuh
)
...
...
@@ -912,6 +959,29 @@
allocate
(
var_long
(
numc
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'init_bio(): Error allocating var_long)'
!Stickiness
allocate
(
sti_2p
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
STOP
'init_bio: Error allocating (sti_2p)'
allocate
(
sti_pdph
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
STOP
'init_bio: Error allocating (sti_pdph)'
allocate
(
sti_pdzo
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
STOP
'init_bio: Error allocating (sti_pdzo)'
allocate
(
sti_pfp
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
STOP
'init_bio: Error allocating (sti_pfp)'
allocate
(
sti_2dph
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
STOP
'init_bio: Error allocating (sti_2dph)'
allocate
(
sti_dphdzo
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
STOP
'init_bio: Error allocating (sti_dphdzo)'
allocate
(
sti_dphfp
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
STOP
'init_bio: Error allocating (sti_dphfp)'
allocate
(
sti_2dzo
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
STOP
'init_bio: Error allocating (sti_2dzo)'
allocate
(
sti_dzofp
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
STOP
'init_bio: Error allocating (sti_dzofp)'
allocate
(
sti_2fp
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
STOP
'init_bio: Error allocating (sti_2fp)'
!DD
allocate
(
lumlim1
(
0
:
nlev
),
stat
=
rc
)
...
...
@@ -935,6 +1005,28 @@
allocate
(
ppnet
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'init_bio(): Error allocating (ppnet)'
allocate
(
flux_msn
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'init_bio(): Error allocating (flux_msn)'
allocate
(
Flux_P
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'init_bio(): Error allocating (Flux_P)'
allocate
(
Flux_D1
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'init_bio(): Error allocating (Flux_D1)'
allocate
(
Flux_D2
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'init_bio(): Error allocating (Flux_D2)'
allocate
(
Flux_D3
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'init_bio(): Error allocating (Flux_D3)'
allocate
(
size_msnow
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'init_bio(): Error allocating (size_msnow)'
allocate
(
w_msn_lev
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'init_bio(): Error allocating (w_msn_lev)'
! The external provide arrays
allocate
(
h
(
0
:
nlev
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'init_bio(): Error allocating (h)'
...
...
src/extras/bio/bio_polynow.F90
0 → 100644
View file @
a5d329e7
This diff is collapsed.
Click to expand it.
src/extras/bio/bio_save.F90
View file @
a5d329e7
...
...
@@ -14,6 +14,7 @@
! !USES:
use
bio_var
use
output
,
only
:
out_fmt
,
ts
#ifdef NETCDF_FMT
use
ncdfout
,
only
:
ncid
use
ncdfout
,
only
:
lon_dim
,
lat_dim
,
z_dim
,
time_dim
,
dims
...
...
@@ -28,6 +29,7 @@
! !INPUT PARAMETERS:
integer
,
intent
(
in
)
::
nlev
REALTYPE
,
intent
(
in
)
::
totn
!
! !REVISION HISTORY:
! Original author(s): Hans Burchard & Karsten Bolding
...
...
@@ -48,6 +50,9 @@
first
=
.true.
end
if
select
case
(
out_fmt
)
!-----------------------------------------------------------------------------------
! Ascii format for the output
!-----------------------------------------------------------------------------------
case
(
ASCII
)
if
(
first
)
then
open
(
out_unit
,
file
=
'bio.out'
,
status
=
'unknown'
)
...
...
@@ -64,6 +69,9 @@
end
do
115
format
(
F10.4
,
100
(
1x
,
E10.4E2
))
!-----------------------------------------------------------------------------------
! NETCDF format for the output
!-----------------------------------------------------------------------------------
case
(
NETCDF
)
#ifdef NETCDF_FMT
if
(
first
)
then
...
...
@@ -82,24 +90,100 @@
units
=
var_units
(
n
),
&
long_name
=
var_long
(
n
))
end
do
!-----------------------------------------------------------------------------------
!Prepare the new variable for the NETCDF output file as well as informations
!-----------------------------------------------------------------------------------
!Density of the fluid at each level
iret
=
new_nc_variable
(
ncid
,
'rho'
,
NF_REAL
,
4
,
dims
,
rho_id
)
iret
=
set_attributes
(
ncid
,
rho_id
,
units
=
'kg.m-3'
,
long_name
=
'Density'
)
! Sedimentation or swimming rate of particulate matter
! Sedimentation or swimming rate of particulate matter
! Living phytoplankton
iret
=
new_nc_variable
(
ncid
,
'wp'
,
NF_REAL
,
4
,
dims
,
wp_id
)
iret
=
set_attributes
(
ncid
,
wp_id
,
units
=
'm/day'
,
&
long_name
=
'
p
hytoplancton settling velocity'
)
long_name
=
'
P
hytoplancton settling velocity'
)
! Living zooplankton
! Living zooplankton
!Nocera Model
if
(
bio_model
.eq.
8
)
then
iret
=
new_nc_variable
(
ncid
,
'wz'
,
NF_REAL
,
4
,
dims
,
wz_id
)
iret
=
set_attributes
(
ncid
,
wz_id
,
units
=
'm/day'
,
&
long_name
=
'zooplancton swimming velocity'
)
end
if
!CHG4 Diagnostic du PAR
!Polynow model
if
(
bio_model
.eq.
10
)
then
! Living zooplankton
iret
=
new_nc_variable
(
ncid
,
'wz'
,
NF_REAL
,
4
,
dims
,
wz_id
)
iret
=
set_attributes
(
ncid
,
wz_id
,
units
=
'm/day'
,
&
long_name
=
'Zooplancton swimming velocity'
)
! Dead Phytoplankton
iret
=
new_nc_variable
(
ncid
,
'wd1'
,
NF_REAL
,
4
,
dims
,
wd1_id
)
iret
=
set_attributes
(
ncid
,
wd1_id
,
units
=
'm/day'
,
&
long_name
=
'Dead Phytoplankton settling velocity'
)
! Dead zooplankton
iret
=
new_nc_variable
(
ncid
,
'wd2'
,
NF_REAL
,
4
,
dims
,
wd2_id
)
iret
=
set_attributes
(
ncid
,
wd2_id
,
units
=
'm/day'
,
&
long_name
=
'Dead Zooplankton settling velocity'
)
! Fecals pellets
iret
=
new_nc_variable
(
ncid
,
'wd3'
,
NF_REAL
,
4
,
dims
,
wd3_id
)
iret
=
set_attributes
(
ncid
,
wd3_id
,
units
=
'm/day'
,
&
long_name
=
'Fecal pellets settling velocity'
)
! Marine Snow
iret
=
new_nc_variable
(
ncid
,
'wd4'
,
NF_REAL
,
4
,
dims
,
wd4_id
)
iret
=
set_attributes
(
ncid
,
wd4_id
,
units
=
'm/day'
,
&
long_name
=
'Marine snow settling velocity (Calc)'
)
! Stickiness
! 2 Living phytoplankton
iret
=
new_nc_variable
(
ncid
,
'sti_2p'
,
NF_REAL
,
4
,
dims
,
sti_2p_id
)
iret
=
set_attributes
(
ncid
,
sti_2p_id
,
&
long_name
=
'Stickiness Phy & Phy'
)
! Living Phytoplankton with dead phytoplankton
iret
=
new_nc_variable
(
ncid
,
'sti_pdph'
,
NF_REAL
,
4
,
dims
,
sti_pdph_id
)
iret
=
set_attributes
(
ncid
,
sti_pdph_id
,
&
long_name
=
'Stickiness Phy & Dph'
)
! Living Phytoplankton with dead zooplankton
iret
=
new_nc_variable
(
ncid
,
'sti_pdzo'
,
NF_REAL
,
4
,
dims
,
sti_pdzo_id
)
iret
=
set_attributes
(
ncid
,
sti_pdzo_id
,
&
long_name
=
'Stickiness Phy & Dzo'
)
! Living Phytoplankton with fecal pellets
iret
=
new_nc_variable
(
ncid
,
'sti_pfp'
,
NF_REAL
,
4
,
dims
,
sti_pfp_id
)
iret
=
set_attributes
(
ncid
,
sti_pfp_id
,
&
long_name
=
'Stickiness Phy & Fp'
)
! 2 Dead phytoplankton
iret
=
new_nc_variable
(
ncid
,
'sti_2dph'
,
NF_REAL
,
4
,
dims
,
sti_2dph_id
)
iret
=
set_attributes
(
ncid
,
sti_2dph_id
,
&
long_name
=
'Stickiness Dph & Dph'
)
! Dead Phytoplankton with dead zooplankton
iret
=
new_nc_variable
(
ncid
,
'sti_dphdzo'
,
NF_REAL
,
4
,
dims
,
sti_dphdzo_id
)
iret
=
set_attributes
(
ncid
,
sti_dphdzo_id
,
&
long_name
=
'Stickiness Dph & Dzo'
)
! Dead Phytoplankton with fecal pellets
iret
=
new_nc_variable
(
ncid
,
'sti_dphfp'
,
NF_REAL
,
4
,
dims
,
sti_dphfp_id
)
iret
=
set_attributes
(
ncid
,
sti_dphfp_id
,
&
long_name
=
'Stickiness Dph & Fp'
)
! 2 Dead zooplankton
iret
=
new_nc_variable
(
ncid
,
'sti_2dzo'
,
NF_REAL
,
4
,
dims
,
sti_2dzo_id
)
iret
=
set_attributes
(
ncid
,
sti_2dzo_id
,
&
long_name
=
'Stickiness Dzo & Dzo'
)
! Dead zooplankton with fecal pellets
iret
=
new_nc_variable
(
ncid
,
'sti_dzofp'
,
NF_REAL
,
4
,
dims
,
sti_dzofp_id
)
iret
=
set_attributes
(
ncid
,
sti_dzofp_id
,
&
long_name
=
'Stickiness Dzo & Fp'
)
! 2 fecal pellets
iret
=
new_nc_variable
(
ncid
,
'sti_2fp'
,
NF_REAL
,
4
,
dims
,
sti_2fp_id
)
iret
=
set_attributes
(
ncid
,
sti_2fp_id
,
&
long_name
=
'Stickiness Fp & Fp'
)
end
if
!CHG4 Diagnostic du PAR
iret
=
new_nc_variable
(
ncid
,
'par'
,
NF_REAL
,
4
,
dims
,
par_id
)
iret
=
set_attributes
(
ncid
,
par_id
,
units
=
'W/m2'
,
long_name
=
'PAR'
)
!DD Diagnostic des fonctions de croissance
!DD Diagnostic des fonctions de croissance
iret
=
new_nc_variable
(
ncid
,
'lumlim1'
,
NF_REAL
,
4
,
dims
,
lumlim1_id
)
iret
=
set_attributes
(
ncid
,
lumlim1_id
,
units
=
'1/day'
,
&
long_name
=
'light limited growth rate for picophyto'
)
...
...
@@ -117,7 +201,26 @@
iret
=
new_nc_variable
(
ncid
,
'ppnet'
,
NF_REAL
,
4
,
dims
,
ppnet_id
)
iret
=
set_attributes
(
ncid
,
ppnet_id
,
units
=
'1/day'
,
long_name
=
'net primary production rate'
)
!DD Diagnostic de npar (nb de particules lagrangiennes) pour bebogage
!Polynow model
if
(
bio_model
.eq.
10
)
then
! Total flux of particle reaching msn
iret
=
new_nc_variable
(
ncid
,
'flux_msn'
,
NF_REAL
,
4
,
dims
,
flux_msn_id
)
iret
=
set_attributes
(
ncid
,
flux_msn_id
,
units
=
'1/day'
,
long_name
=
'flux_msn'
)
! Flux of Phyto going to msn
iret
=
new_nc_variable
(
ncid
,
'Flux_P'
,
NF_REAL
,
4
,
dims
,
Flux_P_id
)
iret
=
set_attributes
(
ncid
,
Flux_P_id
,
units
=
'1/day'
,
long_name
=
'Flux_P'
)
! Flux of DPH going to msn
iret
=
new_nc_variable
(
ncid
,
'Flux_D1'
,
NF_REAL
,
4
,
dims
,
Flux_D1_id
)
iret
=
set_attributes
(
ncid
,
Flux_D1_id
,
units
=
'1/day'
,
long_name
=
'Flux_D1'
)
! Flux of DZO going to msn
iret
=
new_nc_variable
(
ncid
,
'Flux_D2'
,
NF_REAL
,
4
,
dims
,
Flux_D2_id
)
iret
=
set_attributes
(
ncid
,
Flux_D2_id
,
units
=
'1/day'
,
long_name
=
'Flux_D2'
)
! Flux of FP going to msn
iret
=
new_nc_variable
(
ncid
,
'Flux_D3'
,
NF_REAL
,
4
,
dims
,
Flux_D3_id
)
iret
=
set_attributes
(
ncid
,
Flux_D3_id
,
units
=
'1/day'
,
long_name
=
'Flux_D3'
)
endif
!DD Diagnostic de npar (nb de particules lagrangiennes) pour bebogage
!iret = new_nc_variable(ncid,'npar',NF_REAL,4,dims,npar_id)
!iret = set_attributes(ncid,npar_id,units='', &
! long_name='nb of particles per level')
...
...
@@ -130,17 +233,80 @@
iret
=
define_mode
(
ncid
,
.false.
)
end
if
!-----------------------------------------------------------------------------------
!Prepare to store the data in the NetCDF file
!-----------------------------------------------------------------------------------
do
n
=
1
,
numc
iret
=
store_data
(
ncid
,
var_ids
(
n
),
XYZT_SHAPE
,
nlev
,
array
=
cc
(
n
,:))
end
do
!Density of the fluid at each level
iret
=
store_data
(
ncid
,
rho_id
,
XYZT_SHAPE
,
nlev
,
array
=
rho
)
! Sedimentation rate of phytoplankton
iret
=
store_data
(
ncid
,
wp_id
,
XYZT_SHAPE
,
nlev
,
array
=
secs_pr_day
*
ws
(
1
,:))
! Swimming velocity of zootoplankton
!Nocera model
if
(
bio_model
.eq.
8
)
then
iret
=
store_data
(
ncid
,
wz_id
,
XYZT_SHAPE
,
nlev
,
array
=
secs_pr_day
*
ws
(
2
,:))
end
if
!Polynow model - [Values fond un ws(x,:) --> x represent the variables attribution made in bio_polynow.
!As example : : p=1,z=2,b=3,d1(dph)=4,n=5,a=6,l=7,d2(dzo)=8,d3(fp)=9,d4(msn)=10
if
(
bio_model
.eq.
10
)
then
! Here it is needed to multiply by 86400(secs_pr_day) in order to have the model ouptu (in s) convert in per day
! Living zooplankton
iret
=
store_data
(
ncid
,
wz_id
,
XYZT_SHAPE
,
nlev
,
array
=
secs_pr_day
*
ws
(
2
,:))
! Dead Phytoplankton
iret
=
store_data
(
ncid
,
wd1_id
,
XYZT_SHAPE
,
nlev
,
array
=
secs_pr_day
*
ws
(
4
,:))
! Dead zooplankton
iret
=
store_data
(
ncid
,
wd2_id
,
XYZT_SHAPE
,
nlev
,
array
=
secs_pr_day
*
ws
(
8
,:))
! Fecal pellets
iret
=
store_data
(
ncid
,
wd3_id
,
XYZT_SHAPE
,
nlev
,
array
=
secs_pr_day
*
ws
(
9
,:))
! Marine Snow
iret
=
store_data
(
ncid
,
wd4_id
,
XYZT_SHAPE
,
nlev
,
array
=
secs_pr_day
*
ws
(
10
,:))
! Stickiness
! 2 Living phytoplankton
iret
=
store_data
(
ncid
,
sti_2p_id
,
XYZT_SHAPE
,
nlev
,
array
=
sti_2p
(:))
! Living Phytoplankton with dead phytoplankton
iret
=
store_data
(
ncid
,
sti_pdph_id
,
XYZT_SHAPE
,
nlev
,
array
=
sti_pdph
(:))
! Living Phytoplankton with dead zooplankton
iret
=
store_data
(
ncid
,
sti_pdzo_id
,
XYZT_SHAPE
,
nlev
,
array
=
sti_pdzo
(:))
! Living Phytoplankton with fecal pellets
iret
=
store_data
(
ncid
,
sti_pfp_id
,
XYZT_SHAPE
,
nlev
,
array
=
sti_pfp
(:))
! 2 Dead phytoplankton
iret
=
store_data
(
ncid
,
sti_2dph_id
,
XYZT_SHAPE
,
nlev
,
array
=
sti_2dph
(:))
! Dead Phytoplankton with dead zooplankton
iret
=
store_data
(
ncid
,
sti_dphdzo_id
,
XYZT_SHAPE
,
nlev
,
array
=
sti_dphdzo
(:))
! Dead Phytoplankton with fecal pellets
iret
=
store_data
(
ncid
,
sti_dphfp_id
,
XYZT_SHAPE
,
nlev
,
array
=
sti_dphfp
(:))
! 2 Dead zooplankton
iret
=
store_data
(
ncid
,
sti_2dzo_id
,
XYZT_SHAPE
,
nlev
,
array
=
sti_2dzo
(:))
! Dead zooplankton with fecal pellets
iret
=
store_data
(
ncid
,
sti_dzofp_id
,
XYZT_SHAPE
,
nlev
,
array
=
sti_dzofp
(:))
! 2 fecal pellets
iret
=
store_data
(
ncid
,
sti_2fp_id
,
XYZT_SHAPE
,
nlev
,
array
=
sti_2fp
(:))
! Rho_F
! iret = store_data(ncid,rho_F_id,XYZT_SHAPE,nlev,array=)
end
if
! PAR
iret
=
store_data
(
ncid
,
par_id
,
XYZT_SHAPE
,
nlev
,
array
=
par
(:))
...
...
@@ -153,6 +319,15 @@
iret
=
store_data
(
ncid
,
ammlim2_id
,
XYZT_SHAPE
,
nlev
,
array
=
ammlim2
(:))
iret