CNPDIAbudget {CNPDIA}R Documentation

Budgets for the CNPDIA or MPBDIA model.

Description

CNPDIAbudgetO2, CNPDIAbudgetC, CNPDIAbudgetN, CNPDIAbudgetP estimate mass budgets from CNPDIA model solutions.

Usage

  CNPDIAbudgetO2(out, ..., which = c("All", "Rates", "Fluxes", "Losses", "Fluxmat")) 
  CNPDIAbudgetC(out, ..., which = c("All", "Rates", "Fluxes", "Losses", "Fluxmat")) 
  CNPDIAbudgetN(out, ..., which = c("All", "Rates", "Fluxes", "Losses", "Fluxmat")) 
  CNPDIAbudgetP(out, ..., which = c("All", "Rates", "Fluxes", "Losses", "Fluxmat")) 

Arguments

out

an output object returned by CNPDIAsolve, MPBDIAsolve, or CNPDIAdyna, MPBDIAdyna.

which

if not NULL, a vector with names of the items to return.

...

unused.

Value

CNPDIAbudgetx returns the element budget (C, N, P, O2) of the solution as a list, with the following items.

If more than one CNPDIA object is passed to these functions, a matrix is returned, one column for each object.

For dynamic runs, the budget is taken over the mean of the run; Delta is then the integrated mean rate of change; for steady-state runs, Delta should be very small.

Author(s)

Karline Soetaert

References

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.

Examples


# some runs to work with  
  defsteady <- CNPDIAsolve()
  defdyn    <- CNPDIAdyna()

# altered steady-state run
  out <- CNPDIAsolve(parms = list(Cflux = 1000))
  cbind(default = CNPDIAparms(), altered = CNPDIAparms(out))

# budgets
  B1 <- CNPDIAbudgetO2(out)  
  B1$Fluxmat
  colSums(B1$Fluxmat) - rowSums(B1$Fluxmat)  # Small only for O2
  CNPDIAbudgetO2(out, defsteady)$Rates  
  
  B2 <- CNPDIAbudgetC(out)
  colSums(B2$Fluxmat) - rowSums(B2$Fluxmat)  # Small for all states
  
  CNPDIAbudgetC(out,defsteady)
  CNPDIAbudgetC(out,defsteady,defdyn, which = "Rates")

[Package CNPDIA version 1.0 Index]