pvlib.iotools.read_midc

pvlib.iotools.read_midc(filename, variable_map={}, 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. Used to rename the columns of the resulting DataFrame. Does not map names by default. See Notes for an example.

  • 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

The variable_map argument should map fields from MIDC data to pvlib names.

e.g. If a MIDC file contains the variable ‘Global Horizontal [W/m^2]’,

passing the dictionary below will rename the column to ‘ghi’ in the returned Dataframe.

{

‘Global Horizontal [W/m^2]’: ghi,

}

See the MIDC_VARIABLE_MAP for collection of mappings by site. 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

NREL: Measurement and Instrumentation Data Center https://midcdmz.nrel.gov/