Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Non-numeric values for ensemble axis values #822

Open
lesserwhirls opened this issue Apr 27, 2017 · 0 comments
Open

Non-numeric values for ensemble axis values #822

lesserwhirls opened this issue Apr 27, 2017 · 0 comments

Comments

@lesserwhirls
Copy link
Collaborator

If an ensemble member is named using a non-numeric value (e.g., a string), trying to subset with NCSS fails with the following:

java.lang.UnsupportedOperationException: 
CoordinateAxis1D.getCoordValues() on non-numeric
at 
ucar.nc2.dataset.CoordinateAxis1D.getCoordValues(CoordinateAxis1D.java:235)
at 
thredds.server.ncSubset.view.netcdf.WriterCFStationCollection.createDataVariables(WriterCFStationCollection.java:238)
at 
thredds.server.ncSubset.view.netcdf.WriterCFStationCollection.writeHeader(WriterCFStationCollection.java:130)
at 
thredds.server.ncSubset.view.netcdf.CFStationCollectionWriterWrapper.header(CFStationCollectionWriterWrapper.java:112)
at 
thredds.server.ncSubset.view.NetCDFPointDataWriter.header(NetCDFPointDataWriter.java:94)
at 
thredds.server.ncSubset.view.PointDataStream.stream(PointDataStream.java:53)

Here is a skeleton NcML file that should trigger this:

<netcdf  xmlns="http:https://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2" >
  <variable  name="ens"  type="String"  shape="ens" >
    <attribute  name="standard_name"  value="ensemble" />
    <attribute  name="_CoordinateAxisType"  value="Ensemble" />
    <values>ens0 ens1 ens2</values>
  </variable>
  <aggregation dimName="ens" type="joinNew" >
    <variableAgg name="Convective_Available_Potential_Energy_surface" />
    <netcdf location="ensBase.nc" />
    <netcdf location="ensBase.nc" />
    <netcdf location="ensBase.nc" />
  </aggregation>
</netcdf>

ensBase.nc is attached as ensBase.nc.zip

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

No branches or pull requests

1 participant