Package ucar.nc2.grib.grib1
Class Grib1Record
- java.lang.Object
-
- ucar.nc2.grib.grib1.Grib1Record
-
public class Grib1Record extends Object
A Grib1 message.- Since:
- 9/3/11
-
-
Field Summary
Fields Modifier and Type Field Description static Grib1Record
lastRecordRead
-
Constructor Summary
Constructors Constructor Description Grib1Record(byte[] header, Grib1SectionIndicator is, Grib1SectionGridDefinition gdss, Grib1SectionProductDefinition pdss, Grib1SectionBitMap bitmap, Grib1SectionBinaryData dataSection)
Construction for Grib1Record.Grib1Record(RandomAccessFile raf)
Construct record by reading raf, no checking
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GribData.Info
getBinaryDataInfo(RandomAccessFile raf)
Grib1SectionBitMap
getBitMapSection()
Grib1SectionBinaryData
getDataSection()
int
getFile()
Grib1Gds
getGDS()
Grib1SectionGridDefinition
getGDSsection()
byte[]
getHeader()
Grib1SectionIndicator
getIs()
Grib1ParamTime
getParamTime(Grib1Customizer cust)
Grib1SectionProductDefinition
getPDSsection()
CalendarDate
getReferenceDate()
float[]
readData(RandomAccessFile raf)
static float[]
readData(RandomAccessFile raf, long startPos)
Read data array by first reading in GribRecord.float[]
readData(RandomAccessFile raf, GribData.InterpolationMethod method)
float[]
readDataRaw(RandomAccessFile raf)
int[]
readRawData(RandomAccessFile raf)
void
setFile(int file)
void
showDataInfo(RandomAccessFile raf, Formatter f)
-
-
-
Field Detail
-
lastRecordRead
public static Grib1Record lastRecordRead
-
-
Constructor Detail
-
Grib1Record
public Grib1Record(byte[] header, Grib1SectionIndicator is, Grib1SectionGridDefinition gdss, Grib1SectionProductDefinition pdss, Grib1SectionBitMap bitmap, Grib1SectionBinaryData dataSection)
Construction for Grib1Record.- Parameters:
header
- Grib headeris
- Grib1IndicatorSectiongdss
- Grib1GridDefinitionSectionpdss
- Grib1ProductDefinitionSectionbitmap
- Grib1SectionBitMapdataSection
- Grib1SectionData
-
Grib1Record
public Grib1Record(RandomAccessFile raf) throws IOException
Construct record by reading raf, no checking- Parameters:
raf
- positioned at start of message: the 'G' in "GRIB"- Throws:
IOException
- on read error
-
-
Method Detail
-
getHeader
public byte[] getHeader()
-
getIs
public Grib1SectionIndicator getIs()
-
getGDSsection
public Grib1SectionGridDefinition getGDSsection()
-
getGDS
public Grib1Gds getGDS()
-
getPDSsection
public Grib1SectionProductDefinition getPDSsection()
-
getBitMapSection
public Grib1SectionBitMap getBitMapSection()
-
getDataSection
public Grib1SectionBinaryData getDataSection()
-
getReferenceDate
public CalendarDate getReferenceDate()
-
getFile
public int getFile()
-
setFile
public void setFile(int file)
-
getParamTime
public Grib1ParamTime getParamTime(Grib1Customizer cust)
-
readData
public float[] readData(RandomAccessFile raf) throws IOException
- Throws:
IOException
-
readDataRaw
public float[] readDataRaw(RandomAccessFile raf) throws IOException
- Throws:
IOException
-
readData
public float[] readData(RandomAccessFile raf, GribData.InterpolationMethod method) throws IOException
- Throws:
IOException
-
showDataInfo
public void showDataInfo(RandomAccessFile raf, Formatter f) throws IOException
- Throws:
IOException
-
readData
public static float[] readData(RandomAccessFile raf, long startPos) throws IOException
Read data array by first reading in GribRecord. All sections are read in, so scanMode is from the datafile, not the index.- Parameters:
raf
- from this RandomAccessFilestartPos
- message starts here- Returns:
- data as float[] array
- Throws:
IOException
- on read error
-
getBinaryDataInfo
public GribData.Info getBinaryDataInfo(RandomAccessFile raf) throws IOException
- Throws:
IOException
-
readRawData
public int[] readRawData(RandomAccessFile raf) throws IOException
- Throws:
IOException
-
-