- DataSet.match_points(df=None, variables=None, depths=None, tmean=False, top=False, nan=None, regrid='bil', max_extrap=5, quiet=False, **kwargs)#
match_points: Match dataset to a spatiotemporal points dataframe
df (pandas DataFrame) – The column names must be made up of a subset of “lon”, “lat”, “year”, “month”, “day” and “depth” Pressure (in dbars), named “pressure”, can also be used instead of “depth”, which will require the optional dependency seawater to be installed.
variables (str or list) – Str or list of variables. All variables are matched up if this is not supplied. This can include variables generated by assign using kwargs.
depths (nctoolkit DataSet or list) – If each cell has different vertical levels, this must be provided as a dataset. If each cell has the same vertical levels, provide it as a list. If this is not supplied nctoolkit will try to figure out what they are. Only required if carrying out vertical matchups.
tmean (bool) – Set to True or False, depending on whether you want temporal averaging at the temporal resolution given by df. For example, if you only had months in df, but had daily data in ds, you might want to calculate a daily average in the monthly dataset. This is equivalent to apply ds.tmean(..) to the dataset.
top (bool) – Set to True if you want only the top/surface level of the dataset to be selected for matching.
nan (float or list) – Value or range of values to set to nan. Defaults to 0. Only required if values in dataset need changed to missing
regrid (str) – Regridding method. Defaults to “bil”. Options available are those in nctoolkit regrid method. “nn” for nearest neighbour.
max_extrap (float) – Maximum distance for extrapolation. Defaults to 5.
quiet (bool) – Set to True to suppress output
kwargs (kwargs) – Additional arguments to send to assign
- Return type: