Class GradsDataDescriptorFile


  • public class GradsDataDescriptorFile
    extends Object
    Class to hold information from a GrADS Data Descriptor File
    See Also:
    "http://www.iges.org/grads/gadoc/descriptorfile.html"
    • Constructor Detail

      • GradsDataDescriptorFile

        public GradsDataDescriptorFile​(String filename,
                                       int maxLines)
                                throws IOException
        Create a GradsDataDescriptorFile from the file
        Parameters:
        filename - the name of the file
        Throws:
        IOException - problem reading/parsing the file
    • Method Detail

      • getDimensions

        public List<GradsDimension> getDimensions()
        Get the dimensions
        Returns:
        the dimensions
      • getVariables

        public List<GradsVariable> getVariables()
        Get the variables
        Returns:
        the variables
      • getAttributes

        public List<GradsAttribute> getAttributes()
        Get the attributes
        Returns:
        the attributes
      • getEnsembleDimension

        public GradsEnsembleDimension getEnsembleDimension()
        Get the ensemble dimension
        Returns:
        the ensemble dimension
      • getTimeDimension

        public GradsTimeDimension getTimeDimension()
        Get the time dimension
        Returns:
        the time dimension
      • getZDimension

        public GradsDimension getZDimension()
        Get the Z dimension
        Returns:
        the Z dimension
      • getYDimension

        public GradsDimension getYDimension()
        Get the Y dimension
        Returns:
        the Y dimension
      • getXDimension

        public GradsDimension getXDimension()
        Get the X dimension
        Returns:
        the X dimension
      • getDataFile

        public String getDataFile()
        Get the data file path
        Returns:
        the data file path
      • getDataDescriptorFile

        public String getDataDescriptorFile()
        Get the data descriptor file path
        Returns:
        the data descriptor file path
      • getMissingValue

        public double getMissingValue()
        Get the missing value
        Returns:
        the missing value
      • getGridsPerTimeStep

        public int getGridsPerTimeStep()
        Get the number of grids per timestep
        Returns:
        the number of grids per timestep
      • getTimeStepsPerFile

        public int[] getTimeStepsPerFile​(String filename)
        Get the number of timesteps per file and the starting offset
        Parameters:
        filename - the filename to check
        Returns:
        the starting index and number of times in that file
      • isTemplate

        public boolean isTemplate()
        Get whether this is using a template or not
        Returns:
        whether this is using a template or not
      • getTemplateType

        public int getTemplateType()
        Get the type of template this is
        Returns:
        the type of template
      • hasProjection

        public boolean hasProjection()
        Get whether this is using a projection or no
        Returns:
        whether this is using a projection or not
      • isSequential

        public boolean isSequential()
        Get whether this is a sequentially written file
        Returns:
        true if this is sequential
      • isYReversed

        public boolean isYReversed()
        Get whether y axis is reversed or not
        Returns:
        whether y axis is reversed or not
      • getXYHeaderBytes

        public int getXYHeaderBytes()
        Get the number of xy header bytes
        Returns:
        the number of xy header bytes
      • getFileHeaderBytes

        public int getFileHeaderBytes()
        Get the number of file header bytes
        Returns:
        the number of file header bytes
      • getTimeHeaderBytes

        public int getTimeHeaderBytes()
        Get the number of time header bytes
        Returns:
        the number of time header bytes
      • getTimeTrailerBytes

        public int getTimeTrailerBytes()
        Get the number of time trailer bytes
        Returns:
        the number of time trailer bytes
      • isBigEndian

        public boolean isBigEndian()
        Is this a big endian file
        Returns:
        true if big endian
      • getTitle

        public String getTitle()
        Get the title
        Returns:
        the title
      • getDataType

        public String getDataType()
        Get the data type. Only support raw binary
        Returns:
        type or null
      • toString

        public String toString()
        Return a String representation of this object
        Overrides:
        toString in class Object
        Returns:
        a String representation of this object
      • getFileName

        public String getFileName​(int eIndex,
                                  int tIndex)
        Get the file name for the particular time and ensemble index
        Parameters:
        eIndex - ensemble index
        tIndex - time index
        Returns:
        the appropriate filename