pvlib.iotools.get_nsrdb_psm4_polar#
- pvlib.iotools.get_nsrdb_psm4_polar(latitude, longitude, api_key, email, year, *, 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 timeseries weather data from the PSM4 NSRDB Polar API.
The NSRDB is described in [1] and the NSRDB PSM4 NSRDB Polar v4 dataset is described in [2], [3]. The polar dataset extends NSRDB coverage to high latitude regions, that are outside the field of view of the geostationary satellites.
The dataset provides data from 2013 onwards for the exclusive economic zones above 60 degrees north. The data have a spatial resolution of 4 km and a temporal resolution of 1 hour.
- Parameters:
latitude (float or int) – in decimal degrees, between 60 and 90 degrees north. Location must be within an exclusive economic zone.
longitude (float or int) – in decimal degrees, between -180 and 180, east is positive. Location must be within an exclusive economic zone.
api_key (str) – NLR Developer Network API key
email (str) – NLR API uses this to automatically communicate messages back to the user only if necessary
year (int or str) – 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. Callednamesin NSRDB API.time_step (int, default 60) – time step in minutes. Called
intervalin NSRDB API. Only 60 is supported for the Polar dataset.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 Polar 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 NLR PSM4 Polar
metadata (dict) – metadata from NLR 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 NLR developer key, api_key, is available for free by registering at the NLR 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.get_nsrdb_psm4_full_disc,pvlib.iotools.get_nsrdb_psm4_polar,pvlib.iotools.get_nsrdb_psm4_polar_tmy,pvlib.iotools.read_nsrdb_psm4References