TMY2 data
[Weather (climate)]


Detailed Description

TMY2 file reader.

Todo:
document climate TMY2 file reader (climate, medium priority) (ticket #123)


Functions

double tmy2_reader::calc_solar (COMPASS_PTS cpt, short doy, double lat, double sol_time, double dnr, double dhr, double vert_angle)
void tmy2_reader::close ()
int tmy2_reader::header_info (char *city, char *state, int *degrees, int *minutes, int *long_deg, int *long_min)
 Populate the given arguments with data from the tmy2 file header.
int tmy2_reader::next ()
 Store the current line in a buffer for later reading by read_data.
int tmy2_reader::open (const char *file)
 Open the file for reading.
int tmy2_reader::read_data (double *dnr, double *dhr, double *tdb, double *rh, int *month, int *day, int *hour)
 Populate the given arguments with data from the buffer.


Function Documentation

int tmy2_reader::header_info ( char *  city,
char *  state,
int *  degrees,
int *  minutes,
int *  long_deg,
int *  long_min 
) [inherited]

Populate the given arguments with data from the tmy2 file header.

Parameters:
city 
state 
degrees latitude degrees
minutes latitude minutes

Definition at line 55 of file climate.cpp.

Referenced by climate::init().

int tmy2_reader::open ( const char *  file  )  [inherited]

Open the file for reading.

This will read in the header information and position the file reader at the first data line in the file.

This call will throw an exception if the file fails to open

Parameters:
file the name of the TMY2 file to open

Definition at line 28 of file climate.cpp.

References gl_findfile, and tmy2_reader::tz_offset.

Referenced by climate::init().

int tmy2_reader::read_data ( double *  dnr,
double *  dhr,
double *  tdb,
double *  rh,
int *  month,
int *  day,
int *  hour 
) [inherited]

Populate the given arguments with data from the buffer.

Parameters:
dnr - Direct Normal Radiation
dhr - Diffuse Horizontal Radiation
tdb - Dry Bulb Temperature
month - Month of the observation
day - Day of the observation
hour - hour of the observation

Definition at line 65 of file climate.cpp.

Referenced by climate::init().


GridLAB-DTM Version 1.0
An open-source project initiated by the US Department of Energy