Skip to content

Releases: hyriver/pydaymet

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"

v0.12.3

04 Feb 21:09
Compare
Choose a tag to compare

Release Notes

New Features

  • Add a new flag to both get_bycoords and get_bygeom functions called snow which separates snow from the precipitation using the Martinez and Gupta (2010) method.

Internal Changes

  • Add elevation data when computing PET regardless of the pet method.
  • Match the chunk size of elevation with that of the climate data.
  • Drop time dimension from elevation, lon, and lat variables.

Bug Fixes

  • Fix a bug in setting dates for monthly timescales. For monthly timescale Daymet calendar is at 15th or 16th of the month, so input dates need to be adjusted accordingly.

v0.12.2

15 Jan 18:10
Compare
Choose a tag to compare

Release Notes

Internal Changes

  • Clean up the PET computation functions' output by removing temporary variables that are created during the computation.
  • Add more attributes for elevation and pet variables.
  • Add type checking with typeguard and fixed typing issues raised by typeguard.
  • Refactor show_versions to ensure getting correct versions of all dependencies.

v0.12.1

31 Dec 07:48
Compare
Choose a tag to compare

Release Notes

Internal Changes

  • Use the three new ar.retrieve_* functions instead of the old ar.retrieve function to improve type hinting and to make the API more consistent.

v0.12.0

28 Dec 06:57
Compare
Choose a tag to compare

Release Notes

New Features

  • Expose the ssl argument for disabling the SSL certification verification (:issue_day:[41]{.title-ref}). Now, you can pass ssl=False to disable the SSL verification in both get_bygeom and get_bycoord functions. Moreover, you can pass --disable_ssl to PyDaymet's command line interface to disable the SSL verification.

Breaking Changes

  • Set the request caching's expiration time to never expire. Add two flags to all functions to control the caching: expire_after and disable_caching.

Internal Changes

  • Add all the missing types so mypy --strict passes.

v0.11.4

12 Nov 22:08
Compare
Choose a tag to compare

Release Notes

Internal Changes

  • Use importlib-metadata for getting the version insead of pkg_resources to decrease import time as discussed in this issue.

v0.11.3

07 Oct 06:37
Compare
Choose a tag to compare

Release Notes

Bug Fixes

  • There was an issue in the PET computation due to dayofyear being added as a new dimention. This version fixes it and even further simplifies the code by using xarray's dt accessor to gain access to the dayofyear method.

v0.11.2

07 Oct 04:50
Compare
Choose a tag to compare

Release Notes

New Features

  • Add hargreaves_samani and priestley_taylor methods for computing PET.

Breaking Changes

  • Rewrite the command-line interface using click.group to improve UX. The command is now pydaymet [command] [args] [options]. The two supported commands are coords for getting climate data for a dataframe of coordinates and geometry for getting gridded climate data for a geo-dataframe. Moreover, Each sub-command now has a separate help message and example.
  • Deprecate get_byloc in favor of get_bycoords.
  • The pet argument in both get_bycoords and get_bygeom functions now accepts hargreaves_samani, penman_monteith, priestley_taylor, and None.

Internal Changes

  • Refactor the pet module for reducing duplicate code and improving readability and maintainability. The code is smaller now and the functions for computing physical properties include references to equations from the respective original paper.

v0.11.1

31 Jul 06:31
Compare
Choose a tag to compare

Release Notes

The highligth of this release is a major refactor of Daymet to allow
for extending PET computation function for using methods other than
FAO-56.

New Features

  • Refactor Daymet class by removing pet_bycoords and pet_bygrid methods and creating a new public function called potential_et. This function computes potential evapotranspiration (PET) and supports both gridded (xarray.Dataset) and single pixel (pandas.DataFrame) climate data. The long-term plan is to add support for methods other than FAO 56 for computing PET.