pvlib.iotools.get_nsrdb_psm4_polar_tmy#

pvlib.iotools.get_nsrdb_psm4_polar_tmy(latitude, longitude, api_key, email, year='tmy', time_step=60, parameters=('air_temperature', 'dew_point', 'dhi', 'dni', 'ghi', 'surface_albedo', 'surface_pressure', 'wind_direction', 'wind_speed'), leap_day=False, 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 TMY v4 API.

The NSRDB is described in [1] and the NSRDB PSM4 Polar TMY v4 dataset is described in [2], [3]. The polar dataset extends NSRDB coverage to high latitude polar regions, that are outside the field of view of the geostationary satellites.

The dataset provides typical meteorological year (TMY) data 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 (str, default 'tmy') – PSM4 API parameter specifing TMY variant to download (e.g. 'tmy' or 'tgy-2023'). The allowed values update periodically, so consult the NSRDB references below for the current set of options. Called names in NSRDB API.

  • time_step (int, {60}) – time step in minutes. Must be 60 for typical year requests. 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’); see REQUEST_VARIABLE_MAP. To retrieve all available fields, set parameters=[].

  • leap_day (bool, default : False) – Include leap day in the results. Ignored for tmy/tgy/tdy requests.

  • 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 TMY 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 TMY

  • metadata (dict) – metadata from NLR PSM4, 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.

References