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 Grib1RecordlastRecordRead
-
Constructor Summary
Constructors Constructor Description Grib1Record(byte[] header, Grib1SectionIndicator is, Grib1SectionGridDefinition gdss, Grib1SectionProductDefinition pdss, Grib1SectionBitMap bitmap, Grib1SectionBinaryData dataSection)Construction for Grib1Record.Grib1Record(ucar.unidata.io.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.InfogetBinaryDataInfo(ucar.unidata.io.RandomAccessFile raf)Grib1SectionBitMapgetBitMapSection()Grib1SectionBinaryDatagetDataSection()intgetFile()Grib1GdsgetGDS()Grib1SectionGridDefinitiongetGDSsection()byte[]getHeader()Grib1SectionIndicatorgetIs()Grib1ParamTimegetParamTime(Grib1Customizer cust)Grib1SectionProductDefinitiongetPDSsection()ucar.nc2.time.CalendarDategetReferenceDate()float[]readData(ucar.unidata.io.RandomAccessFile raf)static float[]readData(ucar.unidata.io.RandomAccessFile raf, long startPos)Read data array by first reading in GribRecord.float[]readData(ucar.unidata.io.RandomAccessFile raf, GribData.InterpolationMethod method)float[]readDataRaw(ucar.unidata.io.RandomAccessFile raf)int[]readRawData(ucar.unidata.io.RandomAccessFile raf)voidsetFile(int file)voidshowDataInfo(ucar.unidata.io.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(ucar.unidata.io.RandomAccessFile raf) throws IOExceptionConstruct 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 ucar.nc2.time.CalendarDate getReferenceDate()
-
getFile
public int getFile()
-
setFile
public void setFile(int file)
-
getParamTime
public Grib1ParamTime getParamTime(Grib1Customizer cust)
-
readData
public float[] readData(ucar.unidata.io.RandomAccessFile raf) throws IOException- Throws:
IOException
-
readDataRaw
public float[] readDataRaw(ucar.unidata.io.RandomAccessFile raf) throws IOException- Throws:
IOException
-
readData
public float[] readData(ucar.unidata.io.RandomAccessFile raf, GribData.InterpolationMethod method) throws IOException- Throws:
IOException
-
showDataInfo
public void showDataInfo(ucar.unidata.io.RandomAccessFile raf, Formatter f) throws IOException- Throws:
IOException
-
readData
public static float[] readData(ucar.unidata.io.RandomAccessFile raf, long startPos) throws IOExceptionRead 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(ucar.unidata.io.RandomAccessFile raf) throws IOException
- Throws:
IOException
-
readRawData
public int[] readRawData(ucar.unidata.io.RandomAccessFile raf) throws IOException- Throws:
IOException
-
-