# Guidance on Correctly Serving Zarr Datasets Through pygeoapi

**URL:** <https://discourse.pangeo.io/t/guidance-on-correctly-serving-zarr-datasets-through-pygeoapi/5448>\
**Category:** Uncategorized\
**Tags:** zarr\
**Created:** [November 18, 2025, 7:47pm UTC](https://discourse.pangeo.io/t/guidance-on-correctly-serving-zarr-datasets-through-pygeoapi/5448 "2025-11-18T19:47:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaboom\_Official](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/kaboom_official/32/3509_2.png) [@Kaboom\_Official](https://discourse.pangeo.io/u/Kaboom_Official)\
**Post date:** [November 18, 2025, 7:47pm UTC](https://discourse.pangeo.io/t/guidance-on-correctly-serving-zarr-datasets-through-pygeoapi/5448/1 "2025-11-18T19:47:57Z")

</div>

Hello everyone. I’m trying to serve my data using pygeoapi, but I’m not able to get it working properly. I keep running into errors even after following the documentation closely.

I tried loading the example Zarr file using the EDR API, and I also tried subsetting data using Coverages, but neither seems to work correctly.

Below is my dataset information. The grid size is 101 × 101, with bounds [-28.0, 40.0, -27.0, 41.0]:

> xarray.Dataset  
> Dimensions:  
> time: 32  
> lat: 101  
> lon: 101
> 
> Coordinates:  
> lat (lat) float32 40.0 40.01 … 40.99 41.0  
> lon (lon) float32 -28.0 -27.99 … -27.01 -27.0  
> time (time) datetime64[ns] 2005-12-01T09:00:00 … 2006-01-…
> 
> Data variables:  
> analysed\_sst (time, lat, lon) float64 dask.array\<…\>  
> analysis\_error (time, lat, lon) float64 dask.array\<…\>  
> mask (time, lat, lon) float32 dask.array\<…\>  
> sea\_ice\_fraction (time, lat, lon) float64 dask.array\<…\>
> 
> Attributes: (47)

and my config file looks like this for edr

> sstzarr:  
> type: collection  
> title: Wind and Temperature  
> description: SST, Airtemp  
> keywords:
> 
> - trying ogc coverage  
> links:
> - type: text/html  
> rel: canonical  
> title: information  
> href:  
> hrelang: en-US  
> extents:  
> spatial:  
> bbox: [-28.0, 40.0, -27.0, 41.0]  
> crs: //wwwopengisnet/def/crs/OGC/1.3/CRS84  
> temporal:  
> begin:  
> end: null
> 
> providers:
> 
> - type: edr  
> name: xarray-edr  
> data: /home/itgo/Desktop/pygeoapi/pygeoapi/tests/data/analysed\_sst.zarr  
> format:  
> name: zarr  
> mimetype: application/zip

and my config for coverage looks like this

> windt:  
> type: collection  
> title: Wind and Temperature  
> description: SST, Airtemp  
> keywords:
> 
> - trying ogc coverage  
> links:
> - type: text/html  
> rel: canonical  
> title: information  
> href:  
> hrelang: en-US  
> extents:  
> spatial:  
> bbox: [-28.0, 40.0, -27.0, 41.0]  
> crs: ://www.opengis.net/def/crs/OGC/1.3/CRS84  
> temporal:  
> begin:  
> end: null
> 
> ```auto
> providers:
> - type: coverage
> name: xarray
> data: /home/itgo/Desktop/pygeoapi/pygeoapi/tests/data/analysed_sst.zarr
> format:
> name: zarr
> mimetype: application/zip
> 
> ```

My Coverage Query

I tried this coverage query:

> localhost:5000/collections/windt/coverage?  
> subset=lat(40.2:40.5)&  
> subset=lon(-27.8:-27.4)&  
> subset=time(“2005-12-10”:“2005-12-15”)&  
> f=json

It did subset the data but it was not proper

> xarray.Dataset
> 
> Dimensions:  
> time: 32  
> lat: 31  
> lon: 101

> Coordinates:  
> lat (lat) float32 40.2 40.21 40.22 … 40.49 40.5  
> lon (lon) float32 -28.0 -27.99 … -27.01 -27.0  
> time (time) datetime64[ns] 2005-12-01T09:00:00 … 2006-01-…

> Data variables:  
> analysed\_sst (time, lat, lon) float64 dask.array\<chunksize=(32, 31, 101), meta=np.ndarray\>  
> analysis\_error (time, lat, lon) float64 dask.array\<chunksize=(32, 31, 101), meta=np.ndarray\>  
> mask (time, lat, lon) float32 dask.array\<chunksize=(32, 31, 101), meta=np.ndarray\>  
> sea\_ice\_fraction (time, lat, lon) float64 dask.array\<chunksize=(32, 31, 101), meta=np.ndarray\>
> 
> Indexes: (3)
> 
> Attributes: (47)

as you can see lon dim is intact even after subsetting.

Then I tried edr query and query is like this

> localhost:5000/collections/sstzarr/cube?  
> bbox=-28.0,40.0,-27.5,40.5&  
> parameter-name=analysed\_sst

And it was showing like this

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/2X/b/bc24e64bcff7a1b8f802c7b0c995d838ce21ba86.png)

which is incorrect ,It should be something like this instead

[actual](https://ibb.co/NgLS32NL)

The location of the subset is correct in this case, but it looks like pygeoapi is tiling multiple files and placing them side-by-side within that area.

Is there anything I can follow, such as a full tutorial, reference implementation, or working example to understand how to configure pygeoapi correctly for Zarr, Coverage, and EDR? I’ve already read the documentation, but it still feels incomplete, and I’m not sure what else I can do to make this work.

If there are recommended resources, best practices, or known limitations when using xarray/Zarr with pygeoapi, I’d really appreciate some guidance.

Thank You and sorry for such a long post.
