metobs_toolkit.modeltimeseries.ModelTimeSeries#

class ModelTimeSeries(site, datarecords: ~numpy.ndarray, timestamps: ~numpy.ndarray, obstype: ~metobs_toolkit.obstypes.Obstype, datadtype: type = <class 'numpy.float32'>, timezone: str = 'UTC', modelname: str | None = None, modelvariable: str | None = None)[source]#

Class for model-based timeseries at one location.

Parameters:
  • site (object) – The site object representing the location.

  • datarecords (np.ndarray) – Array of data records.

  • timestamps (np.ndarray) – Array of timestamps corresponding to the data records.

  • obstype (Obstype) – The observation type.

  • datadtype (type, optional) – Data type for the records, by default np.float32.

  • timezone (str, optional) – Timezone for the timestamps, by default “UTC”.

  • modelname (str, optional) – Name of the model, by default None.

  • modelvariable (str, optional) – Name of the model variable, by default None.

__init__(site, datarecords: ~numpy.ndarray, timestamps: ~numpy.ndarray, obstype: ~metobs_toolkit.obstypes.Obstype, datadtype: type = <class 'numpy.float32'>, timezone: str = 'UTC', modelname: str | None = None, modelvariable: str | None = None)[source]#

Methods

__init__(site, datarecords, timestamps, obstype)

get_info([printout])

Print or return information about the ModelTimeSeries.

make_plot([linecolor, ax, figkwargs, title])

Create a plot of the model time series.

to_xr()

Convert a model time series object to an xarray Dataset.

Attributes

df

ModelTimeSeries DataFrame constructor.

end_datetime

Return the end datetime of the series.

freq

Return the frequency of the series.

start_datetime

Return the start datetime of the series.

stationname

Return the name of the station this SensorData belongs to.

tz

Return the timezone of the stored timestamps.