swvo.io.solar_wind.read_solar_wind_from_multiple_models#
- swvo.io.solar_wind.read_solar_wind_from_multiple_models(start_time: datetime, end_time: datetime, model_order: Sequence[DSCOVR | SWACE | SWOMNI | SWSWIFTEnsemble] | None = None, reduce_ensemble: Literal['mean', 'median'] | None = None, historical_data_cutoff_time: datetime | None = None, *, download: bool = False, fill_average: bool = False, do_interpolation: bool = False) DataFrame | list[DataFrame][source]#
Read solar wind data from multiple models.
The model order represents the priorities of models. The first model in the model order is read. If there are still NaNs in the resulting data, the next model will be read. And so on. In the case of reading ensemble predictions, a list will be returned, otherwise a plain data frame will be returned.
- Parameters:
- start_timedatetime
Start time of the data request.
- end_timedatetime
End time of the data request.
- model_orderlist, optional
Order in which data will be read from the models. Defaults to [OMNI, ACE, SWIFT].
- reduce_ensembleLiteral[“mean”, “median”], optional
The method to reduce ensembles to a single time series. Defaults to None.
- historical_data_cutoff_timedatetime, optional
Time which represents “now”. After this time, no data will be taken from historical models (OMNI, ACE). Defaults to None.
- downloadbool, optional
Flag which decides whether new data should be downloaded. Defaults to False.
- fill_averagebool, optional
If True, keep the final dataframe through the requested end time for average-based filling. Defaults to False.
- do_interpolationbool, optional
If True, apply spline interpolation to short gaps (<= 3 hours) in historical data. Defaults to False.
- Returns:
- Union[
pandas.DataFrame, list[pandas.DataFrame]] A data frame or a list of data frames containing data for the requested period.
- Union[
- Raises:
- ModelError
If an unknown or incompatible model is provided in the model order.
- AssertionError
If reduce_ensemble is not None, “mean” or “median”.