cat = intake.open_catalog('https://raw.githubusercontent.com/USGS-python/hytest-catalogs/main/hytest_intake_catalog.yml')
ds = cat['conus404-40year-cloud'].to_dask()
# restrict variables to those of interest
c404 = ds["PREC_ACC_NC", "TK", "ACSWDNB", "I_ACSWDNB", "ACSWDNB", "I_ACSWDNB", "ACLWDNB", "I_ACLWDNB", "ACLWUPB", "I_ACLWUPB"]
# use slice to filter by time
c404 = c404.sel(time=slice("1990-01-01 00:00", "1990-12-31 00:00"))
#WGS84 = EPSG:4326
c404.rio.write_crs("epsg:4326", inplace=True)
# bring in boundaries of the Deleware River Basing (DRB) and create single polygon
drb = pygeohydro.WBD("huc6", outfields=["huc6", "name"]).byids("huc6", ["020401", "020402"])
# create a column where all entries have the same value and dissolve
drb["name"] = "DRB"
drb = drb.dissolve(by="name")
# clip data to precise geometry of Delaware River Basin
c404_drb = c404.rio.clip(drb.geometry, drop=True, invert=False, from_disk=True)
Problem description
The clipped xarray dataset c404_drb is not clipped to the bounds of drb.geometry. The CRS for both datasets has been confirmed to be the same.
Expected Output
An xarray dataset clipped to the correct polygon bounds.
Environment Information
rioxarray = 0.11.2
Installation method
conda
Conda environment information (if you installed with conda):
Code Sample, a copy-pastable example if possible
Problem description
The clipped xarray dataset c404_drb is not clipped to the bounds of drb.geometry. The CRS for both datasets has been confirmed to be the same.
Expected Output
An xarray dataset clipped to the correct polygon bounds.
Environment Information
rioxarray = 0.11.2
Installation method
conda
Conda environment information (if you installed with conda):
Environment (
conda list
):Details about
conda
and system (conda info
):