Weather (climate)
[Runtime modules]


Detailed Description

Climate implementation.


Modules

 TMY2 data
 TMY2 file reader.
 CSV data
 CSV file reader.

Classes

class  climate
class  csv
struct  s_tmy
class  tmy2_reader
 This implements a Gridlab-D specific TMY2 data reader. More...

Enumerations

enum  COMPASS_PTS {
  CP_S = 0, CP_SE = 1, CP_SW = 2, CP_E = 3,
  CP_W = 4, CP_NE = 5, CP_NW = 6, CP_N = 7,
  CP_H = 8, CP_LAST = 9
}

Functions

 climate::climate (MODULE *module)
int climate::create (void)
EXPORT int create_climate (OBJECT **obj, OBJECT *parent)
 Create a climate object.
int climate::init (OBJECT *parent)
EXPORT int init_climate (OBJECT *obj, OBJECT *parent)
 a poitner to the parent OBJECT
TIMESTAMP climate::sync (TIMESTAMP t0)
EXPORT TIMESTAMP sync_climate (OBJECT *obj, TIMESTAMP t0)
 the time to which the OBJECT's clock should advance

Variables

static climateclimate::defaults = NULL
static CLASSclimate::oclass = NULL


Enumeration Type Documentation

enum COMPASS_PTS

Enumerator:
CP_S 
CP_SE 
CP_SW 
CP_E 
CP_W 
CP_NE 
CP_NW 
CP_N 
CP_H 
CP_LAST 

Definition at line 14 of file climate.h.


Function Documentation

EXPORT int create_climate ( OBJECT **  obj,
OBJECT parent 
)

Create a climate object.

Parameters:
obj  a pointer to the OBJECT*
parent  a pointer to the parent OBJECT

Definition at line 232 of file climate.cpp.

References create(), gl_create_object, gl_set_parent, OBJECTDATA, and oclass.

EXPORT int init_climate ( OBJECT obj,
OBJECT parent 
)

a poitner to the parent OBJECT

Parameters:
parent  a pointer to the OBJECT

Definition at line 247 of file climate.cpp.

References init(), and OBJECTDATA.

TIMESTAMP climate::sync ( TIMESTAMP  t0  )  [inherited]

Todo:
cache this value and only perform the memcpy if it has changed. (climate, low priority) (ticket #124)

negative means soft event

Definition at line 208 of file climate.cpp.

References CP_LAST, gl_localtime, s_datetime::hour, humidity, s_tmy::rh, solar_flux, s_tmy::temp, s_tmy::temp_raw, temperature, temperature_raw, TS_NEVER, TS_SECOND, and s_datetime::yearday.

EXPORT TIMESTAMP sync_climate ( OBJECT obj,
TIMESTAMP  t0 
)

the time to which the OBJECT's clock should advance

Parameters:
t0  a pointer to the OBJECT

Definition at line 259 of file climate.cpp.

References s_object_list::clock, and OBJECTDATA.


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