o3api reference¶
If you are looking for information on a specific function, class or method, this part of the documentation is for you.
api¶
O3as REST API methods:
-
o3api.api.
get_metadata
(*args, **kwargs)[source]¶ Return information about the package
- Returns
The o3api package info
- Return type
dict
-
o3api.api.
get_model_info
(*args, **kwargs)[source]¶ Return information about the Ozone model
- Returns
Info about the Ozone model
- Return type
dict
plots¶
O3as helper classes to extact data for plotting:
-
class
o3api.plots.
DataSelection
(plot_type, **kwargs)[source]¶ Class to perform data selection, based on
Dataset
.- Parameters
begin – Year to start data scanning from
end – Year to finish data scanning
month – Month(s) to select, if not a whole year
lat_min – Minimum latitude to define the range (-90..90)
lat_max – Maximum latitude to define the range (-90..90)
-
class
o3api.plots.
Dataset
(plot_type, **kwargs)[source]¶ Base Class to initialize the dataset
- Parameters
plot_type – The plot type (e.g. tco3_zm, vmro3_zm, …)
-
class
o3api.plots.
ProcessForTCO3
(**kwargs)[source]¶ Subclass of
DataSelection
to calculate tco3_zm-
get_plot_data
(model)[source]¶ Plot tco3_zm data applying a smoothing function (boxcar) :param model: The model to process for tco3_zm :return: ready for plotting data :rtype: pandas series (pd.Series)
-
-
class
o3api.plots.
ProcessForTCO3Return
(**kwargs)[source]¶ Subclass of
DataSelection
to calculate tco3_return
-
class
o3api.plots.
ProcessForVMRO3
(**kwargs)[source]¶ Subclass of
DataSelection
to calculate vmro3_zm
plothelpers¶
O3as help functions to create figures:
-
o3api.plothelpers.
clean_models
(**kwargs)[source]¶ Clean models from empty entries, spaces, and quotes
- Parameters
kwargs – The provided in the API call parameters
- Returns
models cleaned from empty entries, spaces, quotes
- Return type
list
-
o3api.plothelpers.
get_date_range
(ds)[source]¶ Return the range of dates in the provided dataset
- Parameters
ds – xarray dataset to check
- Returns
date_min, date_max
-
o3api.plothelpers.
get_periodicity
(pd_time)[source]¶ Calculate periodicity in the provided data
- Parameters
pd_time (pandas DatetimeIndex) – The time period
- Returns
Calculated periodicity as the number of points per year
- Return type
int
-
o3api.plothelpers.
set_figure_attr
(fig, **kwargs)[source]¶ Configure the figure attributes
- Parameters
fig – Figure instance
kwargs – The provided in the API call parameters
- Returns
none