CNPDIAsolve {CNPDIA} | R Documentation |
CNPDIAsolve
finds the steady-state solution of the CNPDIA model.
CNPDIAsolve (parms = list(), yini = NULL, gridtype = 1, Grid = NULL, porosity = NULL, bioturbation = NULL, irrigation = NULL, surface = NULL, diffusionfactor = NULL, dynamicbottomwater = FALSE, ratefactor = NULL, verbose = FALSE, ...)
parms |
A list with parameter values, Available parameters can be listed using function CNPDIAparms. See details. |
gridtype |
Type of grid: |
Grid |
If specified: either an object, as returned by |
porosity |
If specified, either an object with porosities ([-]) as returned by |
bioturbation |
If specified, either an object with bioturbation rates (units [cm2/d]) as returned by |
irrigation |
If specified, either an object with irrigation rates (units [/d]) as returned by |
surface |
If specified, either an object with surface areas (units [cm2]) as returned by Note that the surface values should be consistent withe the |
diffusionfactor |
The multiplication factor necessary to go from molecular diffusion to effective sediment diffusion, i.e. that takes into account tortuosity.
If specified, either an object with these factors ([-]) as returned by |
yini |
Initial guess of the steady-state solution. |
dynamicbottomwater |
If |
ratefactor |
|
verbose |
If TRUE, will write progession to the screen . |
... |
Any argument passed to the steady-state solver. |
To solve the model, a steady-state solver from package rootSolve
(here we used steady.1D
) is
used.
CNPDIAsolve
returns an object of class FESDIAstd
, and of class steady1D
, as generated by the solvers from R-package rootSolve
(steady.1D[rootSolve]).
It contains, a.o. the elements:
y
, with the state variables at steady-state (FDET, SDET, O2, NO3, NO2, NH3, ODU, PO4, FeP, CaP, DIC
).
O2flux, O2deepflux, NO3flux, NO3deepflux, NO2flux, NO2deepflux, NH3flux, NH3deepflux,
ODUflux, ODUdeepflux, PO4flux, PO4deepflux, DICflux, DICdeepflux,
FDETflux, FDETdeepflux, SDETflux, SDETdeepflux, FePdeepflux, CaPdeepflux,
OrgCflux, OrgNflux, OrgPflux
, the sediment-water and burial fluxes, in nmol/cm2/d.
DINDIPflux, DINDIPmean, DINDIPdeep
, the dissolved nitrogen to phosphorus ratio of flux, sediment concentrations and deep (burial) concentration.
TotMin, TotOxic, TotDenit, TotAnoxic
, total mineralisation, total oxic mineralisation, denitrification and anoxic mineralisation, in nmol/cm2/d.
PartOxic, PartDenit, PartAnoxic
, the fraction of mineralisation due to oxic, denitrification and anoxic mineralisation.
TotNitri, TotODUoxid, TotFePprod, TotCaPprod, TotFePdesorp, TotCaPdiss, TotNprod, TotPprod, TotNH3ads
, integrated rates, nmol/cm2/d.
PartPremoved, PartNremoved
, the total P and N removed, relative to its production.
TOC
, the Total organic carbon concentration profile, %.
Cprod,Nprod,Pprod,Oxicmin,Denitrific,anoxicmin,nitri,oduox,odudepo,FePadsorp,CaPprod
, rate profiles, nm/cm3 liquid/d.
FePdesorp,CaPdiss
, rate profiles, nm/cm3 solid/d.
Karline Soetaert
Soetaert K, PMJ Herman and JJ Middelburg, 1996a. A model of early diagenetic processes from the shelf to abyssal depths. Geochimica Cosmochimica Acta, 60(6):1019-1040.
Soetaert K, PMJ Herman and JJ Middelburg, 1996b. Dynamic response of deep-sea sediments to seasonal variation: a model. Limnol. Oceanogr. 41(8): 1651-1668.
#=========================================== # Show parameter values #=========================================== CNPDIAparms() par(mar = c(3,3,3,3)) #=========================================== # Runs with different carbon fluxes #=========================================== out <- CNPDIAsolve() out2 <- CNPDIAsolve(parms = list(Cflux = 200*1e5/12/365)) out3 <- CNPDIAsolve(parms = list(Cflux = 2*1e5/12/365)) plot(out, out2, out3, xyswap = TRUE, grid = CNPDIAdepth(out), ylim = c(20,0), mfrow = c(3, 4)) CNPDIAbudgetO2(out) #=========================================== # long-distance reactions #=========================================== out2 <- CNPDIAsolve(parms = list(Cflux = 100*1e5/12/365)) out2b <- CNPDIAsolve(parms = list(Cflux = 100*1e5/12/365, rSurfODUox = 10, ODUoxdepth = 1), yini = out2$y) out2c <- CNPDIAsolve(parms = list(Cflux = 100*1e5/12/365, rSurfODUox = 10, ODUoxdepth = 5), yini = out2b$y) plot(out2, out2b, out2c, xyswap = TRUE, grid = CNPDIAdepth(out2), which = c("O2","ODU"), ylim = list(c(1,0), c(10,0)), log = list("","x")) plot(out2b, out2c, xyswap = TRUE, grid = CNPDIAdepth(out2), which = c("O2","ODU"), ylim = list(c(1,0), c(10,0))) #=========================================== # Dynamic bottom water concentrations #=========================================== std <- CNPDIAsolve(parms = list(Cflux = 20*1e5/12/365)) BWs <- CNPDIAparms(std, as.vector = TRUE)[c("O2bw", "NO3bw", "NO2bw", "NH3bw", "ODUbw", "DICbw", "PO4bw")] yini <- rbind(c(FDETbw = 0, SDETbw = 0, BWs, FePbw = 0, CaPbw = 0, Padsbw=0), std$y) out2 <- CNPDIAdyna(parms = list(Cflux = 20*1e5/12/365, Hwater = 50), dynamicbottomwater = TRUE, times = seq(0, 1, by = 0.01), yini = yini) plot(out2, which = c("O2bw", "NO3bw", "O2flux", "NO3flux")) image(out2, which = c("O2","NO3","NH3","DIC"), legend = TRUE) ## Not run: # ## End(Not run)