match

match(
    obs,
    mod,
    *,
    obs_item=None,
    mod_item=None,
    gtype=None,
    max_model_gap=None,
    spatial_method=None,
)

Match observation and model result data in space and time

NOTE: In case of multiple model results with different time coverage, only the overlapping time period will be used! (intersection)

NOTE: In case of multiple observations, multiple models can only be matched if they are all of SpatialField type, e.g. DfsuModelResult or GridModelResult.

Parameters

Name Type Description Default
obs (str, Path, pd.DataFrame, Observation, Sequence[Observation]) Observation(s) to be compared required
mod (str, Path, pd.DataFrame, ModelResult, Sequence[ModelResult]) Model result(s) to be compared required
obs_item int or str observation item if obs is a file/dataframe, by default None None
mod_item (int, str) model item if mod is a file/dataframe, by default None None
gtype (str, optional) Geometry type of the model result (if mod is a file/dataframe). If not specified, it will be guessed. None
max_model_gap (float, optional) Maximum time gap (s) in the model result (e.g. for event-based model results), by default None None
spatial_method str For Dfsu- and GridModelResult, spatial interpolation/selection method. - For DfsuModelResult, one of: ‘contained’ (=isel), ‘nearest’, ‘inverse_distance’ (with 5 nearest points), by default “inverse_distance”. - For GridModelResult, passed to xarray.interp() as method argument, by default ‘linear’. None

Returns

Name Type Description
Comparer In case of a single observation
ComparerCollection In case of multiple observations

See Also

from_matched - Create a Comparer from observation and model results that are already matched