public float[] readData() throws java.io.IOException { Array allData; int[] shape = sweepVar.getShape(); int[] origind = new int[sweepVar.getRank()]; if (isVolume) { origind[0] = sweepno; origind[1] = 0; shape[0] = 1; } try { allData = sweepVar.read(origind, shape); } catch (InvalidRangeException e) { throw new IOException(e.getMessage()); } int nradials = shape[0]; int ngates = shape[1]; IndexIterator dataIter = allData.getIndexIterator(); for (int j = 0; j < nradials; j++) { for (int i = 0; i < ngates; i++) { float tp = dataIter.getFloatNext(); if (tp == -32768.0f || tp == -99900.0f) { dataIter.setFloatCurrent(Float.NaN); } } } return (float[]) allData.get1DJavaArray(float.class); }
public float[] readData(int ray) throws java.io.IOException { Array rayData; int [] shape = sweepVar.getShape(); int [] origind = new int[ sweepVar.getRank()]; if(isVolume) { origind[0] = sweepno; origind[1] = ray; shape[0] = 1; shape[1] = 1; } else { shape[0] = 1; origind[0] = ray; } try { rayData = sweepVar.read(origind, shape); } catch (ucar.ma2.InvalidRangeException e) { throw new IOException(e.getMessage()); } int ngates = shape[1]; IndexIterator dataIter = rayData.getIndexIterator(); for(int i = 0; i < ngates; i++) { float tp = dataIter.getFloatNext(); if(tp == -32768.0f || tp == -99900.0f) { dataIter.setFloatCurrent(Float.NaN); } } return (float []) rayData.get1DJavaArray(float.class); }
public float[] readData(int ray) throws java.io.IOException { Array rayData; int [] shape = sweepVar.getShape(); int [] origind = new int[ sweepVar.getRank()]; if(isVolume) { origind[0] = sweepno; origind[1] = ray; shape[0] = 1; shape[1] = 1; } else { shape[0] = 1; origind[0] = ray; } try { rayData = sweepVar.read(origind, shape); } catch (ucar.ma2.InvalidRangeException e) { throw new IOException(e.getMessage()); } int ngates = shape[1]; IndexIterator dataIter = rayData.getIndexIterator(); for(int i = 0; i < ngates; i++) { float tp = dataIter.getFloatNext(); if(tp == -32768.0f || tp == -99900.0f) { dataIter.setFloatCurrent(Float.NaN); } } return (float []) rayData.get1DJavaArray(float.class); }
public float[] readData(int ray) throws java.io.IOException { Array rayData; int[] shape = sweepVar.getShape(); int[] origind = new int[sweepVar.getRank()]; if (isVolume) { origind[0] = sweepno; origind[1] = ray; shape[0] = 1; shape[1] = 1; } else { shape[0] = 1; origind[0] = ray; } try { rayData = sweepVar.read(origind, shape); } catch (ucar.ma2.InvalidRangeException e) { throw new IOException(e.getMessage()); } int ngates = shape[1]; IndexIterator dataIter = rayData.getIndexIterator(); for (int i = 0; i < ngates; i++) { float tp = dataIter.getFloatNext(); if (tp == -32768.0f || tp == -99900.0f) { dataIter.setFloatCurrent(Float.NaN); } } return (float[]) rayData.get1DJavaArray(float.class); }
public float[] readData() throws java.io.IOException { Array allData; int [] shape = sweepVar.getShape(); int [] origind = new int[ sweepVar.getRank()]; if(isVolume) { origind[0] = sweepno; origind[1] = 0; shape[0] = 1; } try { allData = sweepVar.read(origind, shape); } catch (InvalidRangeException e) { throw new IOException(e.getMessage()); } int nradials = shape[0]; int ngates = shape[1]; IndexIterator dataIter = allData.getIndexIterator(); for (int j = 0; j < nradials; j++) { for(int i = 0; i < ngates; i++) { float tp = dataIter.getFloatNext(); if(tp == -32768.0f || tp == -99900.0f) { dataIter.setFloatCurrent(Float.NaN); } } } return (float []) allData.get1DJavaArray(float.class); }
public float[] readData() throws java.io.IOException { Array allData; int [] shape = sweepVar.getShape(); int [] origind = new int[ sweepVar.getRank()]; if(isVolume) { origind[0] = sweepno; origind[1] = 0; shape[0] = 1; } try { allData = sweepVar.read(origind, shape); } catch (InvalidRangeException e) { throw new IOException(e.getMessage()); } int nradials = shape[0]; int ngates = shape[1]; IndexIterator dataIter = allData.getIndexIterator(); for (int j = 0; j < nradials; j++) { for(int i = 0; i < ngates; i++) { float tp = dataIter.getFloatNext(); if(tp == -32768.0f || tp == -99900.0f) { dataIter.setFloatCurrent(Float.NaN); } } } return (float []) allData.get1DJavaArray(float.class); }
it.setFloatCurrent( (float) ( val * elevVarUnitsConversionFactor ) );
/** * Translate missing data to NaNs. Data must be DOUBLE or FLOAT * * @param in convert this array * @return same array, with missing values replaced by NaNs */ private Array convertMissing(Array in) { if (debugRead) System.out.println("convertMissing "); IndexIterator iterIn = in.getIndexIterator(); if (in.getElementType() == double.class) { while (iterIn.hasNext()) { double val = iterIn.getDoubleNext(); if (isMissing_(val)) iterIn.setDoubleCurrent(Double.NaN); } } else if (in.getElementType() == float.class) { while (iterIn.hasNext()) { float val = iterIn.getFloatNext(); if (isMissing_(val)) iterIn.setFloatCurrent(Float.NaN); } } return in; }
it.setFloatCurrent( (float) ( val * elevVarUnitsConversionFactor ) );
/** * Translate missing data to NaNs. Data must be DOUBLE or FLOAT * * @param in convert this array * @return same array, with missing values replaced by NaNs */ private Array convertMissing(Array in) { if (debugRead) System.out.println("convertMissing "); IndexIterator iterIn = in.getIndexIterator(); if (in.getElementType() == double.class) { while (iterIn.hasNext()) { double val = iterIn.getDoubleNext(); if (isMissing_(val)) iterIn.setDoubleCurrent(Double.NaN); } } else if (in.getElementType() == float.class) { while (iterIn.hasNext()) { float val = iterIn.getFloatNext(); if (isMissing_(val)) iterIn.setFloatCurrent(Float.NaN); } } return in; }
it.setFloatCurrent( (float) ( val * elevVarUnitsConversionFactor ) );
it.setFloatCurrent( (float) ( val * elevVarUnitsConversionFactor ) );
it.setFloatCurrent( (float) ( val * elevVarUnitsConversionFactor ) );
} else if (elevVar.getDataType() == DataType.FLOAT) { float val = it.getFloatNext(); it.setFloatCurrent((float) (val
} else if (elevVar.getDataType() == DataType.FLOAT) { float val = it.getFloatNext(); it.setFloatCurrent((float) (val
it.setFloatCurrent( (float) ( val * elevVarUnitsConversionFactor ) );
} else if (elevVar.getDataType() == DataType.FLOAT) { float val = it.getFloatNext(); it.setFloatCurrent((float) (val