private String lonVarName;
private String elevVarName;
static public boolean isValidFile( NetcdfDataset ds)
{
Attribute conventionsAtt = ds.findGlobalAttribute( "Conventions");
if ( conventionsAtt == null)
conventionsAtt = ds.findGlobalAttributeIgnoreCase( "Conventions");
if ( conventionsAtt == null) return( false);
if ( ! conventionsAtt.isString()) return( false);
if ( ! conventionsAtt.getStringValue().equals( "NCAR-RAF/nimbus" ) ) return( false );
Attribute versionAtt = ds.findGlobalAttributeIgnoreCase( "Version" );
if ( versionAtt == null )
{
// A bit of a hack for some UWYO KingAir files.
versionAtt = new Attribute( "Version", "1.3" );
ds.addAttribute( null, versionAtt );
ds.finish();
return ( true );
}
if ( ! versionAtt.isString() ) return ( false );
if ( versionAtt.getStringValue( ).equals( "1.2")) return( true );
if ( versionAtt.getStringValue( ).equals( "1.3")) return( true );
return( false );
}