public class GradsDataDescriptorFile
extends java.lang.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 java.lang.String |
DSET
DSET identifier
|
static java.lang.String |
DTYPE
DTYPE identifier
|
static java.lang.String |
EDEF
EDEF identifier
|
static java.lang.String |
ENDEDEF
ENDEDEF identifier
|
static java.lang.String |
ENDVARS
ENDVARS identifier
|
static int |
ENS_TEMPLATE
Ensemble template type
|
static int |
ENS_TIME_TEMPLATE
Ensemble and time template type
|
static java.lang.String |
FILEHEADER
FILEHEADER identifier
|
static java.lang.String |
HEADERBYTES
HEADERBYTES identifier
|
static java.lang.String |
INDEX
INDEX identifier
|
static int |
NO_TEMPLATE
NO template type
|
static java.lang.String |
OPTIONS
OPTIONS identifier
|
static java.lang.String |
PDEF
EDEF identifier
|
static java.lang.String |
TDEF
TDEF identifier
|
static java.lang.String |
THEADER
THEADER identifier
|
static int |
TIME_TEMPLATE
time template type
|
static java.lang.String |
TITLE
TITLE identifier
|
static java.lang.String |
TRAILERBYTES
TRAILERBYTES identifier
|
static java.lang.String |
UNDEF
UNDEF identifier
|
static java.lang.String |
UNPACK
UNPACK identifier
|
static java.lang.String |
VARS
VARS identifier
|
static java.lang.String |
XDEF
XDEF identifier
|
static java.lang.String |
XYHEADER
XYHEADER identifier
|
static java.lang.String |
YDEF
YDEF identifier
|
static java.lang.String |
ZDEF
ZDEF identifier
|
Constructor and Description |
---|
GradsDataDescriptorFile(java.lang.String filename,
int maxLines)
Create a GradsDataDescriptorFile from the file
|
Modifier and Type | Method and Description |
---|---|
static boolean |
failFast(RandomAccessFile raf) |
java.util.List<GradsAttribute> |
getAttributes()
Get the attributes
|
java.lang.String |
getDataDescriptorFile()
Get the data descriptor file path
|
java.lang.String |
getDataFile()
Get the data file path
|
java.lang.String |
getDataType()
Get the data type.
|
java.util.List<GradsDimension> |
getDimensions()
Get the dimensions
|
GradsEnsembleDimension |
getEnsembleDimension()
Get the ensemble dimension
|
int |
getFileHeaderBytes()
Get the number of file header bytes
|
java.lang.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(java.lang.String filename)
Get the number of timesteps per file and the starting offset
|
int |
getTimeTrailerBytes()
Get the number of time trailer bytes
|
java.lang.String |
getTitle()
Get the title
|
java.util.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
|
java.lang.String |
toString()
Return a String representation of this object
|
public static final java.lang.String DSET
public static final java.lang.String DTYPE
public static final java.lang.String INDEX
public static final java.lang.String TITLE
public static final java.lang.String UNDEF
public static final java.lang.String UNPACK
public static final java.lang.String FILEHEADER
public static final java.lang.String XYHEADER
public static final java.lang.String THEADER
public static final java.lang.String HEADERBYTES
public static final java.lang.String TRAILERBYTES
public static final java.lang.String OPTIONS
public static final java.lang.String XDEF
public static final java.lang.String YDEF
public static final java.lang.String ZDEF
public static final java.lang.String TDEF
public static final java.lang.String EDEF
public static final java.lang.String PDEF
public static final java.lang.String ENDEDEF
public static final java.lang.String VARS
public static final java.lang.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(java.lang.String filename, int maxLines) throws java.io.IOException
filename
- the name of the filejava.io.IOException
- problem reading/parsing the filepublic static boolean failFast(RandomAccessFile raf) throws java.io.IOException
java.io.IOException
public java.util.List<GradsDimension> getDimensions()
public java.util.List<GradsVariable> getVariables()
public java.util.List<GradsAttribute> getAttributes()
public GradsEnsembleDimension getEnsembleDimension()
public GradsTimeDimension getTimeDimension()
public GradsDimension getZDimension()
public GradsDimension getYDimension()
public GradsDimension getXDimension()
public java.lang.String getDataFile()
public java.lang.String getDataDescriptorFile()
public double getMissingValue()
public int getGridsPerTimeStep()
public int[] getTimeStepsPerFile(java.lang.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 java.lang.String getTitle()
public java.lang.String getDataType()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getFileName(int eIndex, int tIndex)
eIndex
- ensemble indextIndex
- time index