dubfi.fluxes.dataprovider¶
Abstract data provider interface.
Added in version 0.1.1.
Classes¶
Abstract base class for data providers for inversion. |
|
Abstract base class for data providers for inversion. |
Module Contents¶
- class dubfi.fluxes.dataprovider.AbstractDataProvider¶
Bases:
abc.ABCAbstract base class for data providers for inversion.
- property config: dict[str, Any]¶
- Abstractmethod:
- Return type:
dict[str, Any]
Inversion configuration.
- property coords: dict[str, Any]¶
- Abstractmethod:
- Return type:
dict[str, Any]
Data coordinates, see
dubfi.fluxes.readobs.coordinates_from_config().
- abstractmethod get_R()¶
Get R parametrized operator (error covariance matrix).
For the ensemble flux inversion, this operator is constructed as described in R-matrix and uncertainties.
- Return type:
- abstractmethod get_H()¶
Get H parametrized vector (observation operator).
For the flux inversion, this is just a linear operator (i.e., a matrix). A possible offset or background concentration in the model prediction should be directly subtracted from the vector returned by
get_Y().- Return type:
- abstractmethod get_Y()¶
Get Y vector (observation minus model prior).
This is usually the vector of observations minus the model prior, or the observations minus the model background.
- Return type:
- class dubfi.fluxes.dataprovider.InsituDataProvider¶
Bases:
AbstractDataProviderAbstract base class for data providers for inversion.
- weight_outliers()¶
Inflate uncertainty for outliers.
- Raises:
RuntimeError – if called a second time
- Return type:
None
- apply_global_inflation()¶
Apply global uncertainty inflation in-place.
- Raises:
RuntimeError – if called a second time
- Return type:
None
- abstractmethod read_data()¶
Read data from files.
- _read_ens(fname, times, obsidcs, **netcdf_kw)¶
Read ensemble data, helper for
read_data().- Parameters:
fname (str)
times (numpy.ndarray)
obsidcs (numpy.ndarray | slice)
- Return type:
None
- _read_det(fname, times, obsidcs, ssh, same_site_count, **netcdf_kw)¶
Read deterministic data, helper for
read_data().- Parameters:
fname (str)
times (numpy.ndarray)
obsidcs (numpy.ndarray | slice)
ssh (str)
same_site_count (numpy.ndarray)
- Return type:
None