pvlib.iotools.get_nsrdb_psm4_full_disc#
- pvlib.iotools.get_nsrdb_psm4_full_disc(latitude, longitude, api_key, email, year='2023', time_step=60, parameters=('air_temperature', 'dew_point', 'dhi', 'dni', 'ghi', 'surface_albedo', 'surface_pressure', 'wind_direction', 'wind_speed'), leap_day=True, full_name='pvlib python', affiliation='pvlib python', utc=False, map_variables=True, url=None, timeout=30)[source]#
Retrieve NSRDB PSM4 timeseries weather data from the PSM4 NSRDB GOES Full Disc v4 API.
The NSRDB is described in [1] and the PSM4 NSRDB GOES Full Disc v4 API is described in [2].
- Parameters:
latitude (float or int) – in decimal degrees, between -90 and 90, north is positive
longitude (float or int) – in decimal degrees, between -180 and 180, east is positive
api_key (str) – NREL Developer Network API key
email (str) – NREL API uses this to automatically communicate messages back to the user only if necessary
year (str, default '2023') – PSM4 API parameter specifing year (e.g.
2023
) to download. The allowed values update periodically, so consult the NSRDB reference below for the current set of options. Callednames
in NSRDB API.time_step (int, {60, 10, 30}) – time step in minutes, must be 10, 30 or 60. Called
interval
in NSRDB API.parameters (list of str, optional) – meteorological fields to fetch. If not specified, defaults to
pvlib.iotools.psm4.PARAMETERS
. See reference [2] for a list of available fields. Alternatively, pvlib names may also be used (e.g. ‘ghi’ rather than ‘GHI’); seeREQUEST_VARIABLE_MAP
. To retrieve all available fields, setparameters=[]
.leap_day (bool, default : True) – include leap day in the results
full_name (str, default 'pvlib python') – optional
affiliation (str, default 'pvlib python') – optional
utc (bool, default : False) – retrieve data with timestamps converted to UTC. False returns timestamps in local standard time of the selected location
map_variables (bool, default True) – When true, renames columns of the Dataframe to pvlib variable names where applicable. See variable
VARIABLE_MAP
.url (str, optional) – Full API endpoint URL. If not specified, the PSM4 GOES Full Disc v4 URL is used.
timeout (int, default 30) – time in seconds to wait for server response before timeout
- Returns:
data (pandas.DataFrame) – timeseries data from NREL PSM4
metadata (dict) – metadata from NREL PSM4 about the record, see
pvlib.iotools.read_nsrdb_psm4()
for fields
- Raises:
requests.HTTPError – if the request response status is not ok, then the
'errors'
field from the JSON response or any error message in the content will be raised as an exception, for example if the api_key was rejected or if the coordinates were not found in the NSRDB
Notes
The required NREL developer key, api_key, is available for free by registering at the NREL Developer Network.
Warning
The “DEMO_KEY” api_key is severely rate limited and may result in rejected requests.
Warning
PSM4 is limited to data found in the NSRDB, please consult the references below for locations with available data.
See also
pvlib.iotools.get_nsrdb_psm4_aggregated
,pvlib.iotools.get_nsrdb_psm4_tmy
,pvlib.iotools.get_nsrdb_psm4_conus
,pvlib.iotools.read_nsrdb_psm4
References