Skip to content

Unexpected masked data is introduced in bilinear mesh to grid #391

Open
@jrackham-mo

Description

@jrackham-mo

🐛 Bug Report

When regridding from low resolution UGRID data (C4 cubed sphere) to a higher resolution grid (e.g. n216e), masked data points are introduced in the result, despite there being no masked data in the source.

How To Reproduce

Steps to reproduce the behaviour:

  1. Sample C4 data is available here. (see screenshots section for plots)
  2. Sample n216e target grid is available here.

Example script:

>>> from iris.experimental.ugrid import PARSE_UGRID_ON_LOAD
>>> import iris
>>> iris.__version__
'3.9.0'
>>> import esmf_regrid
>>> esmf_regrid.__version__
'0.9.0'
>>> with PARSE_UGRID_ON_LOAD.context():
...     source = iris.load_cube("data_C4.nc", "sample_data")
... 
>>> target = iris.load_cube("non_ugrid_data.nc", "land_area_fraction")
>>> bilinear_regridder = esmf_regrid.schemes.ESMFBilinearRegridder(source, target)
>>> result = bilinear_regridder(source)
>>> import numpy as np
>>> np.ma.is_masked(result.data)
True
>>> np.ma.is_masked(source.data)
False
>>> iris.save(result, "regridded_bilinear_C4_n96e.nc")

Expected behaviour

Expect there to be no masked points in the regridded result. See actual results in screenshots section.

Screenshots

Click to expand this section...

Source data: C4 cubed sphere

sample_data_C4
sample_data_C4_PlateCarree

Regridded data: n96e

bilinear_regrid_result
bilinear_regrid_result_PlateCarree

Environment

  • OS and version: RHEL 7
  • esmf_regrid version: 0.9.0
  • iris version: 3.9.0

Additional context

We have a use case in UG-ANTS for regridding from a low resolution mesh to a high resolution grid. We would expect there to be no masked data introduced by regridding, or at least for a warning/error to be raised if this does occur.

Metadata

Metadata

Labels

New: IssueHighlight a new community raised "generic" issueType: Bug

Type

No type

Projects

  • Status

    No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions