Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/data-publishing/ogcapi-edr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ The `xarray-edr`_ provider plugin reads and extracts `NetCDF`_ and `Zarr`_ data
# to derive automagically
x_field: lon
y_field: lat
z_field: z
time_field: time
# optionally specify the coordinate reference system of your dataset
# else pygeoapi assumes it is WGS84 (EPSG:4326).
Expand Down
1 change: 1 addition & 0 deletions pygeoapi/provider/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def __init__(self, provider_def):
self.uri_field = provider_def.get('uri_field')
self.x_field = provider_def.get('x_field')
self.y_field = provider_def.get('y_field')
self.z_field = provider_def.get('z_field')
self.time_field = provider_def.get('time_field')
self.title_field = provider_def.get('title_field')
self.properties = provider_def.get('properties', [])
Expand Down
7 changes: 7 additions & 0 deletions pygeoapi/provider/xarray_edr.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ def position(self, **kwargs):
if datetime_ is not None:
query_params[self.time_field] = self._make_datetime(datetime_)

z = kwargs.get('z')
if z is not None:
if self.z_field is not None:
query_params[self.z_field] = z
else:
LOGGER.debug('No vertical level found')

LOGGER.debug(f'query parameters: {query_params}')

try:
Expand Down