- To: thredds@xxxxxxxxxxxxxxxx
- Subject: [thredds] Using the NC4 String type for a variable containing a "cf_role" attribute
- From: Kyle Wilcox <kyle@xxxxxxxxxxxxxxx>
- Date: Thu, 12 Dec 2013 15:27:21 -0500
I have two files where the only difference is the variable type of the
"feature_type_instance" variable.
When using a Char array, it works just fine.
When using a String, NCJ fails to find a StructureRecord:
java.lang.IllegalStateException: Cant find Structure record
at
ucar.nc2.ft.point.standard.Table$TableStructure.<init>(Table.java:253)
at ucar.nc2.ft.point.standard.Table.factory(Table.java:110)
at ucar.nc2.ft.point.standard.NestedTable.<init>(NestedTable.java:98)
at
ucar.nc2.ft.point.standard.TableAnalyzer.analyze(TableAnalyzer.java:406)
at
ucar.nc2.ft.point.standard.TableAnalyzer.factory(TableAnalyzer.java:294)
at
ucar.nc2.ft.point.standard.PointDatasetStandardFactory.isMine(PointDatasetStandardFactory.java:114)
at
ucar.nc2.ft.FeatureDatasetFactoryManager.wrap(FeatureDatasetFactoryManager.java:272)
at
ucar.nc2.ft.FeatureDatasetFactoryManager.open(FeatureDatasetFactoryManager.java:243)
You can try loading each file into the FeatureTypes/PointFeature tab to see
the stacktrace from the String file (I've attached them).
Based on CF docs (
http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.6/cf-conventions.html#coordinates-metadata)
it states:
"The variable carrying the cf_role attribute may have any data type."
Is this a bug in NCJ?
Thanks,
Kyle
Attachment:
char_type.nc
Description: Cdf file
Attachment:
string_type.nc
Description: Cdf file
- Follow-Ups: