dubfi.fluxes.dataprovider_dense¶
Module providing flux inversion data for dense matrix inversion.
Changed in version 0.1.2: (renamed module)
Changed in version 0.1.1.
Added in version 0.1.0: (initial release)
Classes¶
Abstract data provider for dense and CSC sparse implementation. |
|
Data provider for dense linear algebra implementation. |
|
Data provider for diagonal R matrix with dense linear algebra implementation. |
Functions¶
|
Count observations at same time and station. |
Module Contents¶
- class dubfi.fluxes.dataprovider_dense.DataProvider(config: str | dict, apply_inflation: bool = True)¶
Bases:
dubfi.fluxes.dataprovider.InsituDataProviderAbstract data provider for dense and CSC sparse implementation.
Construct instance based on configuration file and data in files.
- property config: dict¶
Inversion configuration.
- property coords: dict¶
Data coordinates, see
dubfi.fluxes.readobs.coordinates_from_config().
- read_data()¶
Read data from files.
Note
Data are read and interpreted without checking the units.
- get_Y() dubfi.linalg.types.Vector¶
Get Y vector (observation minus model prior).
- get_H() dubfi.linalg.dense.LinParamVector¶
Get H parametrized vector (observation operator).
- class dubfi.fluxes.dataprovider_dense.DenseDataProvider(config: str | dict, apply_inflation: bool = True)¶
Bases:
DataProviderData provider for dense linear algebra implementation.
Added in version 0.1.1.
Construct instance based on configuration file and data in files.
- get_R() dubfi.linalg.dense.DenseEnsLinPostR¶
Get R parametrized operator (error covariance matrix).
- class dubfi.fluxes.dataprovider_dense.DiagonalDataProvider(config: str | dict, apply_inflation: bool = False)¶
Bases:
DataProviderData provider for diagonal R matrix with dense linear algebra implementation.
Added in version 0.1.1.
Construct instance based on configuration file and data in files.
- get_R(apply_inflation: bool = True) dubfi.linalg.dense.DiagonalEnsLinPostR¶
Get diagonal R parametrized operator (error covariance matrix).
Estimate a diagonal R matrix. The configuration entries uncertainty.diag_R_… define whether ensemble information is used.
This diagonal R matrix has the same uncertainty inflation and outlier weighting applied as any the non-diagonal R matrices.
- dubfi.fluxes.dataprovider_dense._count_same_site_obs(time: numpy.ndarray, idx_bnds: numpy.ndarray, ssh_lst: list[str] | numpy.ndarray) numpy.ndarray¶
Count observations at same time and station.
Count number of observations at same station and same time, irrespective of the sampling height. Return this number as an array alinged with the observations.
This is a helper function for
DataProvider.read_data().Scientific reasoning: Multiple observations at the same station and time have a strongly correlated model uncertainty. The inversion will assume that the model data mismatch at different sampling heights should agree up to the baseline uncertainty. This will in general underestimate the representativity error. Furthermore, it will give more weights to stations with more sampling heights. Both problems are mitigated by increasing the baseline uncertainty when multiple sampling heights are in use.