public TypedDataset open(NetcdfDataset ncd, ucar.nc2.util.CancelTask task, StringBuilder errlog) throws IOException { return new Nids2Dataset(ncd); }
/** * Constructor. * * @param ds must be from nids IOSP */ public Nids2Dataset(NetcdfDataset ds) { super(ds); this.ds = ds; desc = "Nids 2 radar dataset"; try { if (ds.findGlobalAttribute("isRadial").getNumericValue().intValue() == 0) { parseInfo.append("*** Dataset is not a radial data\n"); throw new IOException("Dataset is not a radial data\n"); } setEarthLocation(); setTimeUnits(); setStartDate(); setEndDate(); setBoundingBox(); } catch (Throwable e) { System.err.println("CDM radial dataset failed to open this dataset " + e); } }
public void clearDatasetMemory() { List rvars = getDataVariables(); Iterator iter = rvars.iterator(); while (iter.hasNext()) { RadialVariable radVar = (RadialVariable) iter.next(); radVar.clearVariableMemory(); } }
public static void main(String args[]) throws Exception, IOException, InstantiationException, IllegalAccessException { String fileIn1 = "/home/yuanho/Desktop/TBWI/TBWI.78ohp.20080829_1619"; String fileIn = "/home/yuanho/Desktop/TBWI/TBWI.181r0.20080829_1620"; //RadialDatasetSweepFactory datasetFactory = new RadialDatasetSweepFactory(); //RadialDatasetSweep rds = datasetFactory.open(fileIn, null); RadialDatasetSweep rds = (RadialDatasetSweep) TypedDatasetFactory.open(FeatureType.RADIAL, fileIn, null, new StringBuilder()); RadialDatasetSweep rds1 = (RadialDatasetSweep) TypedDatasetFactory.open(FeatureType.RADIAL, fileIn1, null, new StringBuilder()); //List rvars = rds.getDataVariables(); RadialDatasetSweep.RadialVariable rf = (RadialDatasetSweep.RadialVariable) rds.getDataVariable("BaseReflectivity"); // rf.getSweep(0); testRadialVariable(rf); //String fileIn1 = "/home/yuanho/NIDS/Level3_BYX_N0V_20051013_0908.nids"; //RadialDatasetSweepFactory datasetFactory1 = new RadialDatasetSweepFactory(); //RadialDatasetSweep rds1 = datasetFactory1.open(fileIn1, null); // RadialDatasetSweep rds1 = (RadialDatasetSweep) TypedDatasetFactory.open(FeatureType.RADIAL, fileIn1, null, new StringBuilder()); //List rvars1 = rds1.getDataVariables(); RadialDatasetSweep.RadialVariable rf1 = (RadialDatasetSweep.RadialVariable) rds1.getDataVariable("Precip1hr"); //rf1.getSweep(0); testRadialVariable(rf1); }
/** * Constructor. * * @param ds must be from nids IOSP */ public Nids2Dataset(NetcdfDataset ds) { super(ds); this.ds = ds; desc = "Nids 2 radar dataset"; try { if (ds.findGlobalAttribute("isRadial").getNumericValue().intValue() == 0) { parseInfo.append("*** Dataset is not a radial data\n"); throw new IOException("Dataset is not a radial data\n"); } setEarthLocation(); setTimeUnits(); setStartDate(); setEndDate(); setBoundingBox(); } catch (Throwable e) { System.err.println("CDM radial dataset failed to open this dataset " + e); } }
public void clearDatasetMemory() { List rvars = getDataVariables(); Iterator iter = rvars.iterator(); while (iter.hasNext()) { RadialVariable radVar = (RadialVariable) iter.next(); radVar.clearVariableMemory(); } }
public static void main(String args[]) throws Exception, IOException, InstantiationException, IllegalAccessException { String fileIn1 = "/home/yuanho/Desktop/TBWI/TBWI.78ohp.20080829_1619"; String fileIn = "/home/yuanho/Desktop/TBWI/TBWI.181r0.20080829_1620"; //RadialDatasetSweepFactory datasetFactory = new RadialDatasetSweepFactory(); //RadialDatasetSweep rds = datasetFactory.open(fileIn, null); RadialDatasetSweep rds = (RadialDatasetSweep) TypedDatasetFactory.open(FeatureType.RADIAL, fileIn, null, new StringBuilder()); RadialDatasetSweep rds1 = (RadialDatasetSweep) TypedDatasetFactory.open(FeatureType.RADIAL, fileIn1, null, new StringBuilder()); String st = rds.getStartDate().toString(); String et = rds.getEndDate().toString(); String id = rds.getRadarID(); String name = rds.getRadarName(); rds.getRadarID(); //List rvars = rds.getDataVariables(); RadialDatasetSweep.RadialVariable rf = (RadialDatasetSweep.RadialVariable) rds.getDataVariable("BaseReflectivity"); // rf.getSweep(0); testRadialVariable(rf); //String fileIn1 = "/home/yuanho/NIDS/Level3_BYX_N0V_20051013_0908.nids"; //RadialDatasetSweepFactory datasetFactory1 = new RadialDatasetSweepFactory(); //RadialDatasetSweep rds1 = datasetFactory1.open(fileIn1, null); // RadialDatasetSweep rds1 = (RadialDatasetSweep) TypedDatasetFactory.open(FeatureType.RADIAL, fileIn1, null, new StringBuilder()); //List rvars1 = rds1.getDataVariables(); RadialDatasetSweep.RadialVariable rf1 = (RadialDatasetSweep.RadialVariable) rds1.getDataVariable("Precip1hr"); //rf1.getSweep(0); testRadialVariable(rf1); }
public TypedDataset open(NetcdfDataset ncd, ucar.nc2.util.CancelTask task, StringBuilder errlog) throws IOException { return new Nids2Dataset(ncd); }