ecmwf / skinnywms

Lightweight WMS server for serving maps of netCDF and GRIB data
Apache License 2.0
47 stars 22 forks source link

incorrect unit in temporal extent within getCapabilities document #57

Closed bjoern-reetz closed 2 years ago

bjoern-reetz commented 2 years ago

The time step of the temporal extent within the WMS capabilities document is rendered incorrectly when the time steps are not an integer number of hours.

Expected behaviour (step of PT15M):

<Dimension name="time" default="2022-02-14T03:00:00Z" units="ISO8601" multipleValues="0" nearestValue="0">
2022-02-14T03:00:00Z,2022-02-14T03:15:00Z/2022-02-15T03:45:00Z/PT15M
</Dimension>

Actual behaviour (step of PT0H):

<Dimension name="time" default="2022-02-14T03:00:00Z" units="ISO8601" multipleValues="0" nearestValue="0">
2022-02-14T03:00:00Z,2022-02-14T03:15:00Z/2022-02-15T03:45:00Z/PT0H
</Dimension>

Steps to reproduce:

The PT0H is most likely an artefact due to rendering 0.25 hours with "PT%d%s" % (step, unit) in datatypes.py.

EduardRosert commented 2 years ago

This issue is now resolved on develop branch. Please feel free to test.