Giter VIP home page Giter VIP logo

py3dep's Introduction

https://raw.githubusercontent.com/hyriver/HyRiver-examples/main/notebooks/_static/hyriver_logo_text.png

Binder Build Website JOSS
Package Description CI
Download Stat Navigate and subset NHDPlus (MR and HR) using web services Github Actions
Download Stat Access topographic data through National Map's 3DEP web service Github Actions
Download Stat Access NWIS, NID, WQP, eHydro, NLCD, CAMELS, and SSEBop databases Github Actions
Download Stat Access daily, monthly, and annual climate data via Daymet Github Actions
Download Stat Access daily climate data via GridMet Github Actions
Download Stat Access hourly NLDAS-2 data via web services Github Actions
Download Stat A collection of tools for computing hydrological signatures Github Actions
Download Stat High-level API for asynchronous requests with persistent caching Github Actions
Download Stat Send queries to any ArcGIS RESTful-, WMS-, and WFS-based services Github Actions
Download Stat Utilities for manipulating geospatial, (Geo)JSON, and (Geo)TIFF data Github Actions

HyRiver: Hydroclimate Data Retriever

Features

HyRiver is a software stack consisting of ten Python libraries that are designed to aid in hydroclimate analysis through web services. Currently, this project only includes hydrology and climatology data within the US. Some major capabilities of HyRiver are:

  • Easy access to many web services for subsetting data on server-side and returning the requests as masked Datasets or GeoDataFrames.
  • Splitting large requests into smaller chunks, under-the-hood, since web services often limit the number of features per request. So the only bottleneck for subsetting the data is your local machine memory.
  • Navigating and subsetting NHDPlus database (both medium- and high-resolution) using web services.
  • Cleaning up the vector NHDPlus data, fixing some common issues, and computing vector-based accumulation through a river network.
  • A URL inventory for many popular (and tested) web services.
  • Some utilities for manipulating the obtained data and their visualization.
https://docs.hyriver.io/_images/hyriver_deps.png

Please visit examples webpage to see some example notebooks. You can also watch these videos for a quick overview of HyRiver capabilities:

You can also try this project without installing it on your system by clicking on the binder badge. A Jupyter Lab instance with the HyRiver software stack pre-installed will be launched in your web browser, and you can start coding!

Please note that this project is in early development stages, while the provided functionalities should be stable, changes in APIs are possible in new releases. But we appreciate it if you give this project a try and provide feedback. Contributions are most welcome.

Moreover, requests for additional databases and functionalities can be submitted via issue trackers of packages.

Citation

If you use any of HyRiver packages in your research, we appreciate citations:

@article{Chegini_2021,
    author = {Chegini, Taher and Li, Hong-Yi and Leung, L. Ruby},
    doi = {10.21105/joss.03175},
    journal = {Journal of Open Source Software},
    month = {10},
    number = {66},
    pages = {1--3},
    title = {{HyRiver: Hydroclimate Data Retriever}},
    volume = {6},
    year = {2021}
}

Installation

You can install all the packages using pip:

$ pip install py3dep pynhd pygeohydro pydaymet pygridmet pynldas2 hydrosignatures pygeoogc pygeoutils async-retriever

Please note that installation with pip fails if libgdal is not installed on your system. You should install this package manually beforehand. For example, on Ubuntu-based distros the required package is libgdal-dev. If this package is installed on your system you should be able to run gdal-config --version successfully.

Alternatively, you can install them using conda:

$ conda install -c conda-forge py3dep pynhd pygeohydro pydaymet pygridmet pynldas2 hydrosignatures pygeoogc pygeoutils async-retriever

or mambaforge (recommended):

$ mamba install py3dep pynhd pygeohydro pydaymet pygridmet pynldas2 hydrosignatures pygeoogc pygeoutils async-retriever

Additionally, you can create a new environment, named hyriver with all the packages and optional dependencies installed with mambaforge using the provided environment.yml file:

$ mamba env create -f ./environment.yml
https://raw.githubusercontent.com/hyriver/HyRiver-examples/main/notebooks/_static/flow_accumulation.png

py3dep's People

Contributors

