polaris.tasks.ocean.realistic_global.init.remap_jra55.check_no_missing_cells

polaris.tasks.ocean.realistic_global.init.remap_jra55.check_no_missing_cells(ds, var_names, frac_b, tolerance=1e-06)[source]

Raise an error if any cell is missing from the remapped wind stress.

A cell is missing if the mapping weights do not fully cover it or if any of var_names is not finite there. The coverage has to come from the mapping file: ncremap writes zero, not a missing value, to a cell the weights do not reach when the source has no _FillValue.

Parameters:
  • ds (xarray.Dataset) – The remapped dataset, with the given variables on an nCells dimension

  • var_names (list of str) – The variables to check

  • frac_b (numpy.ndarray) – The fraction of each destination cell covered by the source grid, from the mapping file

  • tolerance (float, optional) – How far below one the coverage of a cell may be before the cell counts as missing