Skip to content

Releases: hyriver/pydaymet

v0.13.12

10 Feb 16:19
Compare
Choose a tag to compare

Release Notes

Internal Changes

  • Fully migrate setup.cfg and setup.py to pyproject.toml.
  • Convert relative imports to absolute with absolufy-imports.
  • Sync all patch versions of HyRiver packages to x.x.12.

v0.13.10

09 Jan 04:55
Compare
Choose a tag to compare

Release Notes

New Features

  • Refactor the show_versions function to improve performance and print the output in a nicer table-like format.

Bug Fixes

  • Fix a bug in get_bygeom where for small requests that lead to a single download URL, the function failed.

Internal Changes

  • Skip 0.13.9 version so the minor version of all HyRiver packages become the same.

v0.13.8

09 Dec 23:07
Compare
Choose a tag to compare

Release Notes

Internal Changes

  • More robust handling of getting large gridded data. Instead of caching the requests/ responses, directly store the responses as NetCDF files to a cache folder using pygeoogc.streaming_download and ultimately read them using xarray.open_mfdataset. This should make the bygeom function even faster than before and also make it possible to make large requests without having to worry about running out of memory (:issue_day:[59]{.title-ref}).
  • Modify the codebase based on Refurb suggestions.

v0.13.7

04 Nov 23:07
Compare
Choose a tag to compare

Release Notes

Since the release of Daymet v4 R1 on November 2022, the URL of Daymet's server has been changed. Therefore, only the latest version of PyDaymet (v0.13.7) is going to work, and previous versions will not work anymore.

New Features

  • Add support for passing a list of coordinates to the get_bycoords function. Also, optionally, you can pass a list of IDs for the input coordinates that will be used as keys for the returned pandas.DataFrame or a dimension called id in the returned xarray.Dataset if to_xarray is enabled.
  • Add a new argument called to_xarray to the get_bycoords function for returning the results as a xarray.Dataset instead of a pandas.DataFrame. When set to True, the returned xarray.Dataset will have three attributes called units, description, and long_name.
  • The date argument of both get_bycoords and by_geom functions now accepts range-type objects for passing years, e.g., range(2000-2005).
import pydaymet as daymet

coords = [(-94.986, 29.973), (-95.478, 30.134)]
idx = ["P1", "P2"]
clm = daymet.get_bycoords(coords, range(2000, 2021), coords_id=idx, to_xarray=True)

Internal Changes

  • Use pyupgrade package to update the type hinting annotations to Python 3.10 style.
  • Fix the Daymet server URL.

v0.13.6

30 Aug 17:30
Compare
Choose a tag to compare

Release Notes

Internal Changes

  • Add the missing PyPi classifiers for the supported Python versions.

v0.13.5

29 Aug 21:42
Compare
Choose a tag to compare

Release Notes

Breaking Changes

  • Append "Error" to all exception classes for conforming to PEP-8 naming conventions.

Internal Changes

  • Bump the minimum versions of pygeoogc, pygeoutils, py3dep to 0.13.5 and that of async-retriever to 0.3.5.

v0.13.3

31 Jul 15:21
Compare
Choose a tag to compare

Release Notes

Bug Fixes

  • Fix a bug in PETGridded where the wrong data type was being set for pet and elevation variables.
  • When initializing PETGridded, only chunk the elevation if the input climate data is chunked.

v0.13.2

14 Jun 05:33
Compare
Choose a tag to compare

Release Notes

Breaking Changes

  • Set the minimum supported version of Python to 3.8 since many of the dependencies such as xarray, pandas, rioxarray have dropped support for Python 3.7.

Internal Changes

  • Use micromamba for running tests and use nox for linting in CI.

v0.13.1

12 Jun 04:51
Compare
Choose a tag to compare

Release Notes

New Features

Bug Fixes

  • Set the end year based on the current year since Daymet data get updated every year (:pull_day:[55]{.title-ref}) by Tim Cera.
  • Set the months for the annual timescale to correct values (:pull_day:[55]{.title-ref}) by Tim Cera.

v0.13.0

03 Apr 22:34
Compare
Choose a tag to compare

Release Notes

Breaking Changes

  • Remove caching-related arguments from all functions since now they can be set globally via three environmental variables:

    • HYRIVER_CACHE_NAME: Path to the caching SQLite database.
    • HYRIVER_CACHE_EXPIRE: Expiration time for cached requests in seconds.
    • HYRIVER_CACHE_DISABLE: Disable reading/writing from/to the cache file.

    You can do this like so:

import os

os.environ["HYRIVER_CACHE_NAME"] = "path/to/file.sqlite"
os.environ["HYRIVER_CACHE_EXPIRE"] = "3600"
os.environ["HYRIVER_CACHE_DISABLE"] = "true"