System.out.println("Creating new test index " + args[1]);
Grib2WriteIndex.main(args);
} else {
args[1] = dataPath + "ndfd.wmo"+ GribIndexName.currentSuffix;
Grib2WriteIndex.main(args);
GridIndex index1 = new GribIndexReader().open(args[1]);
GridIndex index2 = new GribIndexReader().open(testPath + "ndfd.wmo"+ GribIndexName.currentSuffix);
// Compare Indexes
testEquals(index1, index2);
f = new File(args[1]);
f.delete();
}
//if (true )
// return;
System.out.println("\nTesting indexing of AVN.5deg.wmo");
args[0] = dataPath + "AVN.5deg.wmo";
if (reset) {
args[1] = testPath + "AVN.5deg.wmo"+ GribIndexName.currentSuffix;
f = new File(args[1]);
f.delete();
System.out.println("Creating new test index " + args[1]);
Grib2WriteIndex.main(args);
} else {
args[1] = dataPath + "AVN.5deg.wmo"+ GribIndexName.currentSuffix;
Grib2WriteIndex.main(args);
GridIndex index1 = new GribIndexReader().open(args[1]);
GridIndex index2 = new GribIndexReader().open(testPath + "AVN.5deg.wmo"+ GribIndexName.currentSuffix);
// Compare Indexes
testEquals(index1, index2);
f = new File(args[1]);
f.delete();
}
System.out.println("\nTesting indexing of CLDGRIB2.2005040905");
args[0] = dataPath + "CLDGRIB2.2005040905";
if (reset) {
args[1] = testPath + "CLDGRIB2.2005040905"+ GribIndexName.currentSuffix;
f = new File(args[1]);
f.delete();
System.out.println("Creating new test index " + args[1]);
Grib2WriteIndex.main(args);
} else {
args[1] = dataPath + "CLDGRIB2.2005040905"+ GribIndexName.currentSuffix;
Grib2WriteIndex.main(args);
GridIndex index1 = new GribIndexReader().open(args[1]);
GridIndex index2 = new GribIndexReader().open(testPath + "CLDGRIB2.2005040905"+ GribIndexName.currentSuffix);
// Compare Indexes
testEquals(index1, index2);
f = new File(args[1]);
f.delete();
}
System.out.println("\nTesting indexing of Global_1p0deg_Ensemble.grib2");
args[0] = dataPath + "Global_1p0deg_Ensemble.grib2";
if (reset) {
args[1] = testPath + "Global_1p0deg_Ensemble.grib2"+ GribIndexName.currentSuffix;
f = new File(args[1]);
f.delete();
System.out.println("Creating new test index " + args[1]);
Grib2WriteIndex.main(args);
} else {
args[1] = dataPath + "Global_1p0deg_Ensemble.grib2"+ GribIndexName.currentSuffix;
Grib2WriteIndex.main(args);
GridIndex index1 = new GribIndexReader().open(args[1]);
GridIndex index2 = new GribIndexReader().open(testPath + "Global_1p0deg_Ensemble.grib2"+ GribIndexName.currentSuffix);
// Compare Indexes
testEquals(index1, index2);
f = new File(args[1]);
f.delete();
}