Skip to main content

Calculate POC Export flux, as Lutz et al. 2007

Project description

Lutz POC FLux

LutzPOCFlux is a Python library for calculating POC export flux as detailed in Lutz et al. 2007.

Installation

Use the package manager pip to install LutzPOCFlux.

pip install lutzpocflux

Numpy is the only dependency. Other parts of the process, such as reading HDF files and plotting results are expected to be done with other packages.

Usage

There is a convenience class for calculating Flux given a list of annual npp arrays and a ze array (or float value).

This handles

  • Creation of the SVI array
  • Creation of the total average array
  • Calculation of the p ratio_ze
  • Application of the ratio to the total average array
from lutzpocflux import MakeFlux
mf = MakeFlux(ze=ze, annual_npp=npp_list)
flux = mf.get_flux()

Alternatively the calculated flux ratio can be used against another npp array provided seperately.

from lutzpocflux import MakeFlux
mf = MakeFlux(ze=4000.0, annual_npp=npp_list, npp=some_other_npp)
flux = mf.get_flux()

Or the equations can be used on their own.

from lutzpocflux.equations import (
    prd_f,
    rld_f,
    prr_f,
    pratioze_f,
)

# Assuming you already have an average npp and SVI layer, you can
# calculate individual parameters
rld = rld_f(svi)
prd = prd_f(svi)
prr = prr_f(svi)

# ze can be a 2D array of the same shape as the npp input arrays or a float value
pratio = pratioze_f(prd,ze,rld,prr)

# Now use the pratio to calculate your export npp given your choice of npp array:
npp_flux = npp * pratio

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Acknowledgments

Results were tested agains the R package here

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lutzpocflux-0.1.5.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

lutzpocflux-0.1.5-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file lutzpocflux-0.1.5.tar.gz.

File metadata

  • Download URL: lutzpocflux-0.1.5.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Windows/10

File hashes

Hashes for lutzpocflux-0.1.5.tar.gz
Algorithm Hash digest
SHA256 ba61e762746eb0c757f94c35f11a6fa1343c9c18912850591375c5dffdd755aa
MD5 3c079370f203a742e1729a968ca59f2f
BLAKE2b-256 f67e7d9605c5490ee52eb0b7ce37c88e6b4f02a3fecdb02f97334ccd928e3143

See more details on using hashes here.

File details

Details for the file lutzpocflux-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: lutzpocflux-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Windows/10

File hashes

Hashes for lutzpocflux-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3fe041eb3af528c060fbb94fe9281afa058273030fe9a5d093ecb4a9981c38f7
MD5 b34b285fc6341cf02f6497cb105e924b
BLAKE2b-256 7329daa6c86a8e0889dd40e4d1d97312a6ff0a1229a7ba27cf8dd04599686869

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page