|
19 | 19 |
|
20 | 20 |
|
21 | 21 | def get_psm3(latitude, longitude, tmy='tmy', interval=60):
|
22 |
| - """get psm3""" |
| 22 | + """ |
| 23 | + Get PSM3 data |
| 24 | +
|
| 25 | + Parameters |
| 26 | + ---------- |
| 27 | + latitude : float or int |
| 28 | + in decimal degrees, between -90 and 90, north is positive |
| 29 | + longitude : float or int |
| 30 | + in decimal degrees, between -180 and 180, east is positive |
| 31 | + tmy : str |
| 32 | + PSM3 parameter "name", see notes below for options, default is ``'tmy'`` |
| 33 | + interval : integer |
| 34 | + interval size in minutes, can be only either 30 or 60 minutes |
| 35 | +
|
| 36 | + Returns |
| 37 | + ------- |
| 38 | + headers : dict |
| 39 | + meta data from NREL PSM-3 about the record, see notes for fields |
| 40 | + data : pandas.DataFrame |
| 41 | + timeseries data from NREL PSM3 |
| 42 | +
|
| 43 | + Raises |
| 44 | + ------ |
| 45 | + requests.HTTPError |
| 46 | +
|
| 47 | + Notes |
| 48 | + ----- |
| 49 | + The ``tmy`` parameter 'names' must be a single value from the following |
| 50 | + list: |
| 51 | +
|
| 52 | + ['1998', '1999', '2000', '2001', '2002', '2003', '2004', '2005', |
| 53 | + '2006', '2007', '2008', '2009', '2010', '2011', '2012', '2013', |
| 54 | + '2014', '2015', '2016', '2017', 'tmy', 'tmy-2016', 'tmy-2017', |
| 55 | + 'tdy-2017', 'tgy-2017'] |
| 56 | +
|
| 57 | + The return is a tuple with two items. The first item is a header with meta |
| 58 | + data from NREL PSM3 about the record containing the following fields: |
| 59 | +
|
| 60 | + * Source |
| 61 | + * Location ID |
| 62 | + * City |
| 63 | + * State |
| 64 | + * Country |
| 65 | + * Latitude |
| 66 | + * Longitude |
| 67 | + * Time Zone |
| 68 | + * Elevation |
| 69 | + * Local Time Zone |
| 70 | + * Dew Point Units |
| 71 | + * DHI Units |
| 72 | + * DNI Units |
| 73 | + * GHI Units |
| 74 | + * Temperature Units |
| 75 | + * Pressure Units |
| 76 | + * Wind Direction Units |
| 77 | + * Wind Speed |
| 78 | + * Surface Albedo Units |
| 79 | + * Version |
| 80 | +
|
| 81 | + See Also |
| 82 | + -------- |
| 83 | + pvlib.iotools.read_tmy2, pvlib.iotools.read_tmy3 |
| 84 | +
|
| 85 | + References |
| 86 | + ---------- |
| 87 | + [1] `NREL Developer Network - Physical Solar Model (PSM) v3 |
| 88 | + <https://developer.nrel.gov/docs/solar/nsrdb/psm3_data_download/>`_ |
| 89 | + [2] `NREL National Solar Radiation Database (NSRDB) |
| 90 | + <https://nsrdb.nrel.gov/>`_ |
| 91 | + """ |
23 | 92 | longitude = ('%9.4f' % longitude).strip()
|
24 | 93 | latitude = ('%8.4f' % latitude).strip()
|
25 | 94 | params = {
|
|
0 commit comments