Package ucar.unidata.data.radar
Class Level2Record
java.lang.Object
ucar.unidata.data.radar.Level2Record
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
FieldsModifier and TypeFieldDescriptionstatic int
Initialization flag for lookup tablesstatic final int
Value for data not fountstatic final float
High resolution valuestatic final int
High doppler resolution codestatic final float
Low resolution valuestatic final int
Low doppler resolution codestatic final int
Size of the file headerstatic final float
Horizontal beam widthstatic final float
Kilometer to nautical mile conversionstatic final int
Maximum radials in a cutstatic final int
Size of the radar datastatic final int
Size of the record headerstatic final int
Reflectivity moment identifierstatic float[]
Reflectivity look up tablestatic final int
Value for signal below thresholdstatic final int
Value for overlaid signalstatic final int
Sprectrum Width moment identifierstatic final int
Radial Velocity moment identifierstatic float[]
1 km Velocity look up tablestatic float[]
1/2 km Velocity look up table -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
eof()
Get the end-of-file flagfloat
Get the azimuth for the current readint
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 readshort
Get the elevation number for the current readshort
Get the message type for the current readshort
getVCP()
Get the Volume Coverage Pattern (VCP) for this recordvoid
readAngles
(ucar.netcdf.RandomAccessFile din, int record) Read the angles from the fileint
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.
-
Field Details
-
RECORD_HEADER_SIZE
public static final int RECORD_HEADER_SIZESize of the record header- See Also:
-
FILE_HEADER_SIZE
public static final int FILE_HEADER_SIZESize of the file header- See Also:
-
RADAR_DATA_SIZE
public static final int RADAR_DATA_SIZESize of the radar data- See Also:
-
REFLECTIVITY
public static final int REFLECTIVITYReflectivity moment identifier- See Also:
-
VELOCITY
public static final int VELOCITYRadial Velocity moment identifier- See Also:
-
SPECTRUM_WIDTH
public static final int SPECTRUM_WIDTHSprectrum Width moment identifier- See Also:
-
SIGNAL_BELOW_THRESHOLD
public static final int SIGNAL_BELOW_THRESHOLDValue for signal below threshold- See Also:
-
SIGNAL_OVERLAID
public static final int SIGNAL_OVERLAIDValue for overlaid signal- See Also:
-
DATA_NOT_FOUND
public static final int DATA_NOT_FOUNDValue for data not fount- See Also:
-
DOPPLER_RESOLUTION_LOW_CODE
public static final int DOPPLER_RESOLUTION_LOW_CODELow doppler resolution code- See Also:
-
DOPPLER_RESOLUTION_HIGH_CODE
public static final int DOPPLER_RESOLUTION_HIGH_CODEHigh doppler resolution code- See Also:
-
DOPPLER_RESOLUTION_LOW
public static final float DOPPLER_RESOLUTION_LOWLow resolution value- See Also:
-
DOPPLER_RESOLUTION_HIGH
public static final float DOPPLER_RESOLUTION_HIGHHigh resolution value- See Also:
-
MAX_RADIALS_IN_CUT
public static final int MAX_RADIALS_IN_CUTMaximum radials in a cut- See Also:
-
HORIZONTAL_BEAM_WIDTH
public static final float HORIZONTAL_BEAM_WIDTHHorizontal beam width- See Also:
-
KM_PER_NM
public static final float KM_PER_NMKilometer to nautical mile conversion- See Also:
-
data_lut_init_flag
public static int data_lut_init_flagInitialization flag for lookup tables -
Reflectivity_LUT
public static float[] Reflectivity_LUTReflectivity look up table -
Velocity_1km_LUT
public static float[] Velocity_1km_LUT1 km Velocity look up table -
Velocity_hkm_LUT
public static float[] Velocity_hkm_LUT1/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 fromrecord
- 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 fromrecord
- 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 fromrecord
- 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 fromrecord
- 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 idradial
- radial indexbin
- 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 IDradial
- radial indexbin
- bin index- Returns:
- bin data value
-