cheginit avatar dependabot[bot] avatar pre-commit-ci[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

py3dep's Issues

Issues in using "get_map()" library from "py3dep"

What happened: I am trying to use "get_map" module within "py3dep", but it gives error as shown below. How to solve it. I am using Python 3.7.13 with anaconda.

What you expected to happen:

Minimal Complete Verifiable Example:

# Put your MCVE code here

Anything else we need to know?:

Environment: py3dep.show_versions()

ImportError Traceback (most recent call last)
in
----> 1 py3dep.show_versions()

~\anaconda3\lib\site-packages\py3dep\print_versions.py in show_versions(file)
168 for (modname, ver_f) in deps:
169 try:
--> 170 mod = _get_mod(modname)
171 except ModuleNotFoundError:
172 deps_blob.append((modname, None))

~\anaconda3\lib\site-packages\py3dep\print_versions.py in get_mod(modname)
94 return sys.modules[modname]
95 try:
---> 96 return importlib.import_module(modname)
97 except ModuleNotFoundError:
98 return importlib.import_module(modname.replace("-", "
"))

~\anaconda3\lib\importlib_init_.py in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
128
129

~\anaconda3\lib\importlib_bootstrap.py in _gcd_import(name, package, level)

~\anaconda3\lib\importlib_bootstrap.py in find_and_load(name, import)

~\anaconda3\lib\importlib_bootstrap.py in find_and_load_unlocked(name, import)

~\anaconda3\lib\importlib_bootstrap.py in _load_unlocked(spec)

~\anaconda3\lib\importlib_bootstrap_external.py in exec_module(self, module)

~\anaconda3\lib\importlib_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)

~\anaconda3\lib\site-packages\pygeos_init_.py in
32 # end delvewheel patch
33
---> 34 from .lib import GEOSException # NOQA
35 from .lib import Geometry # NOQA
36 from .lib import geos_version, geos_version_string # NOQA

ImportError: DLL load failed while importing lib: The specified module could not be found.

Output of py3dep.show_versions()

Unable to load DEM data with get_map

What happened?

I followed one of the examples to get a basin geometry and download corresponding DEM data. I am able to get the DEM data with .get_dem but get an error using .get_map.

I am new to hyriver and was able to follow many of the examples the first day I downloaded and experimented with no issues. A few days later I came back to the same scripts, and they were no longer working as before. With some troubleshooting/experimentation I discovered that .get_dem worked while I continued to get an error with .get_map.

What did you expect to happen?

I expected both methods of downloading DEM to work

Minimal Complete Verifiable Example

import py3dep
from pynhd import NLDI

geom = NLDI().get_basins("01031500").geometry.iloc[0]
dem1 = py3dep.get_dem(geom, resolution=30)
dem2 = py3dep.get_map("DEM", geom, resolution=30, geo_crs="epsg:4326", crs="epsg:3857")

MVCE confirmation

  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

runcell(1, 'C:/Users/nrthrac/Desktop/working/MWSS/python-gis/pyhydro-load-dem.py')
Traceback (most recent call last):
 
  File ~\.conda\envs\hyriver\lib\site-packages\urllib3\connectionpool.py:715 in urlopen
    httplib_response = self._make_request(
 
  File ~\.conda\envs\hyriver\lib\site-packages\urllib3\connectionpool.py:404 in _make_request
    self._validate_conn(conn)
 
  File ~\.conda\envs\hyriver\lib\site-packages\urllib3\connectionpool.py:1058 in _validate_conn
    conn.connect()
 
  File ~\.conda\envs\hyriver\lib\site-packages\urllib3\connection.py:419 in connect
    self.sock = ssl_wrap_socket(
 
  File ~\.conda\envs\hyriver\lib\site-packages\urllib3\util\ssl_.py:449 in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
 
  File ~\.conda\envs\hyriver\lib\site-packages\urllib3\util\ssl_.py:493 in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
 
  File ~\.conda\envs\hyriver\lib\ssl.py:513 in wrap_socket
    return self.sslsocket_class._create(
 
  File ~\.conda\envs\hyriver\lib\ssl.py:1104 in _create
    self.do_handshake()
 
  File ~\.conda\envs\hyriver\lib\ssl.py:1375 in do_handshake
    self._sslobj.do_handshake()
 
SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1007)
 
 
During handling of the above exception, another exception occurred:
 
Traceback (most recent call last):
 
  File ~\.conda\envs\hyriver\lib\site-packages\requests\adapters.py:486 in send
    resp = conn.urlopen(
 
  File ~\.conda\envs\hyriver\lib\site-packages\urllib3\connectionpool.py:799 in urlopen
    retries = retries.increment(
 
  File ~\.conda\envs\hyriver\lib\site-packages\urllib3\util\retry.py:592 in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
 
MaxRetryError: HTTPSConnectionPool(host='elevation.nationalmap.gov', port=443): Max retries exceeded with url: /arcgis/services/3DEPElevation/ImageServer/WMSServer?service=WMS&request=GetCapabilities&version=1.3.0 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1007)')))
 
 
During handling of the above exception, another exception occurred:
 
Traceback (most recent call last):
 
  File ~\.conda\envs\hyriver\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
    exec(code, globals, locals)
 
  File c:\users\nrthrac\desktop\working\mwss\python-gis\pyhydro-load-dem.py:42
    dem2 = py3dep.get_map("DEM", geom, resolution=30, geo_crs="epsg:4326", crs="epsg:3857")
 
  File ~\.conda\envs\hyriver\lib\site-packages\py3dep\py3dep.py:164 in get_map
    valid_layers = wms.get_validlayers()
 
  File ~\.conda\envs\hyriver\lib\site-packages\pygeoogc\pygeoogc.py:348 in get_validlayers
    return self.client.get_validlayers()
 
  File ~\.conda\envs\hyriver\lib\site-packages\pygeoogc\core.py:456 in get_validlayers
    wms = WebMapService(self.url, version=self.version)
 
  File ~\.conda\envs\hyriver\lib\site-packages\owslib\wms.py:54 in WebMapService
    return wms130.WebMapService_1_3_0(
 
  File ~\.conda\envs\hyriver\lib\site-packages\owslib\map\wms130.py:75 in __init__
    self._capabilities = reader.read(self.url, timeout=self.timeout)
 
  File ~\.conda\envs\hyriver\lib\site-packages\owslib\map\common.py:65 in read
    u = openURL(spliturl[0], spliturl[1], method='Get',
 
  File ~\.conda\envs\hyriver\lib\site-packages\owslib\util.py:209 in openURL
    req = requests.request(method.upper(), url_base, headers=headers, **rkwargs)
 
  File ~\.conda\envs\hyriver\lib\site-packages\requests\api.py:59 in request
    return session.request(method=method, url=url, **kwargs)
 
  File ~\.conda\envs\hyriver\lib\site-packages\requests\sessions.py:589 in request
    resp = self.send(prep, **send_kwargs)
 
  File ~\.conda\envs\hyriver\lib\site-packages\requests\sessions.py:703 in send
    r = adapter.send(request, **kwargs)
 
  File ~\.conda\envs\hyriver\lib\site-packages\requests\adapters.py:517 in send
    raise SSLError(e, request=request)
 
SSLError: HTTPSConnectionPool(host='elevation.nationalmap.gov', port=443): Max retries exceeded with url: /arcgis/services/3DEPElevation/ImageServer/WMSServer?service=WMS&request=GetCapabilities&version=1.3.0 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1007)')))

Anything else we need to know?

No response

Environment

SYS INFO -------- commit: None python: 3.10.13 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:24:38) [MSC v.1916 64 bit (AMD64)] python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 186 Stepping 2, GenuineIntel byteorder: little LC_ALL: None LANG: en LOCALE: English_United States.1252 libhdf5: 1.14.2 libnetcdf: 4.9.2

PACKAGE VERSION

aiohttp 3.8.5
aiohttp-client-cache 0.9.1
aiosqlite 0.18.0
async-retriever 0.15.2
bottleneck 1.3.5
click 8.1.7
cytoolz 0.12.0
defusedxml 0.7.1
folium 0.14.0
geopandas 0.14.0
h5netcdf 1.2.0
hydrosignatures 0.15.2
joblib 1.2.0
matplotlib 3.8.0
multidict 6.0.2
netcdf4 1.6.4
networkx 3.1
numba N/A
numpy 1.26.0
owslib 0.29.2
pandas 2.1.1
py3dep 0.15.2
py7zr N/A
pyarrow 13.0.0
pydaymet 0.15.2
pyflwdir N/A
pygeohydro 0.15.2
pygeoogc 0.15.2
pygeoutils 0.15.2
pynhd 0.15.2
pynldas2 0.15.2
pyogrio N/A
pyproj 3.6.1
rasterio 1.3.9
requests 2.31.0
requests-cache 1.1.0
rioxarray 0.15.0
scipy 1.11.3
shapely 2.0.2
ujson 5.4.0
url-normalize 1.4.3
urllib3 1.26.18
xarray 2023.6.0
yarl 1.8.1

Tiling artifacts exist on 1m DEM roughly every 60m

What happened:

My team and I used .get_map() function (see below) to generate 1 meter DEM for our study site. On first glance the DEM looked perfectly fine. However, when we differenced this grid with our own DEM grid with snow, we found there were edge/tiling artifacts from the 3DEP product. At first I believed this to be our own snow DEM. However, after extensive testing I was able to narrow it down to being from the USGS DEM. Finally, I tried it with 1 meter DEM straight from https://apps.nationalmap.gov/downloader/ , and there were no artifacts. Meaning that there were ~60m tiling artifacts present as a result of me misusing py3dep (very possible), or something off in the way py3dep is calling the 1m 3DEP dataset.

def download_dem(las_fp, dem_fp = 'dem.tif'):
    """
    Reads the crs and bounds of a las file and downloads a DEM from py3dep
    Must be in the CONUS.
    Parameters:
    las_fp (str): filepath to las file to get bounds and crs
    dem_fp (str) [optional]: filepath to save DEM at. [default = './dem.tif']
    Returns:
    crs (pyproj CRS): CRS object from las header
    project (shapely transform): shapely transform used in conversion
    """
    # read crs of las file
    with laspy.open(las_fp) as las:
        hdr = las.header
        crs = hdr.parse_crs()
    log.debug(f"CRS used is {crs}")
    # create transform from wgs84 to las crs
    wgs84 = pyproj.CRS('EPSG:4326')
    project = pyproj.Transformer.from_crs(crs, wgs84 , always_xy=True).transform
    # calculate bounds of las file in wgs84
    utm_bounds = box(hdr.mins[0], hdr.mins[1], hdr.maxs[0], hdr.maxs[1])
    wgs84_bounds = transform(project, utm_bounds)
    # download dem inside bounds
    dem_wgs = py3dep.get_map('DEM', wgs84_bounds, resolution = 1, crs = 'epsg:4326')
    log.debug(f"DEM bounds: {dem_wgs.rio.bounds()}. Size: {dem_wgs.size}")
    # reproject to las crs and save
    dem_utm = dem_wgs.rio.reproject(crs)
    dem_utm.rio.to_raster(dem_fp)
    log.debug(f"Saved to {dem_fp}")
    return dem_fp, crs, project

Environment:

OS: Ubuntu 20.04.4 LTS x86_64

py3dep version: 0.13.3

Conda environemnt via .yaml below

name: iceroad
channels:
  - conda-forge
  - defaults
dependencies:
  - python=3.8
  - python-pdal
  - gdal
  - rioxarray
  - py3dep
  - shapely
  - docopt
  - pip
  - pip:
    - whitebox
    - matplotlib
    - geopandas
    - rasterio
    - xarray
    - pandas
    - laspy[lazrs,laszip]

Difference of DEMs with py3dep

bad

Difference of DEMs with https://apps.nationalmap.gov/downloader/

clean

Returned transform is incorrect

Really cool collection of libraries you have here. Thank you for making these data more readily accessible in Python!

What happened:
I pulled a hillshade using py3dep.get_map using a bounding box computed from a shapefile using geopandas. When I plotted the map using rs.plot.show() using the included transform and then plotted a shapefile on top (same CRS) the shapefile and the map do not align, the hillshade was shifted ~2 degrees south of the shapefile. Comparing the bounding box and the transform, which I think provides the coordinates for the upper left corner, the latitude of the upper left is ~48.75, but should be ~50.63 based on the bounding box provided. When I make a new transform tuple, using the correct latitude, the shapefile and map align.

What you expected to happen:

I expected the map and the shapefile to align.

Minimal Complete Verifiable Example:

bbox = (-124.90220439999996,
 41.12782617100004,
 -109.76249144199994,
 50.634716809000054)

bm = py3dep.get_map(layers='Hillshade Gray', geometry=bbox,geo_crs='epsg:4326', crs='epsg:4326', resolution=300)

print(bm.transform)
print(bbox)

Original shapefile and map with returned transform:
image

Aligned shapefile and map, after updating transform:
image

Anything else we need to know?:

Environment:
conda-forge

Output of INSTALLED VERSIONS ------------------ commit: None python: 3.8.5 | packaged by conda-forge | (default, Jul 24 2020, 01:25:15) [GCC 7.5.0] python-bits: 64 OS: Linux OS-release: 4.4.0-17763-Microsoft machine: x86_64 processor: x86_64 byteorder: little LC_ALL: en_US.UTF-8 LANG: C.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.6 libnetcdf: 4.7.4

pygeohydro: None
pygeoogc: 0.10.0
pygeoutils: 0.10.0
py3dep: 0.10.0
pynhd: None
pydaymet: None
xarray: 0.16.1
rasterio: 1.1.5
geopandas: 0.8.1
pandas: 1.1.0
orjson: 3.5.1
shapely: 1.7.0
scipy: 1.5.2
netCDF4: 1.5.4
defusedxml: 0.6.0
owslib: 0.23.0
pyproj: 2.6.1.post1
requests: 2.25.1
pygeos: None
matplotlib: 3.3.0
bottleneck: None
dask: 2.30.0
cartopy: 0.17.0
setuptools: 49.2.0.post20200712
pip: 20.2
conda: None
mamba: None
pytest: 6.2.2
IPython: 7.16.1
sphinx: None

Is py3DEP resampled data or derived directly from point clouds?

I am curious how py3DEP rasters are calculated? Are the data re-sampling precalculaed rasters or is it rasterizing a point cloud on-the-fly based on the spatial resolution requested by the user. In other words, if I request data at 1.456m cell resolution is this request being performed using a bilinear or nearest neighbour resample of an existing raster, or is a point cloud being rasterized at the requested resolution?

Here's some example code:

https://github.com/Riverscapes/riverscapes-tools/blob/3dep/packages/rscontext/research/3dep_testing.ipynb

Issues in using "get_map()" library from "pynhd"

What happened:
image
image
How to get rid of this error?

What you expected to happen:

Minimal Complete Verifiable Example:

# Put your MCVE code here

Anything else we need to know?: I am using python 3.7 version in Windows machine.

Environment:

Output of pygeohydro.show_versions() ```
</details>

Unable to fetch data with "not recognized as a supported file format" error from Rasterio

What happened:
While fetching data, the following error is thrown not recognized as a supported file format.

Minimal Complete Verifiable Example:

import pygeohydro, py3dep
wbd = pygeohydro.WBD("huc8")
geom = wbd.byids("huc8", "07120003").geometry[0]
dem = py3dep.get_map("DEM", geom, resolution=30, geo_crs="epsg:4326", crs="epsg:4326")

This throws the following error

---------------------------------------------------------------------------
CPLE_OpenFailedError                      Traceback (most recent call last)
File rasterio/_base.pyx:261, in rasterio._base.DatasetBase.__init__()

File rasterio/_shim.pyx:78, in rasterio._shim.open_dataset()

File rasterio/_err.pyx:216, in rasterio._err.exc_wrap_pointer()

CPLE_OpenFailedError: '/vsimem/2b58107f-8a05-4142-892f-bdd7137d218d/2b58107f-8a05-4142-892f-bdd7137d218d.tif' not recognized as a supported file format.

During handling of the above exception, another exception occurred:

RasterioIOError                           Traceback (most recent call last)
/home/oni/Projects/hyriver/input_data_prepare.ipynb Cell 5' in <cell line: 4>()
      [2](vscode-notebook-cell:/home/oni/Projects/hyriver/input_data_prepare.ipynb#ch0000011?line=1) wbd = pygeohydro.WBD("huc8")
      [3](vscode-notebook-cell:/home/oni/Projects/hyriver/input_data_prepare.ipynb#ch0000011?line=2) geom = wbd.byids("huc8", "07120003").geometry[0]
----> [4](vscode-notebook-cell:/home/oni/Projects/hyriver/input_data_prepare.ipynb#ch0000011?line=3) dem = py3dep.get_map("DEM", geom, resolution=30, geo_crs="epsg:4326", crs="epsg:4326")

File ~/miniconda3/envs/scicomp/lib/python3.9/site-packages/py3dep/py3dep.py:121, in get_map(layers, geometry, resolution, geo_crs, crs)
    119 r_dict = wms.getmap_bybox(_geometry.bounds, resolution, box_crs=crs)
    120 if isinstance(geometry, (Polygon, MultiPolygon)):
--> 121     ds = geoutils.gtiff2xarray(r_dict, _geometry, crs)
    122 else:
    123     ds = geoutils.gtiff2xarray(r_dict)
...
    133     writer = get_writer_for_driver(driver)

File rasterio/_base.pyx:263, in rasterio._base.DatasetBase.__init__()

RasterioIOError: '/vsimem/2b58107f-8a05-4142-892f-bdd7137d218d/2b58107f-8a05-4142-892f-bdd7137d218d.tif' not recognized as a supported file format.

Anything else we need to know?:

Environment:

Output of py3dep.show_versions() ``` INSTALLED VERSIONS ------------------ commit: None python: 3.9.12 | packaged by conda-forge | (main, Mar 24 2022, 23:25:59) [GCC 10.3.0] python-bits: 64 OS: Linux OS-release: 5.18.5-1-MANJARO machine: x86_64 processor: byteorder: little LC_ALL: None LANG: en_IN.UTF-8 LOCALE: en_IN.UTF-8 libhdf5: 1.12.1 libnetcdf: 4.8.1

aiodns: 3.0.0
aiohttp: 3.8.1
aiohttp-client-cache: 0.7.1
aiosqlite: 0.17.0
async-retriever: 0.3.3
bottleneck: 1.3.4
brotli: 1.0.9
cchardet: 2.1.7
click: 8.0.1
cytoolz: 0.11.2
dask: 2022.6.1
defusedxml: 0.7.1
folium: 0.12.1.post1
geopandas: 0.11.0
lxml: 4.8.0
matplotlib: 3.5.2
netCDF4: 1.6.0
networkx: 2.8.4
numpy: 1.22.4
owslib: 0.25.0
pandas: 1.4.3
py3dep: 0.0
pyarrow: 6.0.1
pydantic: 1.9.1
pydaymet: 0.13.2
pygeohydro: 0.13.0
pygeoogc: 0.13.2
pygeos: 0.12.0
pygeoutils: 0.13.2
pynhd: 0.13.2
pyproj: 3.3.1
pytest: 6.2.4
pytest-cov: None
rasterio: 1.2.10
requests: 2.28.0
requests-cache: 0.9.4
richdem: 2.3.0
rioxarray: 0.11.1
scipy: 1.8.1
shapely: 1.8.2
tables: 3.7.0
ujson: 5.3.0
urllib3: 1.26.5
xarray: 2022.3.0
xdist: None
yaml: 5.4.1

</details>

slope function returns integer

What happened?

when extracting slope with huc12 geometry, slope_ = py3dep.get_map("Slope Degrees", geometry, resolution=30) returns only in integers. see attached plot (please ignore the red dots on the plot, they are quantile values and intended for unrelated purposes)
slope_hs

What did you expect to happen?

expected a float

Minimal Complete Verifiable Example

No response

MVCE confirmation

  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

No response

Anything else we need to know?

No response

Environment

<py3dep 0.16.2>

Error Saving Raster Using Rioxarray

I was using the following code in the README and was unable to save a raster of elevation:

import py3dep
from pynhd import NLDI

geom = NLDI().get_basins("01031500").geometry[0]
dem = py3dep.get_map("DEM", geom, resolution=30, geo_crs="epsg:4326", crs="epsg:3857")
slope = py3dep.get_map("Slope Degrees", geom, resolution=30)
slope = py3dep.deg2mpm(slope)

import rioxarray

dem.rio.to_raster("dem_01031500.tif")

I got the following error:

/home/gerund/miniconda3/envs/rapidfim/lib/python3.9/site-packages/rioxarray/rioxarray.py:541: UserWarning: Non-rectilinear transform found. Unable to recalculate.
  warnings.warn("Non-rectilinear transform found. Unable to recalculate.")

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/tmp/ipykernel_20372/64869872.py in <module>
      1 import rioxarray
      2 
----> 3 dem.rio.to_raster("dem_01031500.tif")

~/miniconda3/envs/rapidfim/lib/python3.9/site-packages/rioxarray/raster_array.py in to_raster(self, raster_path, driver, dtype, tags, windowed, recalc_transform, lock, compute, **profile_kwargs)
    965         )
    966 
--> 967         return RasterioWriter(raster_path=raster_path).to_raster(
    968             xarray_dataarray=self._obj,
    969             tags=tags,

~/miniconda3/envs/rapidfim/lib/python3.9/site-packages/rioxarray/raster_writer.py in to_raster(self, xarray_dataarray, tags, windowed, lock, compute, **kwargs)
    236 
    237         with rasterio.open(self.raster_path, "w", **kwargs) as rds:
--> 238             _write_metatata_to_raster(rds, xarray_dataarray, tags)
    239             if not (lock and is_dask_collection(xarray_dataarray.data)):
    240                 # write data to raster immmediately if not dask array

~/miniconda3/envs/rapidfim/lib/python3.9/site-packages/rioxarray/raster_writer.py in _write_metatata_to_raster(raster_handle, xarray_dataset, tags)
     43     # write scales and offsets
     44     try:
---> 45         raster_handle.scales = tags["scales"]
     46     except KeyError:
     47         scale_factor = tags.get(

rasterio/_base.pyx in rasterio._base.DatasetBase.scales.__set__()

rasterio/_io.pyx in rasterio._io.DatasetWriterBase._set_all_scales()

TypeError: object of type 'numpy.float64' has no len()

Environment: Python 3.9.6

Output of py3dep.show_versions() ``` INSTALLED VERSIONS ------------------ commit: None python: 3.9.6 (default, Aug 18 2021, 19:38:01) [GCC 7.5.0] python-bits: 64 OS: Linux OS-release: 5.11.0-34-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8

affine: 2.3.0
aiohttp: 3.7.4.post0
aiohttp-client-cache>=0.5.1: None
aiosqlite: 0.17.0
async-retriever: 0.2.4
async-retriever>=0.2: None
async-retriever>=0.2.4: None
click: 7.1.2
cytoolz: 0.11.0
dask: 2021.09.0
defusedxml: 0.7.1
geopandas>=0.7: None
lxml: 4.6.3
nest-asyncio: installed
netCDF4: 1.5.7
networkx: 2.6.3
numpy>=1.17: None
owslib: 0.25.0
pandas>=1.0: None
pip: 21.2.4
py3dep: 0.11.1
pyarrow: 5.0.0
pydantic: 1.8.2
pydaymet: 0.11.1
pygeohydro: None
pygeoogc: 0.11.5
pygeoogc>=0.11: None
pygeoogc>=0.11.5: None
pygeoutils: 0.11.4
pygeoutils>=0.11: None
pygeoutils>=0.11.4: None
pynhd: 0.11.3
pyproj>=2.2: None
pytest: None
rasterio: 1.2.8
requests: 2.26.0
requests-cache>=0.8: None
scipy: 1.7.1
setuptools: 52.0.0.post20210125
shapely>=1.6: None
simplejson: 3.17.5
ujson: 4.1.0
urllib3: 1.26.6
ward: None
xarray>=0.17: None
yaml: 5.4.1

</details>

Failing to pull non-static DEM

What happened?

My use of py3dep that had been working until this past week (as tested by CI) is now failing to pull 3DEP data at a non-static resolution. Note: this does not appear to relate any releases on your end, but the error appears to go from py3dep into pygeoogc into async-retriever, where I'm guessing the issue is stemming from my underlying aiohttp-client-cache going from 0.8.2 to 0.9.1. Also note I am installing py3dep with pip not conda (reproducible example below).

What did you expect to happen?

Pull the DEM data into memory as an xr.Dataset.

Minimal Complete Verifiable Example

Conda env yml file:

name: py3dep_env
channels:
- conda-forge
dependencies:
    - python=3.11
    - pip
    - pip:
      - py3dep

Python stress test that should succeed on static and fail on non-static request:

import py3dep
from shapely.geometry import box

xmin = -120.8
ymin = 39.0
xmax = -120.5
ymax = 39.3

bounds = box(xmin, ymin, xmax, ymax)
bounds_crs = 4326

# static dems should work
ds = py3dep.get_dem(geometry=bounds, resolution=30, crs=bounds_crs)
print("static dem success")

# calculated dem should fail
ds = py3dep.get_dem(geometry=bounds, resolution=120, crs=bounds_crs)
print("calculated dem success")

MVCE confirmation

  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

Traceback (most recent call last):
  File "/home/gary.koplik/repos/geosnipe/sandbox/stress_test_py3dep.py", line 22, in <module>
    ds = py3dep.get_dem(geometry=bounds, resolution=120, crs=bounds_crs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gary.koplik/.conda/envs/py3dep_env/lib/python3.11/site-packages/py3dep/py3dep.py", line 298, in get_dem
    dem = get_map("DEM", geometry, resolution, crs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gary.koplik/.conda/envs/py3dep_env/lib/python3.11/site-packages/py3dep/py3dep.py", line 148, in get_map
    valid_crs = ogc_utils.valid_wms_crs(wms_url)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gary.koplik/.conda/envs/py3dep_env/lib/python3.11/site-packages/pygeoogc/utils.py", line 796, in valid_wms_crs
    root = ETree.fromstring(ar.retrieve_text([url], [kwds], ssl=False)[0])
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gary.koplik/.conda/envs/py3dep_env/lib/python3.11/site-packages/async_retriever/async_retriever.py", line 498, in retrieve_text
    return retrieve(
           ^^^^^^^^^
  File "/home/gary.koplik/.conda/envs/py3dep_env/lib/python3.11/site-packages/async_retriever/async_retriever.py", line 394, in retrieve
    inp = BaseRetriever(
          ^^^^^^^^^^^^^^
  File "/home/gary.koplik/.conda/envs/py3dep_env/lib/python3.11/site-packages/async_retriever/_utils.py", line 175, in __init__
    self.url_kwds = self.generate_requests(urls, request_kwds, self.file_paths)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gary.koplik/.conda/envs/py3dep_env/lib/python3.11/site-packages/async_retriever/_utils.py", line 208, in generate_requests
    raise InputValueError(f"request_kwds ({invalids})", list(session_kwds))
async_retriever.exceptions.InputValueError: Given request_kwds (params) is invalid. Valid options are:
self
method
str_or_url
expire_after
kwargs

Anything else we need to know?

For debugging purposes, my weekly pipeline passed on 9/14/23 but failed on 9/21/23, so hopefully that can narrow which dependency issues are to blame.

Environment

PACKAGE VERSION

aiodns 3.0.0
aiohttp 3.8.5
aiohttp-client-cache 0.9.1
aiosqlite 0.19.0
async-retriever 0.15.0
bottleneck N/A
brotli 1.1.0
click 8.1.7
cytoolz 0.12.2
dask 2023.9.2
defusedxml 0.7.1
folium N/A
geopandas 0.14.0
h5netcdf N/A
hydrosignatures N/A
lxml 4.9.3
matplotlib N/A
netCDF4 1.6.4
networkx N/A
numba N/A
numpy 1.26.0
owslib 0.29.2
pandas 2.1.1
py3dep 0.15.0
pyarrow N/A
pydaymet N/A
pygeohydro N/A
pygeoogc 0.15.0
pygeos N/A
pygeoutils 0.15.0
pynhd N/A
pynldas2 N/A
pyproj 3.6.1
pytest N/A
pytest-cov N/A
rasterio 1.3.8
requests 2.31.0
requests-cache 1.1.0
richdem N/A
rioxarray 0.15.0
scipy 1.11.2
shapely 2.0.1
tables N/A
ujson 5.8.0
urllib3 2.0.5
xarray 2023.8.0
xdist N/A
yaml N/A

Error in compiling

What happened?

Get an error at
import py3dep

What did you expect to happen?

No response

Minimal Complete Verifiable Example

No response

MVCE confirmation

  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

raceback (most recent call last):
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\errors.py", line 823, in new_error_context
    yield
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\lowering.py", line 265, in lower_block
    self.lower_inst(inst)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\lowering.py", line 567, in lower_inst
    func(self, inst)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\parfors\parfor_lowering.py", line 348, in _lower_parfor_parallel
    call_parallel_gufunc(
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\parfors\parfor_lowering.py", line 1811, in call_parallel_gufunc
    builder.store(arg, ptr)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\llvmlite\ir\builder.py", line 778, in store
    raise TypeError("cannot store %s to %s: mismatching types"
TypeError: cannot store {float, i1} to {float, i8}*: mismatching types

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\arahmatmand\PythonForOF\GetDEM\getDEM.py", line 1, in <module>
    import py3dep
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\py3dep\__init__.py", line 15, in <module>
    from py3dep.py3dep import (
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\py3dep\py3dep.py", line 23, in <module>
    from py3dep import utils
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\py3dep\utils.py", line 62, in <module>
    def _get_queued(
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\decorators.py", line 219, in wrapper
    disp.compile(sig)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\dispatcher.py", line 965, in compile
    cres = self._compiler.compile(args, return_type)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\dispatcher.py", line 125, in compile
    status, retval = self._compile_cached(args, return_type)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\dispatcher.py", line 139, in _compile_cached
    retval = self._compile_core(args, return_type)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\dispatcher.py", line 152, in _compile_core
    cres = compiler.compile_extra(self.targetdescr.typing_context,
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler.py", line 716, in compile_extra
    return pipeline.compile_extra(func)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler.py", line 452, in compile_extra
    return self._compile_bytecode()
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler.py", line 520, in _compile_bytecode
    return self._compile_core()
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler.py", line 499, in _compile_core
    raise e
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler.py", line 486, in _compile_core
    pm.run(self.state)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler_machinery.py", line 368, in run
    raise patched_exception
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler_machinery.py", line 356, in run
    self._runPass(idx, pass_inst, state)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler_lock.py", line 35, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler_machinery.py", line 311, in _runPass
    mutated |= check(pss.run_pass, internal_state)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler_machinery.py", line 273, in check
    mangled = func(compiler_state)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\typed_passes.py", line 394, in run_pass
    lower.lower()
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\lowering.py", line 168, in lower
    self.lower_normal_function(self.fndesc)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\lowering.py", line 222, in lower_normal_function
    entry_block_tail = self.lower_function_body()
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\lowering.py", line 251, in lower_function_body
    self.lower_block(block)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\lowering.py", line 263, in lower_block
    with new_error_context('lowering "{inst}" at {loc}', inst=inst,
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\errors.py", line 837, in new_error_context
    raise newerr.with_traceback(tb)
numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: native lowering)
cannot store {float, i1} to {float, i8}*: mismatching types

File "..\..\Anaconda3_5\envs\pvlibdev\lib\site-packages\py3dep\utils.py", line 88:
def _get_queued(
    <source elided>
    if elv_max is not None:
        queued = np.logical_and(queued, elevtn <= elv_max)
        ^

During: lowering "id=0[LoopNest(index_variable = parfor_index.47, range = (0, elevtn_size0.3, 1)), LoopNest(index_variable = parfor_index.48, range = (0, elevtn_size1.4, 1))]{282: <ir.Block at C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\py3dep\utils.py (88)>}Var($parfor_index_tuple_var.54, utils.py:88)" at C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\py3dep\utils.py (88)

Anything else we need to know?

No response

Environment

raceback (most recent call last): File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\errors.py", line 823, in new_error_context yield File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\lowering.py", line 265, in lower_block self.lower_inst(inst) File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\lowering.py", line 567, in lower_inst func(self, inst) File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\parfors\parfor_lowering.py", line 348, in _lower_parfor_parallel call_parallel_gufunc( File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\parfors\parfor_lowering.py", line 1811, in call_parallel_gufunc builder.store(arg, ptr) File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\llvmlite\ir\builder.py", line 778, in store raise TypeError("cannot store %s to %s: mismatching types" TypeError: cannot store {float, i1} to {float, i8}*: mismatching types

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\arahmatmand\PythonForOF\GetDEM\getDEM.py", line 1, in
import py3dep
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\py3dep_init_.py", line 15, in
from py3dep.py3dep import (
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\py3dep\py3dep.py", line 23, in
from py3dep import utils
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\py3dep\utils.py", line 62, in
def _get_queued(
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\decorators.py", line 219, in wrapper
disp.compile(sig)
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\dispatcher.py", line 965, in compile
cres = self._compiler.compile(args, return_type)
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\dispatcher.py", line 125, in compile
status, retval = self._compile_cached(args, return_type)
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\dispatcher.py", line 139, in _compile_cached
retval = self._compile_core(args, return_type)
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\dispatcher.py", line 152, in _compile_core
cres = compiler.compile_extra(self.targetdescr.typing_context,
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler.py", line 716, in compile_extra
return pipeline.compile_extra(func)
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler.py", line 452, in compile_extra
return self._compile_bytecode()
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler.py", line 520, in _compile_bytecode
return self._compile_core()
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler.py", line 499, in _compile_core
raise e
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler.py", line 486, in _compile_core
pm.run(self.state)
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler_machinery.py", line 368, in run
raise patched_exception
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler_machinery.py", line 356, in run
self._runPass(idx, pass_inst, state)
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler_lock.py", line 35, in _acquire_compile_lock
return func(args, **kwargs)
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler_machinery.py", line 311, in _runPass
mutated |= check(pss.run_pass, internal_state)
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\compiler_machinery.py", line 273, in check
mangled = func(compiler_state)
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\typed_passes.py", line 394, in run_pass
lower.lower()
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\lowering.py", line 168, in lower
self.lower_normal_function(self.fndesc)
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\lowering.py", line 222, in lower_normal_function
entry_block_tail = self.lower_function_body()
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\lowering.py", line 251, in lower_function_body
self.lower_block(block)
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\lowering.py", line 263, in lower_block
with new_error_context('lowering "{inst}" at {loc}', inst=inst,
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\numba\core\errors.py", line 837, in new_error_context
raise newerr.with_traceback(tb)
numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: native lowering)
cannot store {float, i1} to {float, i8}
: mismatching types

File "....\Anaconda3_5\envs\pvlibdev\lib\site-packages\py3dep\utils.py", line 88:
def _get_queued(

if elv_max is not None:
queued = np.logical_and(queued, elevtn <= elv_max)
^

During: lowering "id=0[LoopNest(index_variable = parfor_index.47, range = (0, elevtn_size0.3, 1)), LoopNest(index_variable = parfor_index.48, range = (0, elevtn_size1.4, 1))]{282: <ir.Block at C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\py3dep\utils.py (88)>}Var($parfor_index_tuple_var.54, utils.py:88)" at C:\Users\arahmatmand\Anaconda3_5\envs\pvlibdev\lib\site-packages\py3dep\utils.py (88)

Error when using py3dep.check_3dep_availability(bbox). ZeroMatched: Service returned no features

What happened:

I'm trying to run this piece of code from the documentation

bbox = (-69.77, 45.07, -69.31, 45.45)
py3dep.check_3dep_availability(bbox)

The following error was returned:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
File c:\Users\Luc\anaconda3\envs\hyriver\lib\site-packages\pygeoogc\pygeoogc.py:171, in ArcGISRESTful.oids_bygeom(self, geom, geo_crs, spatial_relation, sql_clause, distance)
    170 try:
--> 171     return self.partition_oids(resp["objectIds"])
    172 except (KeyError, TypeError) as ex:

File c:\Users\Luc\anaconda3\envs\hyriver\lib\site-packages\pygeoogc\pygeoogc.py:256, in ArcGISRESTful.partition_oids(self, oids)
    244 """Partition feature IDs based on ``self.max_nrecords``.
    245 
    246 Parameters
   (...)
    254     A list of feature IDs partitioned by ``self.max_nrecords``.
    255 """
--> 256 return self.client.partition_oids(oids)

File c:\Users\Luc\anaconda3\envs\hyriver\lib\site-packages\pygeoogc\core.py:291, in ArcGISRESTfulBase.partition_oids(self, oids)
    290 """Partition feature IDs based on ``self.max_nrecords``."""
--> 291 oid_list = [oids] if isinstance(oids, int) else set(oids)
    292 if len(oid_list) == 0:

TypeError: 'NoneType' object is not iterable

The above exception was the direct cause of the following exception:
...
    173     msg = resp["error"]["message"] if "error" in resp else "No matched records"
--> 174     raise ZeroMatched(msg) from ex

ZeroMatched: Service returned no features with the following error message:
No matched records

What you expected to happen:

The output as described by the documentation

{'1m': True, '3m': False, '5m': False, '10m': True, '30m': True, '60m': False, 'topobathy': False}

Environment:

Output of py3dep.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:50:36) [MSC v.1929 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 141 Stepping 1, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: English_United States.1252
libhdf5: 1.12.1
libnetcdf: 4.8.1

aiodns: 3.0.0
aiohttp: 3.8.1
aiohttp-client-cache: 0.7.0
aiosqlite: 0.17.0
async-retriever: 0.3.3
bottleneck: 1.3.4
brotli: installed
cchardet: 2.1.7
click: 8.1.3
cytoolz: 0.11.2
dask: 2022.6.0
defusedxml: 0.7.1
folium: 0.12.1.post1
geopandas: 0.10.2
lxml: 4.9.0
matplotlib: 3.4.3
netCDF4: 1.5.8
networkx: 2.8.4
numpy: 1.22.4
owslib: 0.25.0
pandas: 1.4.2
py3dep: 0.13.2
pyarrow: 6.0.0
pydantic: 1.9.1
pydaymet: 0.13.2
pygeohydro: 0.13.2
pygeoogc: 0.13.2
pygeos: 0.12.0
pygeoutils: 0.13.2
pynhd: 0.13.2
pyproj: 3.3.1
pytest: None
pytest-cov: None
rasterio: 1.2.10
requests: 2.28.0
requests-cache: 0.9.4
richdem: None
rioxarray: 0.11.1
scipy: 1.8.1
shapely: 1.8.2
tables: None
ujson: 5.3.0
urllib3: 1.26.9
xarray: 2022.3.0
xdist: None
yaml: 6.0

National Map Server for 3DEP offline?

What happened?

I am trying to programmatically download 1 m lidar tiles from the usgs3dep database for a number of sites across the united states. I have written a software package that wraps around by three dab to accomplish this in a randomized way, however the package started failing approximately a month ago. It serves the following error:

Service is currently not available, try again later: https://elevation.nationalmap.gov/arcgis/services/3DEPElevation/ImageServer/WMSServer

What did you expect to happen?

I was expecting to get a tile of lidar data downloaded from the usgs.

Minimal Complete Verifiable Example

import py3dep

bbox = (-78.027678, 39.054019, -77.913653, 39.123205)

dem = py3dep.get_map("DEM", bbox, 1)

MVCE confirmation

  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

---------------------------------------------------------------------------
CPLE_OpenFailedError                      Traceback (most recent call last)
File rasterio/_base.pyx:308, in rasterio._base.DatasetBase.__init__()

File rasterio/_base.pyx:219, in rasterio._base.open_dataset()

File rasterio/_err.pyx:221, in rasterio._err.exc_wrap_pointer()

CPLE_OpenFailedError: '/vsimem/8c5edfaa-95e4-4fed-9782-d12c00c6c682/8c5edfaa-95e4-4fed-9782-d12c00c6c682.tif' not recognized as a supported file format.

During handling of the above exception, another exception occurred:

RasterioIOError                           Traceback (most recent call last)
File ~/mambaforge/envs/levees_usa/lib/python3.11/site-packages/py3dep/py3dep.py:161, in get_map(layers, geometry, resolution, geo_crs, crs)
    160 try:
--> 161     ds = geoutils.gtiff2xarray(r_dict, _geometry, crs)
    162 except RasterioIOError as ex:

File ~/mambaforge/envs/levees_usa/lib/python3.11/site-packages/pygeoutils/pygeoutils.py:243, in gtiff2xarray(r_dict, geometry, geo_crs, ds_dims, driver, all_touched, nodata, drop)
    241     var_name = {lyr: "_".join(lyr.split("_")[:-3]) for lyr in r_dict.keys()}
--> 243 attrs = utils.get_gtiff_attrs(r_dict[key1], ds_dims, driver, nodata)
    244 dtypes: dict[str, type] = {}

File ~/mambaforge/envs/levees_usa/lib/python3.11/site-packages/pygeoutils/_utils.py:374, in get_gtiff_attrs(resp, ds_dims, driver, nodata)
    373 memfile.write(resp)
--> 374 with memfile.open(driver=driver) as src:
    375     r_crs = pyproj.CRS(src.crs)

File ~/mambaforge/envs/levees_usa/lib/python3.11/site-packages/rasterio/env.py:401, in ensure_env.<locals>.wrapper(*args, **kwds)
    400 with Env.from_defaults():
--> 401     return f(*args, **kwds)

File ~/mambaforge/envs/levees_usa/lib/python3.11/site-packages/rasterio/io.py:138, in MemoryFile.open(self, driver, width, height, count, crs, transform, dtype, nodata, sharing, **kwargs)
    137     log.debug("VSI path: {}".format(mempath.path))
--> 138     return DatasetReader(mempath, driver=driver, sharing=sharing, **kwargs)
    139 else:

File rasterio/_base.pyx:310, in rasterio._base.DatasetBase.__init__()

RasterioIOError: '/vsimem/8c5edfaa-95e4-4fed-9782-d12c00c6c682/8c5edfaa-95e4-4fed-9782-d12c00c6c682.tif' not recognized as a supported file format.

The above exception was the direct cause of the following exception:

ServiceUnavailableError                   Traceback (most recent call last)
Cell In[5], line 2
      1 bbox = (-78.027678, 39.054019, -77.913653, 39.123205)
----> 2 dem = py3dep.get_map("DEM", bbox, 1)

File ~/mambaforge/envs/levees_usa/lib/python3.11/site-packages/py3dep/py3dep.py:163, in get_map(layers, geometry, resolution, geo_crs, crs)
    161     ds = geoutils.gtiff2xarray(r_dict, _geometry, crs)
    162 except RasterioIOError as ex:
--> 163     raise ServiceUnavailableError(wms_url) from ex
    164 valid_layers = wms.get_validlayers()
    165 return utils.rename_layers(ds, list(valid_layers))

ServiceUnavailableError: Service is currently not available, try again later:
https://elevation.nationalmap.gov/arcgis/services/3DEPElevation/ImageServer/WMSServer

Anything else we need to know?

No response

Environment

SYS INFO

commit: None
python: 3.11.1 | packaged by conda-forge | (main, Mar 30 2023, 16:51:07) [GCC 11.3.0]
python-bits: 64
OS: Linux
OS-release: 6.2.0-39-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
libhdf5: 1.12.2
libnetcdf: 4.9.1

PACKAGE VERSION

aiodns N/A
aiohttp 3.8.4
aiohttp-client-cache 0.8.1
aiosqlite 0.18.0
async-retriever 0.15.0
bottleneck 1.3.7
brotli N/A
click 8.1.3
cytoolz 0.12.0
dask 2023.3.2
defusedxml 0.7.1
folium 0.14.0
geopandas 0.12.2
h5netcdf N/A
hydrosignatures N/A
lxml 4.9.2
matplotlib 3.7.1
netCDF4 1.6.3
networkx 3.0
numba N/A
numpy 1.24.2
owslib 0.29.2
pandas 1.5.3
py3dep 0.15.0
pyarrow N/A
pydaymet N/A
pygeohydro N/A
pygeoogc 0.15.0
pygeos N/A
pygeoutils 0.15.0
pynhd N/A
pynldas2 N/A
pyproj 3.5.0
pytest N/A
pytest-cov N/A
rasterio 1.3.6
requests 2.28.2
requests-cache 1.1.0
richdem N/A
rioxarray 0.14.0
scipy 1.10.1
shapely 2.0.1
tables N/A
ujson 5.7.0
urllib3 1.26.15
xarray 2023.3.0
xdist N/A
yaml N/A

Check_availability returning NoneType in 0.16.0

What happened?

Checking availability of various resolutions in USGS 3DEP database to allow quick selection of highest-resolution data.

What did you expect to happen?

Return a response in the form of:

{'1m': True, '3m': True, '5m': False, '10m': True, '30m': True, '60m': False, 'topobathy': False}

Minimal Complete Verifiable Example

import py3dep

bbox = (-82.536901, 34.541368, -82.508202, 34.563319)

avail = py3dep.check_3dep_availability(bbox=bbox)

MVCE confirmation

  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

Traceback (most recent call last):
  File "~\poly-val\_test_del.py", line 5, in <module>
  File "~\AppData\Local\pypoetry\Cache\virtualenvs\poly-val-L9A71YTm-py3.10\lib\site-packages\py3dep\py3dep.py", line 664, in check_3dep_availability
    avail = {
  File "~\AppData\Local\pypoetry\Cache\virtualenvs\poly-val-L9A71YTm-py3.10\lib\site-packages\py3dep\py3dep.py", line 665, in <dictcomp>
    res: "Failed" if "error" in r else bool(r.get("count")) for res, r in zip(res_layers, resps)
TypeError: argument of type 'NoneType' is not iterable

Anything else we need to know?

This function is working using py3dep version 0.14.0

Environment

SYS INFO

commit: bff6686d5dcbb3c778832c2f298a12e27bfe4531
python: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 154 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('English_United States', '1252')

PACKAGE VERSION

async-retriever 0.16.0
pygeoogc 0.16.0
pygeoutils 0.16.0
py3dep 0.16.0
pynhd N/A
pygridmet N/A
pydaymet N/A
hydrosignatures N/A
pynldas2 N/A
pygeohydro N/A
aiohttp 3.9.1
aiohttp-client-cache 0.10.0
aiosqlite 0.19.0
cytoolz 0.12.2
ujson 5.9.0
defusedxml 0.7.1
joblib 1.3.2
multidict 6.0.4
owslib 0.29.3
pyproj 3.6.1
requests 2.31.0
requests-cache 1.1.1
shapely 2.0.2
url-normalize 1.4.3
urllib3 2.1.0
yarl 1.9.4
geopandas 0.12.2
netcdf4 1.6.5
numpy 1.24.4
rasterio 1.3.9
rioxarray 0.14.1
scipy 1.11.4
xarray 2023.12.0
click 8.1.7
pyflwdir N/A
networkx 3.2.1
pyarrow N/A
folium N/A
h5netcdf 1.3.0
matplotlib 3.8.2
pandas 2.1.4
numba 0.57.1
bottleneck N/A
py7zr N/A
pyogrio N/A

"Holes" In DEM?

I've been querying data in the following bounding box (xmin, ymin, xmax, ymax)

boundingbox = (-91.0, 40.9, -90.0, 41.7)

After writing the data to a GeoTIFF file and loading it into QGIS I noticed some holes in specific parts of the area at 0 elevation that seem to partially follow the outline of the river
image

However when I looked at the DEP3Elevation layer directly from the WMS in QGIS that area was correctly filled in (Unfortunately at the time I'm writing this it seems the service is down so I cannot show it).

Also I tried querying that same area a couple of times and the same "holes" were there.

My gut feeling is that it isn't a py3dep problem but a server side issue but I'd be curious to know what's happening here!

Add running from command line

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
Since the main purpose of this package is getting geotiff images of topographic data, it makes sense to directly read the geometries from shape-files (shp, geopkg, feather, etc.) and save the results as tiff or netcdf files.

Describe alternatives you've considered
No other alternative.

Additional context
It seems that this command line capability is not very complicated. So, perhaps we can use the Python's built-in argparse library. Alternatively, we can use click or typer.

HDF error thrown when accessing 3dep data

What happened?

When running a request to get 3dep data (that was working fine before), an error was thrown by what seems to be the API related to the HD5 file that was there. The data is still present and accessible, but the error output is large and isn't caught by stdout or stderr traps. This issue wasn't present last week, but I did reinstall my conda environment so I'm not sure if that's the issue...I'm using version 0.14.0 of py3dep. I've included a gist here showing the error, if there's a dependency mismatch that leads to this let me know! https://gist.github.com/nkorinek/2ced03efee446765bc2442e3208ac7e0

Thanks y'all

What did you expect to happen?

I expected the code to retrieve the data without throwing an error for the HDF.

Minimal Complete Verifiable Example

import py3dep
bounds = (-105.681749, 40.322431, -105.67937, 40.325095)
slope = py3dep.get_map("Slope Degrees", bounds, 30, geo_crs="EPSG:4269")

MVCE confirmation

  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
  #000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
    major: Attribute
    minor: Unable to initialize object
  #005: H5Oattribute.c line 494 in H5O__attr_open_by_name(): can't locate attribute: '_QuantizeBitGroomNumberOfSignificantDigits'
    major: Attribute
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
  #000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
    major: Attribute
    minor: Unable to initialize object
  #005: H5Oattribute.c line 494 in H5O__attr_open_by_name(): can't locate attribute: '_QuantizeGranularBitRoundNumberOfSignificantDigits'
    major: Attribute
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
  #000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
    major: Attribute
    minor: Unable to initialize object
  #005: H5Oattribute.c line 494 in H5O__attr_open_by_name(): can't locate attribute: '_QuantizeBitRoundNumberOfSignificantBits'
    major: Attribute
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
  #000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
    major: Attribute
    minor: Unable to initialize object
  #005: H5Oattribute.c line 494 in H5O__attr_open_by_name(): can't locate attribute: '_QuantizeBitGroomNumberOfSignificantDigits'
    major: Attribute
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
  #000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
    major: Attribute
    minor: Unable to initialize object
  #005: H5Oattribute.c line 494 in H5O__attr_open_by_name(): can't locate attribute: '_QuantizeGranularBitRoundNumberOfSignificantDigits'
    major: Attribute
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
  #000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
    major: Attribute
    minor: Unable to initialize object
  #005: H5Oattribute.c line 494 in H5O__attr_open_by_name(): can't locate attribute: '_QuantizeBitRoundNumberOfSignificantBits'
    major: Attribute
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
  #000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
    major: Attribute
    minor: Unable to initialize object
  #005: H5Oattribute.c line 476 in H5O__attr_open_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #006: H5Adense.c line 394 in H5A__dense_open(): can't locate attribute in name index
    major: Attribute
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
  #000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
    major: Attribute
    minor: Unable to initialize object
  #005: H5Oattribute.c line 476 in H5O__attr_open_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #006: H5Adense.c line 394 in H5A__dense_open(): can't locate attribute in name index
    major: Attribute
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
  #000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
    major: Attribute
    minor: Unable to initialize object
  #005: H5Oattribute.c line 476 in H5O__attr_open_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #006: H5Adense.c line 394 in H5A__dense_open(): can't locate attribute in name index
    major: Attribute
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
  #000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
    major: Attribute
    minor: Unable to initialize object
  #005: H5Oattribute.c line 476 in H5O__attr_open_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #006: H5Adense.c line 394 in H5A__dense_open(): can't locate attribute in name index
    major: Attribute
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
  #000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
    major: Attribute
    minor: Unable to initialize object
  #005: H5Oattribute.c line 476 in H5O__attr_open_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #006: H5Adense.c line 394 in H5A__dense_open(): can't locate attribute in name index
    major: Attribute
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
  #000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
    major: Attribute
    minor: Unable to initialize object
  #005: H5Oattribute.c line 476 in H5O__attr_open_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #006: H5Adense.c line 394 in H5A__dense_open(): can't locate attribute in name index
    major: Attribute
    minor: Object not found

Anything else we need to know?

No response

Environment

SYS INFO -------- commit: None python: 3.9.16 | packaged by conda-forge | (main, Feb 1 2023, 21:39:03) [GCC 11.3.0] python-bits: 64 OS: Linux OS-release: 5.19.0-38-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.12.2 libnetcdf: 4.9.1

PACKAGE VERSION

aiodns N/A
aiohttp 3.8.4
aiohttp-client-cache 0.8.1
aiosqlite 0.18.0
async-retriever 0.14.0
bottleneck N/A
brotli N/A
click 8.0.4
cytoolz 0.12.0
dask 2023.3.2
defusedxml 0.7.1
folium 0.14.0
geopandas 0.12.2
h5netcdf N/A
hydrosignatures N/A
lxml 4.9.2
matplotlib 3.7.1
netCDF4 1.6.3
networkx 2.8.4
numba 0.53.1
numpy 1.24.2
owslib 0.29.1
pandas 1.5.3
py3dep 0.14.0
pyarrow 11.0.0
pydaymet N/A
pygeohydro N/A
pygeoogc 0.14.0
pygeos 0.14
pygeoutils 0.14.0
pynhd 0.14.0
pynldas2 N/A
pyproj 3.5.0
pytest N/A
pytest-cov N/A
rasterio 1.3.6
requests 2.28.1
requests-cache 1.0.1
richdem N/A
rioxarray 0.14.0
scipy 1.10.1
shapely 2.0.1
tables N/A
ujson 5.7.0
urllib3 1.26.15
xarray 2023.3.0
xdist N/A
yaml N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.