public class GempakGridReader extends GempakFileReader
GempakFileReader.DMFileHeaderInfo, GempakFileReader.DMHeaders, GempakFileReader.DMKeys, GempakFileReader.DMParam, GempakFileReader.DMPart, GempakFileReader.Key, GempakFileReader.PackingInfo, GempakFileReader.RData
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ANLB
Grid analysis block identifier
|
static java.lang.String |
GRID
Grid identifier
|
static java.lang.String |
NAVB
Grid nav block identifier
|
boolean |
useDP
flag for using DP_UGRB or not
|
dmLabel, fileHeaderInfo, fileSize, headers, keys, MTMACH, mvmst, needToSwap, parts, rf
COL, IMISSD, LLGDHD, LLNANL, LLNNAV, LLSTHL, MBLKSZ, MDCHAR, MDGDEC, MDGDIF, MDGGRB, MDGNMC, MDGNON, MDGRB2, MDGRID, MDINTG, MDREAL, MDRPCK, MFGD, MFSF, MFSN, MTALPH, MTAPOL, MTHP, MTIBM, MTIGPH, MTIRIS, MTLNUX, MTSUN, MTULTX, MTVAX, RDIFFD, RMISSD, ROW
Modifier and Type | Method and Description |
---|---|
float[] |
DM_RPKG(int isword,
int nword,
int decimalScale)
Unpack a packed grid
|
GempakGridRecord |
findGrid(java.lang.String parm)
Find the first grid with this name
|
int |
getGridCount()
Get the grid count
|
GridIndex |
getGridIndex()
Get the grid index
|
java.util.List<GridRecord> |
getGridList()
Get list of grids
|
int |
getGridPackingType(int gridNumber)
Get the grid packing type
|
static GempakGridReader |
getInstance(RandomAccessFile raf,
boolean fullCheck)
Initialize the file, read in all the metadata (ala DM_OPEN)
|
protected boolean |
init(boolean fullCheck)
Initialize this reader.
|
static void |
main(java.lang.String[] args)
Run the program
|
void |
printAnalBlock()
Print out the analysis block so it looks something like this:
|
void |
printGrids()
Print out the grids.
|
void |
printNavBlock()
Print out the navigation block so it looks something like this:
|
float[] |
readGrid(GridRecord gr)
Read the data
|
void |
showGridInfo(boolean printGrids)
List out the grid information (aka GDINFO)
|
DM_RDTR, DM_RDTR, DM_RFLT, DM_RFLT, DM_RFLT, DM_RINT, DM_RINT, DM_RINT, DM_RSTR, DM_RSTR, DM_UNPK, findFileHeader, findKey, getBits, getByteOrder, getByteOrder, getDataPointer, getErrorMessage, getFile, getFileHeader, getFilename, getInitFileSize, getOffset, getPart, getPartNumber, init, init, logError, printFileLabel, printHeaders, printKeys, printParts, readFileHeaderInfo, readHeaders, readKeys, readParts
public static final java.lang.String GRID
public static final java.lang.String ANLB
public static final java.lang.String NAVB
public boolean useDP
public static GempakGridReader getInstance(RandomAccessFile raf, boolean fullCheck) throws java.io.IOException
raf
- RandomAccessFile to read.fullCheck
- if true, check entire structurejava.io.IOException
- problem reading fileprotected boolean init(boolean fullCheck) throws java.io.IOException
init
in class GempakFileReader
fullCheck
- check to make sure there are grids we can handlejava.io.IOException
- problem reading the datapublic static void main(java.lang.String[] args) throws java.io.IOException
args
- [0] filename (required),
[1] variable name (X for default),
[2] X to not list gridsjava.io.IOException
- problem reading the filepublic GridIndex getGridIndex()
public int getGridCount()
public int getGridPackingType(int gridNumber) throws java.io.IOException
gridNumber
- grid numberjava.io.IOException
- problem reading filepublic GempakGridRecord findGrid(java.lang.String parm)
parm
- name of gridpublic float[] readGrid(GridRecord gr) throws java.io.IOException
gr
- grid recordjava.io.IOException
- problem reading filepublic float[] DM_RPKG(int isword, int nword, int decimalScale) throws java.io.IOException
DM_RPKG
in class GempakFileReader
isword
- starting word (1 based)nword
- number of words to readdecimalScale
- decimal scalejava.io.IOException
- problem reading datapublic void printNavBlock()
GRID NAVIGATION: PROJECTION: LCC ANGLES: 25.0 -95.0 25.0 GRID SIZE: 93 65 LL CORNER: 12.19 -133.46 UR CORNER: 57.29 -49.38
public void printAnalBlock()
public java.util.List<GridRecord> getGridList()
public void printGrids()
public void showGridInfo(boolean printGrids)
printGrids
- print each grid record