}
private static Config buildConfig( NetcdfDataset ncd )
{
// Check for "zebra_platform" attribute w/ value of "class".
Attribute attrib = ncd.findGlobalAttributeIgnoreCase( "zebra_platform" );
if ( attrib == null ) return null;
if ( !attrib.isString() ) return null;
if ( !attrib.getStringValue().equals( "class" ) ) return null;
// Check for "history" attribute w/ value of "ClassNcFile".
attrib = ncd.findGlobalAttributeIgnoreCase( "history" );
if ( attrib == null ) return null;
if ( !attrib.isString() ) return null;
if ( !attrib.getStringValue().equals( "ClassNcFile" ) ) return null;
// Check for existence of global attribute "AvapsEditorVersion".
attrib = ncd.findGlobalAttributeIgnoreCase( "AvapsEditorVersion" );
if ( attrib == null ) return null;
if ( !attrib.isString() ) return null;
// Check for existence of global attribute "SoundingDescription".
attrib = ncd.findGlobalAttributeIgnoreCase( "SoundingDescription" );
if ( attrib == null ) return null;
if ( !attrib.isString() ) return null;
// Check that only one dimension and that it is the time dimension.
List list = ncd.getRootGroup().getDimensions();
if ( list.size() != 1) return null;
Dimension d = (Dimension) list.get(0);