public class Cinrad2Record extends Object
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.
Modifier and Type | Field and Description |
---|---|
static byte |
BELOW_THRESHOLD |
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 |
SPECTRUM_WIDTH
Sprectrum Width moment identifier
|
static int |
VELOCITY_HI
Radial Velocity moment identifier
|
static int |
VELOCITY_LOW
Radial Velocity moment identifier
|
Constructor and Description |
---|
Cinrad2Record(RandomAccessFile din,
int record) |
Modifier and Type | Method and Description |
---|---|
static int |
bytesToInt(byte[] bytes,
boolean swapBytes) |
static int |
bytesToShort(byte[] bytes,
boolean swapBytes) |
boolean |
checkOk() |
short |
convertunsignedByte2Short(byte b) |
void |
dump(PrintStream out) |
void |
dump2(PrintStream out) |
void |
dumpMessage(PrintStream out,
Date d) |
static Cinrad2Record |
factory(RandomAccessFile din,
int record) |
float |
getAzimuth()
Get the azimuth in degrees
|
static float |
getDatatypeAddOffset(int datatype) |
static String |
getDatatypeName(int datatype) |
static float |
getDatatypeScaleFactor(int datatype) |
static String |
getDatatypeUnits(int datatype) |
Date |
getDate() |
static 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 String |
getMessageTypeName(int code) |
static String |
getRadialStatusName(int code) |
static String |
getVolumeCoveragePatternName(int code) |
void |
readData(RandomAccessFile raf,
int datatype,
Range gateRange,
IndexIterator ii)
Read data from this record.
|
String |
toString()
Instances which have same content are equal.
|
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 byte MISSING_DATA
public static final byte BELOW_THRESHOLD
public byte message_type
public Cinrad2Record(RandomAccessFile din, int record) throws IOException
IOException
public static String getDatatypeName(int datatype)
public static String getDatatypeUnits(int datatype)
public static float getDatatypeScaleFactor(int datatype)
public static float getDatatypeAddOffset(int datatype)
public static String getMessageTypeName(int code)
public static String getRadialStatusName(int code)
public static String getVolumeCoveragePatternName(int code)
public static Date getDate(int julianDays, int msecs)
public static Cinrad2Record factory(RandomAccessFile din, int record) throws IOException
IOException
public short convertunsignedByte2Short(byte b)
public static int bytesToInt(byte[] bytes, boolean swapBytes)
public static int bytesToShort(byte[] bytes, boolean swapBytes)
public void dumpMessage(PrintStream out, Date d)
public void dump(PrintStream out)
public void dump2(PrintStream out)
public boolean checkOk()
public float getAzimuth()
public float getElevation()
public int getGateSize(int datatype)
public int getGateStart(int datatype)
public int getGateCount(int datatype)
public Date getDate()
public void readData(RandomAccessFile raf, int datatype, Range gateRange, IndexIterator ii) throws IOException
raf
- read from this filedatatype
- which data type we wantgateRange
- handles the possible subset of data to returnii
- put the data hereIOException
public String toString()
Copyright © 1999–2016 UCAR/Unidata. All rights reserved.