pvlib.iotools.read_midc

pvlib.iotools.read_midc(filename, variable_map={'Air Temperature': 'temp_air', 'Airmass': 'airmass', 'Azimuth Angle': 'solar_azimuth', 'Dew Point Temp': 'temp_dew', 'Diffuse': 'dhi', 'Direct': 'dni', 'Global': 'ghi', 'Relative Humidity': 'relative_humidity', 'Temperature': 'temp_air', 'Zenith Angle': 'solar_zenith'}, raw_data=False)[source]

Read in National Renewable Energy Laboratory Measurement and Instrumentation Data Center [1] weather data.

Parameters:
filename: string

Filename or url of data to read.

variable_map: dictionary

Dictionary for mapping MIDC field names to pvlib names. See variable VARIABLE_MAP for default and Notes section below for a description of its format.

raw_data: boolean

Set to true to use format_index_raw to correctly format the date/time columns of MIDC raw data files.

Returns:
data: Dataframe

A dataframe with DatetimeIndex localized to the provided timezone.

Notes

Keys of the variable_map dictionary should include the first part of a MIDC field name which indicates the variable being measured.

e.g. ‘Global PSP [W/m^2]’ is entered as a key of ‘Global’

The ‘PSP’ indicating instrument is appended to the pvlib variable name after mapping to differentiate measurements of the same variable. For a full list of pvlib variable names see the Variable Style Rules.

Be sure to check the units for the variables you will use on the MIDC site.

References

[1](1, 2) NREL: Measurement and Instrumentation Data Center https://midcdmz.nrel.gov/