public class GradsDataDescriptorFile extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
GradsDataDescriptorFile.Chsub
Class to handle the CHSUB parameters
|
Modifier and Type | Field and Description |
---|---|
static String |
DSET
DSET identifier
|
static String |
DTYPE
DTYPE identifier
|
static String |
EDEF
EDEF identifier
|
static String |
ENDEDEF
ENDEDEF identifier
|
static String |
ENDVARS
ENDVARS identifier
|
static int |
ENS_TEMPLATE
Ensemble template type
|
static int |
ENS_TIME_TEMPLATE
Ensemble and time template type
|
static String |
FILEHEADER
FILEHEADER identifier
|
static String |
HEADERBYTES
HEADERBYTES identifier
|
static String |
INDEX
INDEX identifier
|
static int |
NO_TEMPLATE
NO template type
|
static String |
OPTIONS
OPTIONS identifier
|
static String |
PDEF
EDEF identifier
|
static String |
TDEF
TDEF identifier
|
static String |
THEADER
THEADER identifier
|
static int |
TIME_TEMPLATE
time template type
|
static String |
TITLE
TITLE identifier
|
static String |
TRAILERBYTES
TRAILERBYTES identifier
|
static String |
UNDEF
UNDEF identifier
|
static String |
UNPACK
UNPACK identifier
|
static String |
VARS
VARS identifier
|
static String |
XDEF
XDEF identifier
|
static String |
XYHEADER
XYHEADER identifier
|
static String |
YDEF
YDEF identifier
|
static String |
ZDEF
ZDEF identifier
|
Constructor and Description |
---|
GradsDataDescriptorFile(String filename,
int maxLines)
Create a GradsDataDescriptorFile from the file
|
Modifier and Type | Method and Description |
---|---|
static boolean |
failFast(RandomAccessFile raf) |
List<GradsAttribute> |
getAttributes()
Get the attributes
|
String |
getDataDescriptorFile()
Get the data descriptor file path
|
String |
getDataFile()
Get the data file path
|
String |
getDataType()
Get the data type.
|
List<GradsDimension> |
getDimensions()
Get the dimensions
|
GradsEnsembleDimension |
getEnsembleDimension()
Get the ensemble dimension
|
int |
getFileHeaderBytes()
Get the number of file header bytes
|
String |
getFileName(int eIndex,
int tIndex)
Get the file name for the particular time and ensemble index
|
int |
getGridsPerTimeStep()
Get the number of grids per timestep
|
double |
getMissingValue()
Get the missing value
|
int |
getTemplateType()
Get the type of template this is
|
GradsTimeDimension |
getTimeDimension()
Get the time dimension
|
int |
getTimeHeaderBytes()
Get the number of time header bytes
|
int[] |
getTimeStepsPerFile(String filename)
Get the number of timesteps per file and the starting offset
|
int |
getTimeTrailerBytes()
Get the number of time trailer bytes
|
String |
getTitle()
Get the title
|
List<GradsVariable> |
getVariables()
Get the variables
|
GradsDimension |
getXDimension()
Get the X dimension
|
int |
getXYHeaderBytes()
Get the number of xy header bytes
|
GradsDimension |
getYDimension()
Get the Y dimension
|
GradsDimension |
getZDimension()
Get the Z dimension
|
boolean |
hasProjection()
Get whether this is using a projection or no
|
boolean |
isBigEndian()
Is this a big endian file
|
boolean |
isSequential()
Get whether this is a sequentially written file
|
boolean |
isTemplate()
Get whether this is using a template or not
|
boolean |
isYReversed()
Get whether y axis is reversed or not
|
String |
toString()
Return a String representation of this object
|
public static final String DSET
public static final String DTYPE
public static final String INDEX
public static final String TITLE
public static final String UNDEF
public static final String UNPACK
public static final String FILEHEADER
public static final String XYHEADER
public static final String THEADER
public static final String HEADERBYTES
public static final String TRAILERBYTES
public static final String OPTIONS
public static final String XDEF
public static final String YDEF
public static final String ZDEF
public static final String TDEF
public static final String EDEF
public static final String PDEF
public static final String ENDEDEF
public static final String VARS
public static final String ENDVARS
public static final int NO_TEMPLATE
public static final int TIME_TEMPLATE
public static final int ENS_TEMPLATE
public static final int ENS_TIME_TEMPLATE
public GradsDataDescriptorFile(String filename, int maxLines) throws IOException
filename
- the name of the fileIOException
- problem reading/parsing the filepublic static boolean failFast(RandomAccessFile raf) throws IOException
IOException
public List<GradsDimension> getDimensions()
public List<GradsVariable> getVariables()
public List<GradsAttribute> getAttributes()
public GradsEnsembleDimension getEnsembleDimension()
public GradsTimeDimension getTimeDimension()
public GradsDimension getZDimension()
public GradsDimension getYDimension()
public GradsDimension getXDimension()
public String getDataFile()
public String getDataDescriptorFile()
public double getMissingValue()
public int getGridsPerTimeStep()
public int[] getTimeStepsPerFile(String filename)
filename
- the filename to checkpublic boolean isTemplate()
public int getTemplateType()
public boolean hasProjection()
public boolean isSequential()
public boolean isYReversed()
public int getXYHeaderBytes()
public int getFileHeaderBytes()
public int getTimeHeaderBytes()
public int getTimeTrailerBytes()
public boolean isBigEndian()
public String getTitle()
public String getDataType()
public String toString()
public String getFileName(int eIndex, int tIndex)
eIndex
- ensemble indextIndex
- time indexCopyright © 1999–2015 UCAR/Unidata. All rights reserved.