GridModelResult

GridModelResult(
    self,
    data,
    *,
    name=None,
    item=None,
    quantity=None,
    aux_items=None,
)

Construct a GridModelResult from a file or xarray.Dataset.

Parameters

Name Type Description Default
data types.GridType the input data or file path required
name str The name of the model result, by default None (will be set to file name or item name) None
item str or int If multiple items/arrays are present in the input an item must be given (as either an index or a string), by default None None
quantity Quantity Model quantity, for MIKE files this is inferred from the EUM information None
aux_items Optional[list[int | str]] Auxiliary items, by default None None

Methods

Name Description
extract Extract ModelResult at observation positions

extract

GridModelResult.extract(observation, spatial_method=None)

Extract ModelResult at observation positions

Note: this method is typically not called directly, but through the match() method.

Parameters

Name Type Description Default
observation or positions (and times) at which modelresult should be extracted required
spatial_method Optional[str] method in xarray.Dataset.interp, typically either “nearest” or “linear”, by default None = ‘linear’ None

Returns

Name Type Description
PointModelResult or TrackModelResult extracted modelresult