Predict ammonia emissions with a recurrent neural network model
Project description
nh3pred
This package provides a single function, predict, which estimates ammonia emissions following field fertilization under given environmental conditions.
The underlying model is a recurrent neural network described in [ref] under the name "rnn 9 – data a.".
The predict function works similarly to the alfam2 function from the R package ALFAM2.
Install
pip install nh3pred
Documentation
A complete documentation for the predict function is available here.
Usage
You can use the package in Python as follows:
import pandas as pd
from nh3pred import predict
df = pd.DataFrame ({
"pmid": [1, 1, 1, 1, 1, 1],
"ct": [3, 6, 10, 24, 48, 72],
"tan_app": [42, 42, 42, 42, 42, 42],
"air_temp": [18, 23, 24, 15, 21, 20],
"wind_2m": [2, 2, 1, 1, 2, 2],
"rain_rate": 0,
"app_rate": [20, 20, 20, 20, 20, 20],
"man_dm": [8.3, 8.3, 8.3, 8.3, 8.3, 8.3],
"man_ph": [7.1, 7.1, 7.1, 7.1, 7.1, 7.1],
"app_mthd": ["ts", "ts", "ts", "ts", "ts", "ts"],
"man_source": ["cat", "cat", "cat", "cat", "cat", "cat"]
})
pred = predict(df)
print(pred)
Notes
- The trained weights are included in the package under
ammonia_predict/data/final_model.pth. - The package requires Python ≥3.12, PyTorch ≥2.5.0, and pandas ≥2.2.3.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nh3pred-0.1.2.tar.gz.
File metadata
- Download URL: nh3pred-0.1.2.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8f79d45a6f3806e261708b6f74fe84e1ea5a7f51dab6fa0aa8100552add6728
|
|
| MD5 |
0ca373a072cbc7d6e86f92f33492314f
|
|
| BLAKE2b-256 |
c27fcf1abe166ddfa94808dc6a5ab8d2e6142504b25f12deabdc84997913a0f6
|
File details
Details for the file nh3pred-0.1.2-py3-none-any.whl.
File metadata
- Download URL: nh3pred-0.1.2-py3-none-any.whl
- Upload date:
- Size: 2.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d6082a6779ea2fd09e669630ad583fe8cb8984542d3d74a5dc5d9a0d19305fc
|
|
| MD5 |
97f66c97d9965513321f4ee3b07653d8
|
|
| BLAKE2b-256 |
8c571c3da307216b85bacbeb831d09793d4a807b5abcbf88612734d937b40bcb
|