Class RecordDatasetHelper


  • public class RecordDatasetHelper
    extends Object
    Helper class for using the netcdf-3 record dimension.
    Since:
    Feb 29, 2008
    • Field Detail

      • obsTimeVName

        protected String obsTimeVName
      • nomTimeVName

        protected String nomTimeVName
      • latVName

        protected String latVName
      • lonVName

        protected String lonVName
      • zcoordVName

        protected String zcoordVName
      • zcoordUnits

        protected String zcoordUnits
      • stnIdVName

        protected String stnIdVName
      • stnIndexVName

        protected String stnIndexVName
      • stnDescVName

        protected String stnDescVName
      • stationIdType

        protected DataType stationIdType
      • minDate

        protected double minDate
      • maxDate

        protected double maxDate
      • altScaleFactor

        protected double altScaleFactor
    • Constructor Detail

      • RecordDatasetHelper

        public RecordDatasetHelper​(NetcdfDataset ncfile,
                                   String obsTimeVName,
                                   String nomTimeVName,
                                   List<VariableSimpleIF> typedDataVariables,
                                   String recDimName,
                                   Formatter errBuffer)
        Constructor.
        Parameters:
        ncfile - the netccdf file
        typedDataVariables - list of data variables; all record variables will be added to this list, except . You can remove extra
        obsTimeVName - observation time variable name (required)
        nomTimeVName - nominal time variable name (may be null)
        Throws:
        IllegalArgumentException - if ncfile has no unlimited dimension and recDimName is null.
    • Method Detail

      • setStationInfo

        public void setStationInfo​(String stnIdVName,
                                   String stnDescVName,
                                   String stnIndexVName,
                                   StationHelper stationHelper)
        Set extra information used by station obs datasets. Use stnIdVName or stnIndexVName.
        Parameters:
        stnIdVName - the obs variable that is used to find the station in the stnHash; may be type int or a String (char).
        stnDescVName - optional station var containing station description
      • setLocationInfo

        public void setLocationInfo​(String latVName,
                                    String lonVName,
                                    String zcoordVName)
      • getMetersConversionFactor

        protected static double getMetersConversionFactor​(String unitsString)
                                                   throws Exception
        Throws:
        Exception
      • getRecordVar

        public Structure getRecordVar()
      • getRecordCount

        public int getRecordCount()
      • getLatitude

        public double getLatitude​(StructureData sdata)
      • getLongitude

        public double getLongitude​(StructureData sdata)
      • getZcoordinate

        public double getZcoordinate​(StructureData sdata)
      • getZcoordUnits

        public String getZcoordUnits()
      • getObservationTime

        public double getObservationTime​(StructureData sdata)