}
private static Config buildConfig( NetcdfDataset ncd )
{
// Check for global attribute "ingest_software".
Attribute attrib = ncd.findGlobalAttributeIgnoreCase( "ingest_software" );
if ( attrib == null ) return null;
if ( !attrib.isString() ) return null;
if ( attrib.getStringValue().indexOf( "sonde_ingest.c" ) == -1 ) return null;
// Check for existence of global attribute "sounding_number".
attrib = ncd.findGlobalAttributeIgnoreCase( "sounding_number" );
if ( attrib == null ) return null;
if ( !attrib.isString() ) return null;
// Check for existence of global attribute "serial_number".
attrib = ncd.findGlobalAttributeIgnoreCase( "serial_number" );
if ( attrib == null ) return null;
if ( !attrib.isString() ) return null;
// Check for existence of global attribute "launch_status".
attrib = ncd.findGlobalAttributeIgnoreCase( "launch_status" );
if ( attrib == null ) return null;
if ( !attrib.isString() ) return null;
// Check for global attribute "zeb_platform".
attrib = ncd.findGlobalAttributeIgnoreCase( "zeb_platform" );
if ( attrib == null ) return null;
if ( !attrib.isString() ) return null;
// Check for global attribute "history".
attrib = ncd.findGlobalAttributeIgnoreCase( "history" );
if ( attrib == null ) return null;
if ( !attrib.isString() ) return null;
if ( attrib.getStringValue().indexOf( "Zebra DataStore library" ) == -1
&& attrib.getStringValue().indexOf( "zebra-zeblib" ) == -1 )
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;