polartoolkit.grid_compare#
- grid_compare(da1, da2, plot=True, plot_type=None, robust=False, **kwargs)[source]#
Find the difference between 2 grids and plot the results, if necessary resample and cut grids to match
- Parameters:
- Keyword Arguments:
shp_mask (str) – deprecated, use shapefile instead,
shapefile (str or geopandas.GeoDataFrame) – shapefile or filename to use to mask the grids for setting the color range.
robust (bool) – use xarray robust color lims instead of min and max, by default is False.
region (tuple[float, float, float, float]) – choose a specific region to compare, in format [xmin, xmax, ymin, ymax].
rmse_in_title (bool) – add the RMSE to the title, by default is True.
cpt_lims (tuple[float, float]) – set the colorbar limits for the two grids.
diff_lims (tuple[float, float]) – set the colorbar limits for the difference grid.
- Returns:
three xarray.DataArrays: (diff, resampled grid1, resampled grid2)
- Return type: