|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--TMYdata
The TMYdata class defines an object to hold a 1-year TMY (Typical Meteorological Year) data set, and methods to access that data.
Creating an instance of this class does not initialize data. That is done using the readData() method. Different varieties of this can read either stream input or a file. Data can be in TMY format or the SOLMET format. Also, it can be in compressed (.gz) format.
Creating the TMYdata class causes it to register its monitorable elements with the CWmonitoredElements class.
Field Summary | |
static int |
APRIL
Used to specify a month to a method. |
static int |
AUGUST
Used to specify a month to a method. |
static int |
CDD
Identifier specifying the type of query being made of getDegreeDays(). |
static int |
DAILY_AVERAGE
Used to specify data filtering. |
static int |
DAILY_HIGH
Used to specify data filtering. |
static int |
DAILY_LOW
Used to specify data filtering. |
static int |
DAILY_NO_FILTER
Used to specify data filtering. |
static java.lang.String[] |
days
An array of 31 day identifiers corresponding to the day indices used in this object. |
static int |
DECEMBER
Used to specify a month to a method. |
static int |
DEWPOINT
Used to identify a field. |
static int |
DIFFUSE_HORIZONTAL_RADIATION
Used to identify a field. |
static int |
DIRECT_NORMAL_RADIATION
Used to identify a field. |
static int |
DRY_BULB_TEMP
Used to identify a field. |
static int |
FEBRUARY
Used to specify a month to a method. |
static int[] |
field_types
|
static java.lang.String[] |
fields
Names of TMY fields stored in this object. |
static int |
GLOBAL_HORIZONTAL_RADIATION
Used to identify a field. |
static int |
HDD
Identifier specifying the type of query being made of getDegreeDays(). |
static java.lang.String[] |
hours
An array of 24 hour identifiers corresponding to the hour indices used in this object. |
static java.lang.String[] |
hours12
|
static int |
JANUARY
Used to specify a month to a method. |
static int |
JULY
Used to specify a month to a method. |
static int |
JUNE
Used to specify a month to a method. |
SOLlocation |
location
|
static int |
MARCH
Used to specify a month to a method. |
static int |
MAY
Used to specify a month to a method. |
static int[] |
MONTHLENGTH
12-element array specifying the number of days in the 12 months. |
static java.lang.String[] |
MONTHS
An array of 12 Month identifiers corresponding to the month indices used in this object. |
static int |
NOVEMBER
Used to specify a month to a method. |
static int |
OCTOBER
Used to specify a month to a method. |
static int |
RELATIVE_HUMIDITY
Used to identify a field. |
static int |
SEPTEMBER
Used to specify a month to a method. |
double[][][][] |
tmydat
4-dimensional array holding TMY data. |
boolean |
use_metric
Tells whether we are using metric or english units. |
static int |
WIND_DIRECTION
Used to identify a field. |
static int |
WIND_SPEED
Used to identify a field. |
Method Summary | |
static int |
dayOfYear(int month,
int day_of_month)
|
static int |
daysInMonth(int month)
Returns the number of days in the specified month |
double |
getAverageValue(int fieldnum)
Calculates the average of some field over the period of a year. |
double |
getAverageValue(int month,
int fieldnum)
Calculates the average value of some field over the period of a month. |
double |
getAverageValue(int month,
int day,
int fieldnum)
Calculates the average value of some field over the period of a day |
java.lang.String |
getCity()
Returns the name of the City of the data collection station. |
double[][] |
getDailyFilteredData(int first_month,
int last_month,
int filter_type,
int fieldnum)
Extract monthly values from the TMY dataset for a period of time. |
double |
getDegreeDays(int heatcool,
double base)
Calculate degree days for one year. |
double |
getDegreeDays(int month,
int heatcool,
double base)
Calculate degree days for one month. |
double |
getDegreeDays(int month,
int day,
int heatcool,
double base)
Finds heating or cooling degree days over one day. |
java.lang.String[] |
getFields()
Returns the list of monitorable fields. |
int[] |
getFieldTypes()
Returns the list of types of the monitorable fields. |
double |
getHighValue(int[] fieldnums)
Finds the maximum value of a set of fields over the period of a year. |
double |
getHighValue(int month,
int[] fieldnums)
Finds the maximum value of a set of fields over the period of a month. |
double |
getHighValue(int month,
int day,
int[] fieldnums)
Finds the maximum value of a set of fields over the period of a day. |
double |
getLowValue(int[] fieldnums)
Finds the minimum value of a set of fields over the period of a year. |
double |
getLowValue(int month,
int[] fieldnums)
Finds the minimum value of a field over the period of a month. |
double |
getLowValue(int month,
int day,
int[] fieldnums)
Finds the minimum value of a set of fields over the period of a day. |
java.lang.String |
getName()
Returns the name (City,State) of the location. |
java.lang.String |
getState()
Returns the name of the State of the data collecton station. |
double |
getValue(int month,
int day,
int hour,
int fieldnum)
Returns a data value for the specified month, day, hour and field number. |
int |
getWBAN()
Returns the WBAN number of the station. |
static int |
hourOfYear(int month,
int day,
int hour)
Given month (0-11), day(0-31), and hour, return the hour in the year. |
void |
readData(java.io.File file)
Read a TMY2 file into the TMYdata object. |
void |
readData(java.io.InputStream is)
Read TMY2 data from an InputStream. |
void |
readData(java.io.InputStream input_stream,
java.lang.String fname)
Read a TMY2 file into the TMYdata object. |
void |
readData(java.lang.String fname)
|
int |
readTMYStream(java.io.BufferedReader br)
Reads a TMY or SOLMET format data file, creating data structures. |
boolean |
setValue(int month,
int day,
int hour,
int fieldnum,
double value)
Sets the data value for the specified month, day, hour and field number. |
void |
useEnglish()
Sets the object to use English units in all data exchanges. |
void |
useMetric()
Sets the object to use Metric units in data exchanges. |
boolean |
usingMetric()
Returns true if the object is set for Metric units, false for English units. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int HDD
public static final int CDD
public static int[] MONTHLENGTH
public static final java.lang.String[] fields
public static final int[] field_types
public static final java.lang.String[] MONTHS
public static final java.lang.String[] days
public static final java.lang.String[] hours
public static final java.lang.String[] hours12
public static final int GLOBAL_HORIZONTAL_RADIATION
public static final int DIRECT_NORMAL_RADIATION
public static final int DIFFUSE_HORIZONTAL_RADIATION
public static final int DRY_BULB_TEMP
public static final int DEWPOINT
public static final int RELATIVE_HUMIDITY
public static final int WIND_DIRECTION
public static final int WIND_SPEED
public static final int JANUARY
public static final int FEBRUARY
public static final int MARCH
public static final int APRIL
public static final int MAY
public static final int JUNE
public static final int JULY
public static final int AUGUST
public static final int SEPTEMBER
public static final int OCTOBER
public static final int NOVEMBER
public static final int DECEMBER
public static final int DAILY_NO_FILTER
public static final int DAILY_AVERAGE
public static final int DAILY_HIGH
public static final int DAILY_LOW
public SOLlocation location
public double[][][][] tmydat
public boolean use_metric
Method Detail |
public int readTMYStream(java.io.BufferedReader br) throws java.io.IOException
public void readData(java.lang.String fname) throws java.io.FileNotFoundException, java.io.IOException
public void readData(java.io.File file) throws java.io.FileNotFoundException, java.io.IOException
public void readData(java.io.InputStream input_stream, java.lang.String fname) throws java.io.IOException
public void readData(java.io.InputStream is) throws java.io.IOException
public double getValue(int month, int day, int hour, int fieldnum)
public double getAverageValue(int month, int day, int fieldnum)
public double getAverageValue(int month, int fieldnum)
public double getAverageValue(int fieldnum)
public double getHighValue(int month, int day, int[] fieldnums)
public double getHighValue(int month, int[] fieldnums)
public double getHighValue(int[] fieldnums)
public double getLowValue(int month, int day, int[] fieldnums)
public double getLowValue(int month, int[] fieldnums)
public double getLowValue(int[] fieldnums)
public double getDegreeDays(int month, int day, int heatcool, double base)
public double getDegreeDays(int month, int heatcool, double base)
public double getDegreeDays(int heatcool, double base)
public void useMetric()
public void useEnglish()
public boolean usingMetric()
public int getWBAN()
public java.lang.String getCity()
public java.lang.String getState()
public java.lang.String getName()
public java.lang.String[] getFields()
public int[] getFieldTypes()
public static int hourOfYear(int month, int day, int hour)
public static int dayOfYear(int month, int day_of_month)
public static int daysInMonth(int month)
public boolean setValue(int month, int day, int hour, int fieldnum, double value)
public double[][] getDailyFilteredData(int first_month, int last_month, int filter_type, int fieldnum)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |