Recent Releases of pydaymet
pydaymet - v0.19.4
Release Notes
Bug Fixes
- Fix an issue in the
get_bygeomfunction where if the input geometry is smaller than 1 km, the function would fail to clip the data. This version returns all pixels that the geometry intersects with, even if the geometry is smaller than 1 km.
- Python
Published by github-actions[bot] 8 months ago
pydaymet - v0.19.3
Release Notes
New Features
- Improve the performance of
get_bycoordsfunction by using the single-pixel API of the Daymet server. - Add a new argument to both
get_bygeomandget_bycoordsfunctions calledconn_timeoutfor setting the connection timeout in seconds. The default value is 5 minutes. - Add a new argument to both
get_bygeomandget_bycoordsfunctions calledvalidate_filesize. When set toTrue, the function checks the file size of the previously cached files and will re-download if the local filesize does not match that of the remote. Defaults toFalse. Setting this toFalsecan be useful when you are sure that the cached files are not corrupted and just want to get the combined dataset more quickly. This is faster because it avoids web requests that are necessary for getting the file sizes.
Internal Changes
- Use [TinyRetriever](https://github.com/cheginit/tiny-retriever) for all server requests. It offers the same functionalities as the previous
_streamingmodule and has the same dependencies. It has a more robust handling of async threads and is more efficient.
- Python
Published by github-actions[bot] 10 months ago
pydaymet - v0.19.1
Release Notes
This release is a major refactoring of the package to make it more lightweight and independent. The package now uses aiohttp and aiofiles with a limit on the number of simulnatious connections to the host, for handling all server requests. This avoids hammering the server with multiple requests and improves the performance and reliability of the package. The package no longer depends on other HyRiver libraries, making it more lightweight and faster to load.
New Features
- Add a new function to get Daymet tile IDs for a given geometry called
daymet_tiles.
Internal Changes
- Remove dependency on other HyRiver libraries to make the package more lightweight and independent.
- Use
aiohttpandaiofilesfor handling all server requests. This avoids hammering the server with multiple requests and improves the performance and reliability of the package. - Remove dependency on
geopandasand useshapelyonly for handling geometries. This makes the package more lightweight and faster.
Breaking Changes
- Use a more efficient and reliable approach for adding elevation data to the climate dataset for computing PET. We now directly use 30-m elevation data from 3DEP and resample it to the climate data resolution by averaging each cell within a 1-km window.
- Remove the option to disable SSL in all functions. Now, SSL verification is always enabled.
- Python
Published by github-actions[bot] 12 months ago
pydaymet - v0.19.0
Release Notes
This release is a major refactoring of the package to make it more lightweight and independent. The package now uses aiohttp and aiofiles with a limit on the number of simulnatious connections to the host, for handling all server requests. This avoids hammering the server with multiple requests and improves the performance and reliability of the package. The package no longer depends on other HyRiver libraries, making it more lightweight and faster to load.
New Features
- Add a new function to get Daymet tile IDs for a given geometry called
daymet_tiles.
Internal Changes
- Remove dependency on other HyRiver libraries to make the package more lightweight and independent.
- Use
aiohttpandaiofilesfor handling all server requests. This avoids hammering the server with multiple requests and improves the performance and reliability of the package. - Remove dependency on
geopandasand useshapelyonly for handling geometries. This makes the package more lightweight and faster.
Breaking Changes
- Use a more efficient and reliable approach for adding elevation data to the climate dataset for computing PET. We now directly use 30-m elevation data from 3DEP and resample it to the climate data resolution by averaging each cell within a 1-km window.
- Remove the option to disable SSL in all functions. Now, SSL verification is always enabled.
- Python
Published by github-actions[bot] 12 months ago
pydaymet - v0.18.0
Release Notes
Breaking Changes
- Drop support for Python 3.8 since its end-of-life date is October 2024.
- Remove all exceptions from the main module and raise them from the
exceptionsmodule. This is to declutter the public API and make it easier to maintain.
- Python
Published by github-actions[bot] about 1 year ago
pydaymet - v0.17.0
Release Notes
Bug Fixes
- In
get_bystacfunction, only three variables were being returned regardless of the input variables. This version fixes this issue by returning all the requested variables.
Internal Changes
- Add the
exceptionsmodule to the high-level API to declutter the main module. In the future, all exceptions will be raised from this module and not from the main module. For now, the exceptions are raised from both modules for backward compatibility. - Switch to using the
srclayout instead of theflatlayout for the package structure. This is to make the package more maintainable and to avoid any potential conflicts with other packages.
- Python
Published by github-actions[bot] over 1 year ago
pydaymet - v0.16.3
Release Notes
Bug Fixes
- In
get_bystacfunction, only three variables were being returned regardless of the input variables. This version fixes this issue by returning all the requested variables.
Internal Changes
- Add the
exceptionsmodule to the high-level API to declutter the main module. In the future, all exceptions will be raised from this module and not from the main module. For now, the exceptions are raised from both modules for backward compatibility.
- Python
Published by github-actions[bot] over 1 year ago
pydaymet - v0.16.1
Release Notes
New Features
- Add a new function for getting Daymet data from Microsoft\'s Planetary Computer called
get_bystac. Although this function can be much faster thanget_bygeom, currently, it gives access to Daymet v4.2 from 1980 to 2020. As discussed here, the Daymet v4.5 will be added to the Planetary Computer in the future. Until then, for accessing the latest version of Daymet (v4.5) you need to useget_bygeom. Additionally, this function requiresfsspec,dask,zarr, andpystac-clientpackages. - Make
separate_snowa standalone, pure, and public function. Now, it can be used like so:pydaymet.separate_snow. - Change the length unit from
kmtomforget_bygeom.
Internal Changes
- The
potential_etfunction usespy3dep.add_elevationfunction but the CRS info gets lost in the process for the newelevationvariable. This version fixes this issue by adding the CRS info to theelevationvariable. - Change
PetParamsclass fromNamedTupletodataclassfor better performance and consistency. Now, it has a newclassmethodcalledfieldsthat returns a list of the four fields of the class.
- Python
Published by github-actions[bot] almost 2 years ago
pydaymet - v0.15.0
Release Notes
From release 0.15 onward, all minor versions of HyRiver packages will be pinned. This ensures that previous minor versions of HyRiver packages cannot be installed with later minor releases. For example, if you have py3dep==0.14.x installed, you cannot install pydaymet==0.15.x. This is to ensure that the API is consistent across all minor versions.
New Features
- For now, retain compatibility with
shapely<2while supportingshapley>=2.
- Python
Published by github-actions[bot] over 2 years ago
pydaymet - v0.14.0
Release Notes
New Features
- Change missing value of both single-pixel and gridded versions to
numpy.nanfrom -9999. - Add a new model parameter for computing PET using
priestlet_taylorandpenman_monteithmodels calledarid_correction. For arid regions, FAO 56 suggests subtracting the min temperature by 2 degrees. This parameter can be passed viapet_paramsindaymet_by*functions, orparamsinpotential_petfunction. - Refactor
get_bycoordsto reduce memory usage by using a combination ofitertoolsandGeneratorobjects. - Refactor the
petmodule to improve performance and readability, and reduce code duplication.
Documentation
- Add more information about parameters that
petfunctions accept.
Breaking Changes
- Bump the minimum required version of
shapelyto 2.0, and use its new API.
Internal Changes
- Sync all minor versions of HyRiver packages to 0.14.0.
- Python
Published by github-actions[bot] almost 3 years ago
pydaymet - v0.13.10
Release Notes
New Features
- Refactor the
show_versionsfunction to improve performance and print the output in a nicer table-like format.
Bug Fixes
- Fix a bug in
get_bygeomwhere 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.
- Python
Published by github-actions[bot] almost 3 years ago
pydaymet - v0.13.8
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_downloadand ultimately read them usingxarray.open_mfdataset. This should make thebygeomfunction 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.
- Python
Published by github-actions[bot] about 3 years ago
pydaymet - v0.13.7
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_bycoordsfunction. Also, optionally, you can pass a list of IDs for the input coordinates that will be used askeysfor the returnedpandas.DataFrameor a dimension calledidin the returnedxarray.Datasetifto_xarrayis enabled. - Add a new argument called
to_xarrayto theget_bycoordsfunction for returning the results as axarray.Datasetinstead of apandas.DataFrame. When set toTrue, the returnedxarray.Datasetwill have three attributes calledunits,description, andlong_name. - The
dateargument of bothget_bycoordsandby_geomfunctions now acceptsrange-type objects for passing years, e.g.,range(2000-2005).
``` python import pydaymet as daymet
coords = [(-94.986, 29.973), (-95.478, 30.134)] idx = ["P1", "P2"] clm = daymet.getbycoords(coords, range(2000, 2021), coordsid=idx, to_xarray=True) ```
Internal Changes
- Use
pyupgradepackage to update the type hinting annotations to Python 3.10 style. - Fix the Daymet server URL.
- Python
Published by github-actions[bot] about 3 years ago
pydaymet - v0.13.5
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,py3depto 0.13.5 and that ofasync-retrieverto 0.3.5.
- Python
Published by github-actions[bot] over 3 years ago
pydaymet - v0.13.2
Release Notes
Breaking Changes
- Set the minimum supported version of Python to 3.8 since many of the dependencies such as
xarray,pandas,rioxarrayhave dropped support for Python 3.7.
Internal Changes
- Use micromamba for running tests and use nox for linting in CI.
- Python
Published by github-actions[bot] over 3 years ago
pydaymet - v0.13.1
Release Notes
New Features
- Adopt the default snow parameters\' values from a new source https://doi.org/10.5194/gmd-11-1077-2018 and add the citation.
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.
- Python
Published by github-actions[bot] over 3 years ago
pydaymet - v0.13.0
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:
``` python import os
os.environ["HYRIVERCACHENAME"] = "path/to/file.sqlite" os.environ["HYRIVERCACHEEXPIRE"] = "3600" os.environ["HYRIVERCACHEDISABLE"] = "true" ```
- Python
Published by github-actions[bot] almost 4 years ago
pydaymet - v0.12.3
Release Notes
New Features
- Add a new flag to both
get_bycoordsandget_bygeomfunctions calledsnowwhich separates snow from the precipitation using the Martinez and Gupta (2010) method.
Internal Changes
- Add elevation data when computing PET regardless of the
petmethod. - Match the chunk size of
elevationwith that of the climate data. - Drop
timedimension fromelevation,lon, andlatvariables.
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.
- Python
Published by github-actions[bot] almost 4 years ago
pydaymet - v0.12.2
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
elevationandpetvariables. - Add type checking with
typeguardand fixed typing issues raised bytypeguard. - Refactor
show_versionsto ensure getting correct versions of all dependencies.
- Python
Published by github-actions[bot] almost 4 years ago
pydaymet - v0.12.0
Release Notes
New Features
- Expose the
sslargument for disabling the SSL certification verification (:issueday:[41]{.title-ref}). Now, you can passssl=Falseto disable the SSL verification in both `getbygeomandgetbycoordfunctions. Moreover, you can pass--disablessl` 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_afteranddisable_caching.
Internal Changes
- Add all the missing types so
mypy --strictpasses.
- Python
Published by github-actions[bot] about 4 years ago
pydaymet - v0.11.3
Release Notes
Bug Fixes
- There was an issue in the PET computation due to
dayofyearbeing added as a new dimention. This version fixes it and even further simplifies the code by usingxarray\'sdtaccessor to gain access to thedayofyearmethod.
- Python
Published by github-actions[bot] about 4 years ago
pydaymet - v0.11.2
Release Notes
New Features
- Add
hargreaves_samaniandpriestley_taylormethods for computing PET.
Breaking Changes
- Rewrite the command-line interface using
click.groupto improve UX. The command is nowpydaymet [command] [args] [options]. The two supported commands arecoordsfor getting climate data for a dataframe of coordinates andgeometryfor getting gridded climate data for a geo-dataframe. Moreover, Each sub-command now has a separate help message and example. - Deprecate
get_bylocin favor ofget_bycoords. - The
petargument in bothget_bycoordsandget_bygeomfunctions now acceptshargreaves_samani,penman_monteith,priestley_taylor, andNone.
Internal Changes
- Refactor the
petmodule 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.
- Python
Published by github-actions[bot] about 4 years ago
pydaymet - v0.11.1
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
Daymetclass by removingpet_bycoordsandpet_bygridmethods and creating a new public function calledpotential_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.
- Python
Published by github-actions[bot] over 4 years ago
pydaymet - v0.11.0
Release Notes
New Features
- Add command-line interface (:issue_day:[7]{.title-ref}).
- Use
AsyncRetrieverfor sending requests asyncronosly with persistent caching. A cache folder in the current directory is created. - Check for validity of start/end dates based on Daymet V4 since Puerto Rico data starts from 1950 while North America and Hwaii start from 1980.
- Check for validity of input coordinate/geometry based on the Daymet V4 bounding boxes.
- Improve accuracy of computing Psychrometric constant in PET calculations by using an equation in Allen et al. 1998.
Breaking Changes
- Drop support for Python 3.6 since many of the dependencies such as
xarrayandpandashave done so. - Change
loc_crsandgeo_crsarguments tocrsinget_bycoordsandget_bygeom.
Documentation
- Add examples to docstrings and improve writing.
- Add more notes regarding the underlying assumptions for
pet_bycoordsandpet_bygrid.
Internal Changes
- Refactor
Daymetclass to usepydanticfor validating the inputs. - Increase test coverage.
- Python
Published by github-actions[bot] over 4 years ago
pydaymet - Release v0.10.1
Please check HISTORY.rst file for a detailed list of changes.
- Python
Published by github-actions[bot] almost 5 years ago
pydaymet - Release v0.10.0
Please check HISTORY.rst file for a detailed list of changes.
- Python
Published by github-actions[bot] almost 5 years ago
pydaymet - Release v0.9.0
Please check HISTORY.rst file for a detailed list of changes.
- Python
Published by github-actions[bot] almost 5 years ago
pydaymet - Release v0.2.0
Please check HISTORY.rst file for a detailed list of changes.
- Python
Published by github-actions[bot] about 5 years ago
pydaymet - v0.1.1
- Retained the compatibility with
xarray0.15 by removing theattrsflag. - Replaced
open_datasetwithload_datasetfor automatic handling of closing the input after reading the content. - Removed
yearsargument from bothbylocandbygeomfunctions. Thedatesargument now accepts both a tuple of start and end dates and a list of years. - This release will be a part of Hydrodata 0.7.0.
- Python
Published by cheginit over 5 years ago