Access the climate data from the Daymet database through ORNL's RESTful service.
Project description
🚨 This package is under heavy development and breaking changes are likely to happen. 🚨
Features
PyDaymet is a part of Hydrodata software stack and provides an interface to access daily climate data through the Daymet RESTful service. Both single pixel and gridded data can be requested which are returned as pandas.DataFrame for single pixel and xarray.Dataset for gridded data. Additionally, it can compute Potential EvapoTranspiration (PET) using UN-FAO 56 paper method for both single pixel and gridded data.
You can try using PyDaymet without installing it on you system by clicking on the binder badge below the PyDaymet banner. A Jupyter notebook instance with the Hydrodata software stack pre-installed will be launched in your web browser and you can start coding!
Moreover, requests for additional functionalities can be submitted via issue tracker.
Installation
You can install pydaymet using pip after installing libgdal on your system (for example, in Ubuntu run sudo apt install libgdal-dev):
$ pip install pydaymet
Alternatively, pydaymet can be installed from the conda-forge repository using Conda:
$ conda install -c conda-forge pydaymet
Quickstart
PyDaymet offers two functions for getting climate data; get_byloc and get_bygeom. The arguments of these function are identical except that the first argument of the latter should be polygon and the former a coordinate (a tuple of length two as in (x, y)). The input geometry or coordinates can be any valid CRS and by default EPSG:4326 is considered as the input CRS. It is noted that both functions have a pet flag for computing PET.
from pynhd import NLDI
import pydaymet as daymet
dates = ("2000-01-01", "2000-06-12")
variables = ["prcp", "tmin"]
geometry = NLDI.getfeature_byid("nwissite", "USGS-01031500", basin=True).geometry[0]
clm_g = daymet.get_bygeom(geometry, dates=dates, variables=variables, pet=True)
coords = (-1431147.7928, 318483.4618)
crs = "epsg:3542"
clm_p = daymet.get_byloc(coords, crs=crs, dates=dates, variables=variables, pet=True)
Some example plots are shown below:
Contributing
Contributions are very welcomed. Please read CONTRIBUTING.rst file for instructions.
Credits
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
Hashes for pydaymet-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7239fa8bb34be0f11677656c812054f57ff4f2fd1bcfe5c78124e413f6e89d33 |
|
MD5 | f0c4c8e277f12857cc0953a79cb859f4 |
|
BLAKE2b-256 | d094b86194d5e53756d071ff5d0f96975213cace281b7040327dbb6a8093a938 |