|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.agmodel.physical.GeneralSequenceImpl
|
+--net.agmodel.weatherData.GeneralMetSequenceImpl
|
+--net.agmodel.weatherData.WindImpl
Stores a sequence of wind readings including speed and/or direction. Wind speeds are stored internally in m/s.
| Field Summary |
| Fields inherited from class net.agmodel.weatherData.GeneralMetSequenceImpl |
rb |
| Fields inherited from class net.agmodel.physical.GeneralSequenceImpl |
dateRange, maximumTemporalInterpolation, summaryHistory |
| Constructor Summary | |
WindImpl(Interval dateRange,
SummaryHistory composition,
double height,
String heightUnits)
Creates a wind sequence which can store speed and/or direction. |
|
| Method Summary | |
WindImpl |
average(Duration newResolution)
Creates a new wind sequence, averaging wind to a lower resolution. |
Object |
clone()
|
JigsawQuantity |
getAverageSpeed(Interval interval)
Returns the average wind speed over the interval. |
String |
getColumnHeading()
Returned a localized label for the Sequence |
String |
getContentsAsString(Date time,
String delimiter)
Returns the measurement associated with a particular time as a string. |
float[] |
getCoverage(int index)
Indicates which array elements returned by getData(int) are missing.
|
double[] |
getData(int index)
Creates a one-dimensional array containing one subcomponent of the data. |
String |
getHeightUnits()
Gets the units for the wind measurement height. |
JigsawQuantity |
getInstantDirection(Date time)
Returns the instantaneous wind speed at a particular point in time. |
JigsawQuantity |
getInstantSpeed(Date time)
Returns the instantaneous wind speed at a particular point in time. |
JigsawQuantity |
getMaxSpeed(Interval interval)
Returns the maximum wind speed over the interval. |
double |
getMeasurementHeight()
Gets the height of the wind measurement |
JigsawQuantity |
getMinSpeed(Interval interval)
Returns the minimum wind speed over the interval. |
int |
getNumberOfSubComponents()
Get the number of sub-components in the sequence. |
float[] |
getRose(Interval interval,
int divisions)
Returns the distribution of wind directions as an array. |
String |
getSubHeading(int index)
Returns windspeed as element 0, if available |
String |
getUnitsHeading(int index)
Gets a string representation of the measurement units of the column. |
JigsawQuantity |
getWindRun(Interval interval)
Returns the total windrun over the interval. |
boolean |
hasDirection()
Returns whether wind direction data are stored in the sequence |
boolean |
hasSpeed()
Returns whether wind speed data are stored in the sequence |
static float |
NSEWtoDegrees(String octString)
Converts a string of the form "N" (North) or "NW" (NorthWest) or "WNW" (West Northwest) into the corresponding bearing in degrees. |
void |
putDirectionOverInterval(Interval interval,
float value)
Records the wind direction over some subinterval. |
void |
putDirectionOverInterval(Interval interval,
String value)
Records the wind direction over some subinterval. |
void |
putInstantDirection(Date time,
float value)
Records the instantaneous wind direction. |
void |
putInstantDirection(Date time,
String value)
Records the instantaneous wind direction. |
void |
putInstantSpeed(Date time,
float value)
Records the instantaneous wind speed at a particular time |
void |
putSpeedOverInterval(Interval interval,
float value)
Records the average wind speed over some subinterval. |
void |
putWindRun(Interval interval,
float valuekm)
Records the wind run over some subinterval. |
protected void |
setDirectionStore(Store newDir)
|
protected void |
setSpeedStore(Store newSpeed)
|
void |
setSubHeading(int index,
String aHeading)
Does nothing |
void |
setUnitsHeading(int index,
String aHeading)
Does nothing |
MetSequence |
summarize(Duration longerResolution)
Creates a lower resolution sequence which summarizes this sequence |
| Methods inherited from class net.agmodel.weatherData.GeneralMetSequenceImpl |
getName, getSequenceElement, getSequenceHeading, setColumnHeading, setName, setSequenceHeading |
| Methods inherited from class net.agmodel.physical.GeneralSequenceImpl |
cancelTemporalInterpolation, dumpSequence, getAllCoverage, getAllData, getCurrentResolution, getDateRange, getMaximumTemporalInterpolation, getResolution, getSubHeading, getSummaryHistory, getSummaryKind, getTemporalInterpolation, getUnitsHeading, setTemporalInterpolation |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.agmodel.weatherData.MetSequence |
getSequenceElement |
| Methods inherited from interface net.agmodel.physical.CompoundSequence |
cancelTemporalInterpolation, getAllCoverage, getAllData, getMaximumTemporalInterpolation, getTemporalInterpolation, setSequenceHeading, setTemporalInterpolation |
| Methods inherited from interface net.agmodel.physical.Sequence |
dumpSequence, getCurrentResolution, getDateRange, getName, getResolution, getSequenceHeading, getSubHeading, getSummaryKind, getUnitsHeading, setColumnHeading, setName |
| Constructor Detail |
public WindImpl(Interval dateRange,
SummaryHistory composition,
double height,
String heightUnits)
dateRange - the interval over which wind speeds can be storedcomposition - a record of how raw wind data has been summarised to make the sequence.| Method Detail |
public static float NSEWtoDegrees(String octString)
octString -
IllegalArgumentException - if the string cannot be recognized as a valid direction.protected void setSpeedStore(Store newSpeed)
protected void setDirectionStore(Store newDir)
public boolean hasSpeed()
Wind
hasSpeed in interface Windpublic boolean hasDirection()
Wind
hasDirection in interface Windpublic double getMeasurementHeight()
Wind
getMeasurementHeight in interface WindWind.getHeightUnits()public String getHeightUnits()
Wind
getHeightUnits in interface Wind
public void putInstantSpeed(Date time,
float value)
time - the point in timevalue - the wind speed at that time
IllegalArgumentException - if the time is outside the interval that the period is intended to store
public void putSpeedOverInterval(Interval interval,
float value)
interval - the period of time over which the measurement was taken.value - the average wind speed over that interval
IllegalArgumentException - if the subinterval is outside the interval that the sequence was constructed to store
public void putWindRun(Interval interval,
float valuekm)
interval - the period of time over which the measurement was taken.valuekm - the wind run in km over that interval
IllegalArgumentException - if the subinterval is outside the interval that the sequence was constructed to storepublic JigsawQuantity getMinSpeed(Interval interval)
Wind
getMinSpeed in interface Windpublic JigsawQuantity getMaxSpeed(Interval interval)
Wind
getMaxSpeed in interface Windpublic JigsawQuantity getInstantSpeed(Date time)
Wind
getInstantSpeed in interface Windpublic JigsawQuantity getAverageSpeed(Interval interval)
Wind
getAverageSpeed in interface Windpublic JigsawQuantity getWindRun(Interval interval)
Wind
getWindRun in interface Wind
public void putInstantDirection(Date time,
String value)
time - the that the direction was measured.value - the wind direction at that time represented as a string using NSEW or the corresponding kanji.
IllegalArgumentException - if the subinterval is outside the interval that the sequence was constructed to store, or the direction string is wrong.
public void putDirectionOverInterval(Interval interval,
String value)
interval - the period of time over which the measurement was taken.value - the average wind speed over that interval represented as a string using NSEW or the corresponding kanji.
IllegalArgumentException - if the subinterval is outside the interval that the sequence was constructed to store, or the direction string is wrong.
public void putInstantDirection(Date time,
float value)
time - the that the direction was measured.value - the wind direction at that time.
IllegalArgumentException - if the subinterval is outside the interval that the sequence was constructed to store
public void putDirectionOverInterval(Interval interval,
float value)
interval - the period of time over which the measurement was taken.value - the average wind speed over that interval
IllegalArgumentException - if the subinterval is outside the interval that the sequence was constructed to store
public float[] getRose(Interval interval,
int divisions)
Wind
getRose in interface Windinterval - the period of interest.divisions - the number of classes in the resulting array
public JigsawQuantity getInstantDirection(Date time)
Wind
getInstantDirection in interface Windpublic String getColumnHeading()
Sequence
getColumnHeading in interface SequencegetColumnHeading in class GeneralMetSequenceImplpublic int getNumberOfSubComponents()
Sequence
getNumberOfSubComponents in interface SequencegetNumberOfSubComponents in class GeneralMetSequenceImplSequence.getSequenceHeading(String)public String getSubHeading(int index)
getSubHeading in interface CompoundSequencegetSubHeading in class GeneralMetSequenceImplSequence.getNumberOfSubComponents(),
Sequence.getSequenceHeading(String)public String getUnitsHeading(int index)
CompoundSequence
getUnitsHeading in interface CompoundSequencegetUnitsHeading in class GeneralMetSequenceImplSequence.getNumberOfSubComponents(),
Sequence.getSequenceHeading(String),
CompoundSequence.getSubHeading(int)
public void setUnitsHeading(int index,
String aHeading)
setUnitsHeading in interface CompoundSequencesetUnitsHeading in class GeneralMetSequenceImplindex - the zero-based index of the headingaHeading - the new headingSequence.getNumberOfSubComponents(),
CompoundSequence.setSequenceHeading(String),
CompoundSequence.setSubHeading(int,String)
public void setSubHeading(int index,
String aHeading)
setSubHeading in interface CompoundSequencesetSubHeading in class GeneralMetSequenceImplaHeading - the new headingindex - the zero-based index of the headingSequence.getNumberOfSubComponents(),
Sequence.getSequenceHeading(String)
public String getContentsAsString(Date time,
String delimiter)
Sequence
getContentsAsString in interface SequencegetContentsAsString in class GeneralSequenceImpltime - the time of interest.delimiter - a string to use between values if required.public WindImpl average(Duration newResolution)
newResolution - the target resolution required.
public MetSequence summarize(Duration longerResolution)
MetSequence
summarize in interface MetSequencelongerResolution - the new resolution to summarize to
public double[] getData(int index)
CompoundSequenceCompoundSequence.getCoverage(int) to test for missing values
(at present these are returned as Double.NaN but don't rely on this).
getData in interface CompoundSequencegetData in class GeneralSequenceImplindex - the zero-based index of the subcomponent
Sequence.getNumberOfSubComponents()public float[] getCoverage(int index)
CompoundSequenceCompoundSequence.getData(int) are missing.
Coverage values are in the range JigsawQuantity.DEVOID to JigsawQuantity.COMPLETE.
getCoverage in interface CompoundSequencegetCoverage in class GeneralSequenceImplindex - the zero-based index of the subcomponent
public Object clone()
clone in interface Sequenceclone in class GeneralSequenceImpl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||