Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue Visualizing Daymet Zarr File with Projected and Chunked Dimensions #67

Open
raster-blaster opened this issue Sep 25, 2024 · 1 comment

Comments

@raster-blaster
Copy link

Hi,

I’m trying to visualize a Daymet Zarr file using titiler-xarray, but I’m encountering issues related to chunked dimensions and projected coordinates. Below is a description of the two datasets I’ve been working with and the specific error I’m encountering.

Dataset 1: NOAA CoastWatch Geo-Polar SST (Successfully Visualized)

I was able to visualize the Zarr dataset from the following URL:

zarr: https://ncsa.osn.xsede.org/Pangeo/pangeo-forge/noaa-coastwatch-geopolar-sst-feedstock/noaa-coastwatch-geopolar-sst.zarr

Metadata:

<xarray.Dataset> Size: 3TB
Dimensions:           (time: 7134, lat: 3600, lon: 7200)
Coordinates:
  * lat               (lat) float32 -89.97 -89.93 -89.88 ... 89.93 89.97
  * lon               (lon) float32 -180.0 -179.9 -179.9 ... 179.9 180.0
  * time              (time) datetime64[ns] 2002-09-01T12:00:00 ... 2022...
Data variables:
    analysed_sst      (time, lat, lon) float32 dask.array<chunksize=(2, 1800, 7200)>
    analysis_error    (time, lat, lon) float32 dask.array<chunksize=(2, 1800, 7200)>
    mask              (time, lat, lon) float32 dask.array<chunksize=(2, 1800, 7200)>
    sea_ice_fraction  (time, lat, lon) float32 dask.array<chunksize=(2, 1800, 7200)>

Dataset 2: Daymet Zarr (Issue Encountered)

When trying to visualize the Daymet Zarr dataset from the following URL:

zarr: https://daymeteuwest.blob.core.windows.net/daymet-zarr/daily/hi.zarr

Metadata:

<xarray.Dataset> Size: 69GB
Dimensions:                  (time: 14965, y: 584, x: 284, nv: 2)
Coordinates:
    lat                      (y, x) float32 dask.array<chunksize=(584, 284)>
    lon                      (y, x) float32 dask.array<chunksize=(584, 284)>
  * time                     (time) datetime64[ns] 1980-01-01T12:00:00 ...
  * x                        (x) float32 -5.802e+06 ... -5.519e+06
  * y                        (y) float32 -3.9e+04 -4e+04 ... -6.22e+05
Dimensions without coordinates: nv
Data variables:
    dayl                     (time, y, x) float32 dask.array<chunksize=(365, 584, 284)>
    prcp                     (time, y, x) float32 dask.array<chunksize=(365, 584, 284)>
    tmax                     (time, y, x) float32 dask.array<chunksize=(365, 584, 284)>
    tmin                     (time, y, x) float32 dask.array<chunksize=(365, 584, 284)>

Issue:
I received the following error when trying to visualize the Daymet dataset:

ValueError: conflicting sizes for dimension 'y': length 256 on the data but length 105 on coordinate 'lat'

I noticed that the Daymet Zarr dimensions are chunked, and the lat/lon coordinates are projected to x, y dimensions. I suspect this is the reason why titiler-xarray is unable to visualize the dataset. I’ve also encountered similar issues while attempting to visualize other NetCDF files.

Question:

Does titiler-xarray currently support visualizing datasets with chunked and projected dimensions like the Daymet dataset? If not, I would be happy to contribute to implementing this feature. Could you please provide some guidance or suggestions on how I can modify titiler-xarray or my data to work around this issue?

@vincentsarago
Copy link
Member

@raster-blaster it can seems to access https://daymeteuwest.blob.core.windows.net/daymet-zarr/daily/hi.zarr

ClientResponseError: 409, message='Public access is not permitted on this storage account.', url=URL('https://daymeteuwest.blob.core.windows.net/daymet-zarr/daily/hi.zarr/.zmetadata')

FYI, we've moved most of the internal to the titiler repo https://github.com/developmentseed/titiler/tree/main/src/titiler/xarray

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants