Skip to main content

Calculate POC Export flux, as Lutz et al. 2007

Project description

Foobar

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 foobar

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.

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

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

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(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.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

lutzpocflux-0.1.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lutzpocflux-0.1.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.11 Windows/10

File hashes

Hashes for lutzpocflux-0.1.0.tar.gz
Algorithm Hash digest
SHA256 74c9da92d2e0ad891e1a19ea5e768838a1f5bfcde549bf715cb5f7be38ce973a
MD5 be560fc65d7727ab32bdfebecc5cfe59
BLAKE2b-256 6081742425bd727bc6cf10cf7ee90d421d20f7380c1526b9849357b1325c1dc4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lutzpocflux-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.11 Windows/10

File hashes

Hashes for lutzpocflux-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e780c84c86c8e952a60f0c75d08eaa292ba381ad72386ea5c691731a4b2b2bb
MD5 bc30fe93f51dce87a01c7f921f883868
BLAKE2b-256 4c812d0329a5c40e9f8d9a25ffd95a6747558d83fe703ee5ff62cd53b5c771a1

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