# Solar Radiation Monitoring Laboratory (SRML)#

The Solar Radiation Monitoring Laboratory (SRML) at the University of Oregon has been providing solar radiation data for the Northeastern United States since 1975. The SRML monitoring station network consists of both high-quality stations that measure all three irradiance components at a 1-minute resolution, as well as stations with low quality instruments that only log measurements hourly. A full list of the 42 stations (including discontinued stations) can be found on the SRML website.

The high-quality SRML stations can be retrieved from the SolarStations’ station listing and are shown below.

import pandas as pd

stations = stations[stations['Network'].str.contains('SRML')]
stations

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
/tmp/ipykernel_2114/1924085883.py in <module>
1 import pandas as pd
2
----> 3 stations = pd.read_csv('solarstations.csv', sep=';', encoding='latin1')
4 stations = stations[stations['Network'].str.contains('SRML')]
5 stations

/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/pandas/util/_decorators.py in wrapper(*args, **kwargs)
309                     stacklevel=stacklevel,
310                 )
--> 311             return func(*args, **kwargs)
312
313         return wrapper

/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/pandas/io/parsers/readers.py in read_csv(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, encoding_errors, dialect, error_bad_lines, warn_bad_lines, on_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options)
584     kwds.update(kwds_defaults)
585
587
588

480
481     # Create the parser.
--> 482     parser = TextFileReader(filepath_or_buffer, **kwds)
483
484     if chunksize or iterator:

/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/pandas/io/parsers/readers.py in __init__(self, f, engine, **kwds)
809             self.options["has_index_names"] = kwds["has_index_names"]
810
--> 811         self._engine = self._make_engine(self.engine)
812
813     def close(self):

1038             )
1039         # error: Too many arguments for "ParserBase"
-> 1040         return mapping[engine](self.f, **self.options)  # type: ignore[call-arg]
1041
1042     def _failover_to_python(self):

/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/pandas/io/parsers/c_parser_wrapper.py in __init__(self, src, **kwds)
49
50         # open handles
---> 51         self._open_handles(src, kwds)
52         assert self.handles is not None
53

/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/pandas/io/parsers/base_parser.py in _open_handles(self, src, kwds)
227             memory_map=kwds.get("memory_map", False),
228             storage_options=kwds.get("storage_options", None),
--> 229             errors=kwds.get("encoding_errors", "strict"),
230         )
231

/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/pandas/io/common.py in get_handle(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)
705                 encoding=ioargs.encoding,
706                 errors=errors,
--> 707                 newline="",
708             )
709         else:

FileNotFoundError: [Errno 2] No such file or directory: 'solarstations.csv'

Make this Notebook Trusted to load map: File -> Trust Notebook

## Data retrieval#

Data from the SRML stations is stored in monthly files for each station and can be freely downloaded from their website. The data can also be downloaded programmatically using the pvlib-python library, specifically the read_srml_month_from_solardat function.

Help support the SRML

If you find the data useful, please consider donating to support the SRML.

An example of how to use pvlib to download data from the Hermiston station for June 2020 is shown here:

import pvlib

station='HE',
year=2020,
month=6)

df.head(12)  # print the first 12 rows of data

ghi_0 ghi_0_flag dni_0 dni_0_flag dhi_3 dhi_3_flag ghi_2 ghi_2_flag dni_2 dni_2_flag ... relative_humidity_1 relative_humidity_1_flag 9151 9151_flag wind_dir_1 wind_dir_1_flag wind_speed_1 wind_speed_1_flag dhi_0 dhi_0_flag
2020-06-01 00:00:00-08:00 0 12 0 12 0 12 0 12 0 12 ... 55.3 12 0.0 11 172.5 11 1.3 12 0 71
2020-06-01 00:01:00-08:00 0 12 0 12 0 12 0 12 0 12 ... 55.5 12 0.0 11 180.7 11 1.3 12 0 71
2020-06-01 00:02:00-08:00 0 12 0 12 0 12 0 12 0 12 ... 55.6 12 0.0 11 128.9 11 0.4 12 0 71
2020-06-01 00:03:00-08:00 0 12 0 12 0 12 0 12 0 12 ... 55.4 12 0.0 11 141.6 11 1.2 12 0 71
2020-06-01 00:04:00-08:00 0 12 0 12 0 12 0 12 0 12 ... 55.6 12 0.0 11 186.3 11 0.8 12 0 71
2020-06-01 00:05:00-08:00 0 12 0 12 0 12 0 12 0 12 ... 55.4 12 0.0 11 188.7 11 1.8 12 0 71
2020-06-01 00:06:00-08:00 0 12 0 12 0 12 0 12 0 12 ... 55.1 12 0.0 11 170.8 11 0.9 12 0 71
2020-06-01 00:07:00-08:00 0 12 0 12 0 12 0 12 0 12 ... 55.5 12 0.0 11 122.4 11 0.0 12 0 71
2020-06-01 00:08:00-08:00 0 12 0 12 0 12 0 12 0 12 ... 55.7 12 0.0 11 236.5 11 0.1 12 0 71
2020-06-01 00:09:00-08:00 0 12 0 12 0 12 0 12 0 12 ... 55.2 12 0.0 11 201.3 11 0.7 12 0 71
2020-06-01 00:10:00-08:00 0 12 0 12 0 12 0 12 0 12 ... 55.8 12 0.0 11 186.7 11 0.2 12 0 71
2020-06-01 00:11:00-08:00 0 12 0 12 0 12 0 12 0 12 ... 55.9 12 0.0 11 192.1 11 0.0 12 0 71

12 rows × 30 columns

The data retrieved from the Hermiston station includes measurements of the three irradiance components, as well as additional weather parameters such as temperature and humidity. A few of the parameters in the datasets for the month of data are visualized below.

axes = df[['ghi_0','dni_0','dhi_3','temp_air_1','wind_speed_1']].plot(
subplots=True, legend=False, rot=0, figsize=(8,8), sharex=True)

# Set y-labels and y-limits
axes[0].set_ylabel('GHI [W/m$^2$]'), axes[0].set_ylim(-10,1400)
axes[1].set_ylabel('DNI [W/m$^2$]'), axes[1].set_ylim(-10,1400)
axes[2].set_ylabel('DHI [W/m$^2$]'), axes[2].set_ylim(-10,1400)
axes[3].set_ylabel('Temperature [°]'), axes[3].set_ylim(0,40)
_ = axes[4].set_ylabel('Wind\nspeed [m/s]'), axes[4].set_ylim(0,15)