Skip to content

Commit 15f93d3

Browse files
committed
update docs, closes pvlib#592
1 parent f7003ac commit 15f93d3

File tree

3 files changed

+72
-1
lines changed

3 files changed

+72
-1
lines changed

docs/sphinx/source/api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ relevant to solar energy modeling.
340340
iotools.get_ecmwf_macc
341341
iotools.read_crn
342342
iotools.read_solrad
343+
iotools.get_psm3
343344

344345
A :py:class:`~pvlib.location.Location` object may be created from metadata
345346
in some files.

docs/sphinx/source/whatsnew/v0.6.2.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Enhancements
2929
* Add US CRN data reader to :ref:`iotools`.
3030
* Add SOLRAD data reader to :ref:`iotools`.
3131
* Add EPW data reader to :ref:`iotools`. (:issue:`591`)
32+
* Add PSM3 reader to :ref:`iotools`. (:issue:`592`)
3233

3334
Bug fixes
3435
~~~~~~~~~

pvlib/iotools/psm3.py

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,76 @@
1919

2020

2121
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+
"""
2392
longitude = ('%9.4f' % longitude).strip()
2493
latitude = ('%8.4f' % latitude).strip()
2594
params = {

0 commit comments

Comments
 (0)