Skip to main content

A package for the GPP related Assignment 3

Project description

GPP Prediction

A Python package for predicting gross primary production (GPP) in ecological systems.

Installation

pip install gpp-prediction

Features

  • Convert solar radiation to photosynthetically active radiation (PAR)
  • Calculate GPP using environmental parameters
  • Handle various input formats (single values, arrays, pandas Series)

Usage

import pandas as pd
import numpy as np
from gpp_prediction import swrad2par, calc_gpp

# Convert solar radiation to PAR
swrad = 0.5  # kW m^-2
par = swrad2par(swrad)  # kJ m^-2 day^-1

# Sample data
data = {
    'swrad': [0.4, 0.5, 0.6],
    'fapar': [0.6, 0.7, 0.8],
    'tmin': [5, 8, 10],
    'vpd': [0.5, 1.0, 1.5]
}
df = pd.DataFrame(data)

# Calculate PAR from solar radiation
df['par'] = swrad2par(df['swrad'])

# Model parameters
params = {
    'eps_max': 2.5,
    'tmin_min': 0,
    'tmin_max': 12,
    'vpd_min': 0.2,
    'vpd_max': 2.0
}

# Calculate GPP
df['gpp'] = calc_gpp(
    df['par'],
    df['fapar'],
    df['tmin'],
    df['vpd'],
    **params
)

print(df)

License

This project is licensed under the MIT License

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

gpp_prediction-0.1.5.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gpp_prediction-0.1.5-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gpp_prediction-0.1.5.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for gpp_prediction-0.1.5.tar.gz
Algorithm Hash digest
SHA256 9e852774c9f8fa4016698d9495ae6bd5ceacac7d563ec6103e77690cebd1f76c
MD5 31ff6e9d99f20b4848c405f5487f9f25
BLAKE2b-256 498f4469f767f7e96df31901fa1972b71e6f25fab0693146faada0f8e5b97b7b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gpp_prediction-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for gpp_prediction-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4d621c5d0bd50b071cbbd1e9ecbaf1e1893f0a42ea34ac36b4a52bf71ea106eb
MD5 7b37919489d51b3df2b1e611af7f1e3f
BLAKE2b-256 64359dfec21825455c24709a4218f93e6a39b68b625b6145bc214161aed2b4f0

See more details on using hashes here.

Supported by

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