Package ucar.nc2.iosp.mcidas
Class AreaReader
- java.lang.Object
-
- ucar.nc2.iosp.mcidas.AreaReader
-
public class AreaReader extends Object
Class to read an AREA file and create a netCDF data structure from it.
-
-
Constructor Summary
Constructors Constructor Description AreaReader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleaninit(String location, ucar.nc2.NetcdfFile ncfile)initialize; note that the file is reopened herestatic booleanisValidFile(ucar.unidata.io.RandomAccessFile raf)Check to see if this is a valid AREA file.ucar.ma2.ArrayreadVariable(ucar.nc2.Variable v2, ucar.ma2.Section section)Read the values for a variableStringtoString()
-
-
-
Method Detail
-
init
public boolean init(String location, ucar.nc2.NetcdfFile ncfile) throws ucar.mcidas.AreaFileException
initialize; note that the file is reopened here- Parameters:
location- the AREA file to openncfile- the netCDF file to fill out- Returns:
- true if successful
- Throws:
ucar.mcidas.AreaFileException- problem opening the area file
-
isValidFile
public static boolean isValidFile(ucar.unidata.io.RandomAccessFile raf)
Check to see if this is a valid AREA file.- Parameters:
raf- the file in question- Returns:
- true if it is an AREA file.
-
readVariable
public ucar.ma2.Array readVariable(ucar.nc2.Variable v2, ucar.ma2.Section section) throws IOException, ucar.ma2.InvalidRangeExceptionRead the values for a variable- Parameters:
v2- the variablesection- the section info (time,x,y range);- Returns:
- the data
- Throws:
IOException- problem reading fileucar.ma2.InvalidRangeException- range doesn't match data
-
-