|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.nc2.iosp.nexrad2.Level2Record
public class Level2Record
This class reads one record (radial) in an NEXRAD level II file. File must be uncompressed. Not handling messages yet, only data.
10/16/05: Now returns data as a byte, so use scale and offset. Adapted with permission from the Java Iras software developed by David Priegnitz at NSSL.
| Field Summary | |
|---|---|
static byte |
BELOW_THRESHOLD
|
static int |
CORRELATION_COEFFICIENT
High Resolution Sprectrum Width moment identifier |
static int |
DIFF_PHASE
High Resolution Radial Velocity moment identifier |
static int |
DIFF_REFLECTIVITY_HIGH
High Resolution Radial Velocity moment identifier |
static int |
DOPPLER_RESOLUTION_HIGH_CODE
High doppler resolution code |
static int |
DOPPLER_RESOLUTION_LOW_CODE
Low doppler resolution code |
static float |
HORIZONTAL_BEAM_WIDTH
Horizontal beam width |
byte |
message_type
|
static byte |
MISSING_DATA
Initialization flag for lookup tables public static int data_lut_init_flag = 0; /** Reflectivity look up table public static float[] Reflectivity_LUT = new float[256]; /** 1 km Velocity look up table public static float[] Velocity_1km_LUT = new float[256]; /** 1/2 km Velocity look up table public static float[] Velocity_hkm_LUT = new float[256]; static { Reflectivity_LUT[0] = 0.0f; // Float.NaN; //(float) SIGNAL_BELOW_THRESHOLD; Reflectivity_LUT[1] = Float.NaN; //(float) SIGNAL_OVERLAID; Velocity_1km_LUT[0] = 0.0f; // Float.NaN; //(float) SIGNAL_BELOW_THRESHOLD; Velocity_1km_LUT[1] = Float.NaN; //(float) SIGNAL_OVERLAID; Velocity_hkm_LUT[0] = 0.0f; // Float.NaN; //(float) SIGNAL_BELOW_THRESHOLD; Velocity_hkm_LUT[1] = Float.NaN; //(float) SIGNAL_OVERLAID; for (int i = 2; i < 256; i++) { Reflectivity_LUT[i] = (float) (i / 2.0 - 33.0); Velocity_1km_LUT[i] = (float) (i - 129.0); Velocity_hkm_LUT[i] = (float) (i / 2.0 - 64.5); // also spectrum width } } |
static int |
REFLECTIVITY
Reflectivity moment identifier |
static int |
REFLECTIVITY_HIGH
|
static int |
SPECTRUM_WIDTH
Sprectrum Width moment identifier |
static int |
SPECTRUM_WIDTH_HIGH
High Resolution Sprectrum Width moment identifier |
static int |
VELOCITY_HI
Radial Velocity moment identifier |
static int |
VELOCITY_HIGH
High Resolution Radial Velocity moment identifier |
static int |
VELOCITY_LOW
Radial Velocity moment identifier |
| Constructor Summary | |
|---|---|
Level2Record(RandomAccessFile din,
int record,
long message_offset31)
|
|
| Method Summary | |
|---|---|
boolean |
checkOk()
|
void |
dump(java.io.PrintStream out)
|
void |
dump2(java.io.PrintStream out)
|
void |
dumpMessage(java.io.PrintStream out)
|
static Level2Record |
factory(RandomAccessFile din,
int record,
long message_offset31)
|
float |
getAzimuth()
Get the azimuth in degrees |
float |
getDatatypeAddOffset(int datatype)
|
static java.lang.String |
getDatatypeName(int datatype)
|
short |
getDatatypeRangeFoldingThreshhold(int datatype)
|
float |
getDatatypeScaleFactor(int datatype)
|
short |
getDatatypeSNRThreshhold(int datatype)
|
static java.lang.String |
getDatatypeUnits(int datatype)
|
java.util.Date |
getDate()
|
static java.util.Date |
getDate(int julianDays,
int msecs)
|
float |
getElevation()
Get the elevation angle in degrees |
int |
getGateCount(int datatype)
This method returns the number of gates |
int |
getGateSize(int datatype)
This method returns the gate size in meters |
int |
getGateStart(int datatype)
This method returns the starting gate in meters |
static java.lang.String |
getMessageTypeName(int code)
|
static java.lang.String |
getRadialStatusName(int code)
|
static java.lang.String |
getVolumeCoveragePatternName(int code)
|
void |
readData(RandomAccessFile raf,
int datatype,
Range gateRange,
IndexIterator ii)
Read data from this record. |
java.lang.String |
toString()
Instances which have same content are equal. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int REFLECTIVITY
public static final int VELOCITY_HI
public static final int VELOCITY_LOW
public static final int SPECTRUM_WIDTH
public static final int DOPPLER_RESOLUTION_LOW_CODE
public static final int DOPPLER_RESOLUTION_HIGH_CODE
public static final float HORIZONTAL_BEAM_WIDTH
public static final int REFLECTIVITY_HIGH
public static final int VELOCITY_HIGH
public static final int SPECTRUM_WIDTH_HIGH
public static final int DIFF_REFLECTIVITY_HIGH
public static final int DIFF_PHASE
public static final int CORRELATION_COEFFICIENT
public static final byte MISSING_DATA
public static final byte BELOW_THRESHOLD
public byte message_type
| Constructor Detail |
|---|
public Level2Record(RandomAccessFile din,
int record,
long message_offset31)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public static java.lang.String getDatatypeName(int datatype)
public static java.lang.String getDatatypeUnits(int datatype)
public short getDatatypeSNRThreshhold(int datatype)
public short getDatatypeRangeFoldingThreshhold(int datatype)
public float getDatatypeScaleFactor(int datatype)
public float getDatatypeAddOffset(int datatype)
public static java.lang.String getMessageTypeName(int code)
public static java.lang.String getRadialStatusName(int code)
public static java.lang.String getVolumeCoveragePatternName(int code)
public static java.util.Date getDate(int julianDays,
int msecs)
public static Level2Record factory(RandomAccessFile din,
int record,
long message_offset31)
throws java.io.IOException
java.io.IOExceptionpublic void dumpMessage(java.io.PrintStream out)
public void dump(java.io.PrintStream out)
public void dump2(java.io.PrintStream out)
public boolean checkOk()
public float getAzimuth()
public float getElevation()
public int getGateSize(int datatype)
datatype - which type of data : REFLECTIVITY, VELOCITY_HI, VELOCITY_LO, SPECTRUM_WIDTH
public int getGateStart(int datatype)
datatype - which type of data : REFLECTIVITY, VELOCITY_HI, VELOCITY_LO, SPECTRUM_WIDTH
public int getGateCount(int datatype)
datatype - which type of data : REFLECTIVITY, VELOCITY_HI, VELOCITY_LO, SPECTRUM_WIDTH
public java.util.Date getDate()
public void readData(RandomAccessFile raf,
int datatype,
Range gateRange,
IndexIterator ii)
throws java.io.IOException
raf - read from this filedatatype - which type of data : REFLECTIVITY, VELOCITY_HI, VELOCITY_LO, SPECTRUM_WIDTHgateRange - handles the possible subset of data to returnii - put the data here
java.io.IOException - on read errorpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||