Class Level2Record

java.lang.Object
ucar.unidata.data.radar.Level2Record

public class Level2Record extends Object
This class reads a specified record a NEXRAD level II file and provides methods to retrieve selected data from it. Will probably change in the future. Adapted with permission from the Java Iras software developed by David Priegnitz at NSSL.
Version:
$Revision: 1.13 $ $Date: 2006/12/01 20:42:38 $
Author:
MetApps Development Team
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int
    Initialization flag for lookup tables
    static final int
    Value for data not fount
    static final float
    High resolution value
    static final int
    High doppler resolution code
    static final float
    Low resolution value
    static final int
    Low doppler resolution code
    static final int
    Size of the file header
    static final float
    Horizontal beam width
    static final float
    Kilometer to nautical mile conversion
    static final int
    Maximum radials in a cut
    static final int
    Size of the radar data
    static final int
    Size of the record header
    static final int
    Reflectivity moment identifier
    static float[]
    Reflectivity look up table
    static final int
    Value for signal below threshold
    static final int
    Value for overlaid signal
    static final int
    Sprectrum Width moment identifier
    static final int
    Radial Velocity moment identifier
    static float[]
    1 km Velocity look up table
    static float[]
    1/2 km Velocity look up table
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor; does nothing
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    eof()
    Get the end-of-file flag
    float
    Get the azimuth for the current read
    int
    getBinData(int moment, int radial, int bin)
    This method returns a bin data element from the specified read level II record.
    int
    getBinNum(int moment)
    This method returns the number of bins defined for the specified moment in a read level II record.
    int
    getBinSize(int moment)
    This method returns the radial bin size (meters) for the specified moment in a read level II record.
    float
    getBinValue(int moment, int radial, int bin)
    This method returns a bin data value from the specified read level II record.
    float
    Get the elevation angle for the current read
    short
    Get the elevation number for the current read
    short
    Get the message type for the current read
    short
    Get the Volume Coverage Pattern (VCP) for this record
    void
    readAngles(ucar.netcdf.RandomAccessFile din, int record)
    Read the angles from the file
    int
    readCut(ucar.netcdf.RandomAccessFile din, int record)
    Method to read a selected cut from a specified level II file.
    void
    readHeader(ucar.netcdf.RandomAccessFile din, int record)
    Method to read a selected header from a specified level II file.
    void
    readRecord(ucar.netcdf.RandomAccessFile din, int record)
    Method to read a selected record from a specified level II file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • RECORD_HEADER_SIZE

      public static final int RECORD_HEADER_SIZE
      Size of the record header
      See Also:
    • FILE_HEADER_SIZE

      public static final int FILE_HEADER_SIZE
      Size of the file header
      See Also:
    • RADAR_DATA_SIZE

      public static final int RADAR_DATA_SIZE
      Size of the radar data
      See Also:
    • REFLECTIVITY

      public static final int REFLECTIVITY
      Reflectivity moment identifier
      See Also:
    • VELOCITY

      public static final int VELOCITY
      Radial Velocity moment identifier
      See Also:
    • SPECTRUM_WIDTH

      public static final int SPECTRUM_WIDTH
      Sprectrum Width moment identifier
      See Also:
    • SIGNAL_BELOW_THRESHOLD

      public static final int SIGNAL_BELOW_THRESHOLD
      Value for signal below threshold
      See Also:
    • SIGNAL_OVERLAID

      public static final int SIGNAL_OVERLAID
      Value for overlaid signal
      See Also:
    • DATA_NOT_FOUND

      public static final int DATA_NOT_FOUND
      Value for data not fount
      See Also:
    • DOPPLER_RESOLUTION_LOW_CODE

      public static final int DOPPLER_RESOLUTION_LOW_CODE
      Low doppler resolution code
      See Also:
    • DOPPLER_RESOLUTION_HIGH_CODE

      public static final int DOPPLER_RESOLUTION_HIGH_CODE
      High doppler resolution code
      See Also:
    • DOPPLER_RESOLUTION_LOW

      public static final float DOPPLER_RESOLUTION_LOW
      Low resolution value
      See Also:
    • DOPPLER_RESOLUTION_HIGH

      public static final float DOPPLER_RESOLUTION_HIGH
      High resolution value
      See Also:
    • MAX_RADIALS_IN_CUT

      public static final int MAX_RADIALS_IN_CUT
      Maximum radials in a cut
      See Also:
    • HORIZONTAL_BEAM_WIDTH

      public static final float HORIZONTAL_BEAM_WIDTH
      Horizontal beam width
      See Also:
    • KM_PER_NM

      public static final float KM_PER_NM
      Kilometer to nautical mile conversion
      See Also:
    • data_lut_init_flag

      public static int data_lut_init_flag
      Initialization flag for lookup tables
    • Reflectivity_LUT

      public static float[] Reflectivity_LUT
      Reflectivity look up table
    • Velocity_1km_LUT

      public static float[] Velocity_1km_LUT
      1 km Velocity look up table
    • Velocity_hkm_LUT

      public static float[] Velocity_hkm_LUT
      1/2 km Velocity look up table
  • Constructor Details

    • Level2Record

      public Level2Record()
      Default constructor; does nothing
  • Method Details

    • readAngles

      public void readAngles(ucar.netcdf.RandomAccessFile din, int record)
      Read the angles from the file
      Parameters:
      din - file to read from
      record - record to read
    • readHeader

      public void readHeader(ucar.netcdf.RandomAccessFile din, int record)
      Method to read a selected header from a specified level II file.
      Parameters:
      din - file to read from
      record - record to read
    • readRecord

      public void readRecord(ucar.netcdf.RandomAccessFile din, int record)
      Method to read a selected record from a specified level II file.
      Parameters:
      din - file to read from
      record - record to read
    • readCut

      public int readCut(ucar.netcdf.RandomAccessFile din, int record)
      Method to read a selected cut from a specified level II file.
      Parameters:
      din - file to read from
      record - record to read
      Returns:
      number of radials in the cut
    • getAzimuth

      public float getAzimuth()
      Get the azimuth for the current read
      Returns:
      azimuth value
    • getElevation

      public float getElevation()
      Get the elevation angle for the current read
      Returns:
      elevation angle
    • getElevationNum

      public short getElevationNum()
      Get the elevation number for the current read
      Returns:
      elevation number
    • getMessageType

      public short getMessageType()
      Get the message type for the current read
      Returns:
      message type
    • getVCP

      public short getVCP()
      Get the Volume Coverage Pattern (VCP) for this record
      Returns:
      volume coverage pattern
    • eof

      public int eof()
      Get the end-of-file flag
      Returns:
      EOF flag
    • getBinSize

      public int getBinSize(int moment)
      This method returns the radial bin size (meters) for the specified moment in a read level II record.
      Parameters:
      moment - moment id
      Returns:
      radial bin size
    • getBinNum

      public int getBinNum(int moment)
      This method returns the number of bins defined for the specified moment in a read level II record.
      Parameters:
      moment - moment id
      Returns:
      number of bins for this moment
    • getBinData

      public int getBinData(int moment, int radial, int bin)
      This method returns a bin data element from the specified read level II record.
      Parameters:
      moment - moment id
      radial - radial index
      bin - bin index
      Returns:
      bin data element
    • getBinValue

      public float getBinValue(int moment, int radial, int bin)
      This method returns a bin data value from the specified read level II record.
      Parameters:
      moment - moment ID
      radial - radial index
      bin - bin index
      Returns:
      bin data value