dubfi.fluxes.dataprovider_dense =============================== .. py:module:: dubfi.fluxes.dataprovider_dense .. autoapi-nested-parse:: Module providing flux inversion data for dense matrix inversion. .. codeauthor:: Valentin Bruch, DWD .. versionchanged:: 0.1.2 (renamed module) .. versionchanged:: 0.1.1 .. versionadded:: 0.1.0 (initial release) Classes ------- .. autoapisummary:: dubfi.fluxes.dataprovider_dense.DataProvider dubfi.fluxes.dataprovider_dense.DenseDataProvider dubfi.fluxes.dataprovider_dense.DiagonalDataProvider Functions --------- .. autoapisummary:: dubfi.fluxes.dataprovider_dense._count_same_site_obs Module Contents --------------- .. py:class:: DataProvider(config, apply_inflation = True) Bases: :py:obj:`dubfi.fluxes.dataprovider.InsituDataProvider` Abstract data provider for dense and CSC sparse implementation. Construct instance based on configuration file and data in files. .. py:property:: config :type: dict Inversion configuration. .. py:property:: coords :type: dict Data coordinates, see :func:`dubfi.fluxes.readobs.coordinates_from_config`. .. py:method:: read_data() Read data from files. .. note:: Data are read and interpreted without checking the units. .. py:method:: get_Y() Get Y vector (observation minus model prior). .. py:method:: get_H() Get H parametrized vector (observation operator). .. py:class:: DenseDataProvider(config, apply_inflation = True) Bases: :py:obj:`DataProvider` Data provider for dense linear algebra implementation. .. versionadded:: 0.1.1 Construct instance based on configuration file and data in files. .. py:method:: get_R() Get R parametrized operator (error covariance matrix). .. py:class:: DiagonalDataProvider(config, apply_inflation = False) Bases: :py:obj:`DataProvider` Data provider for diagonal R matrix with dense linear algebra implementation. .. versionadded:: 0.1.1 Construct instance based on configuration file and data in files. .. py:method:: get_R(apply_inflation = True) 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. .. py:function:: _count_same_site_obs(time, idx_bnds, ssh_lst) 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 :meth:`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.