Reading-eScience-Centre / ncwms

ncWMS - A Web Map Service for displaying environmental data over the web
Other
63 stars 30 forks source link

ncwms does not use variable units value defined in ncml file #97

Open nguyandy opened 1 year ago

nguyandy commented 1 year ago

My goal is to update the units of the "speed" variable from cm/s to m/s. This is the content of the .ncml file that I am loading in.

<?xml version="1.0" encoding="UTF-8"?>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2" location="dataset.nc">

  <variable name="speed" shape="time latitude longitude" type="float">
    <attribute name="units" type="String" value="m/s" />
    <attribute name="scale_factor" type="float" value="0.01" />
    <attribute name="add_offset" type="float" value="0.0" />
  </variable>

</netcdf>

The dataset loads into ncwms without issues. The scale_factor is successfully applied. However when accessing getMetadata, the units value is still returned as cm/s instead of m/s.

When checking on Godiva3, the updated scale is used, but units still show as cm/s here too.

Is there something I'm missing here?

ncWMS Version: 2.5.2