Skip to content

Check mesh equality on MeshToGridESMFRegridder call#138

Merged
bjlittle merged 11 commits intoSciTools:unstructured_schemefrom
stephenworsley:mesh_checking
Dec 13, 2021
Merged

Check mesh equality on MeshToGridESMFRegridder call#138
bjlittle merged 11 commits intoSciTools:unstructured_schemefrom
stephenworsley:mesh_checking

Conversation

@stephenworsley
Copy link
Contributor

Now that iris provides proper mesh equality comparison, this can be done during the MeshToGridESMFRegridder call.

@stephenworsley
Copy link
Contributor Author

Current errors are due to saved and reloaded regridders having a mesh which does not equate to the original mesh which initialised the regridder. I have tried to fix this by equalising the var_names attached to the mesh, but there still appears to be an error due to masked arrays in connectivities being filled inconsistently on equality checks.
When this line:
https://github.com/SciTools/iris/blob/68b5e65e4cca34505f4731d2e9f3794cbd1d4f16/lib/iris/util.py#L366
is changed to array = ma.asarray(array) thsi appears to fix the problem.

@codecov
Copy link

codecov bot commented Dec 13, 2021

Codecov Report

Merging #138 (20283e7) into unstructured_scheme (4222dca) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                 Coverage Diff                  @@
##           unstructured_scheme     #138   +/-   ##
====================================================
  Coverage                99.54%   99.54%           
====================================================
  Files                       27       27           
  Lines                     1741     1767   +26     
====================================================
+ Hits                      1733     1759   +26     
  Misses                       8        8           
Impacted Files Coverage Δ
esmf_regrid/experimental/unstructured_scheme.py 100.00% <100.00%> (ø)
.../tests/unit/experimental/io/test_round_tripping.py 100.00% <100.00%> (ø)
...nstructured_scheme/test_MeshToGridESMFRegridder.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4222dca...20283e7. Read the comment docs.

@bjlittle bjlittle merged commit 53e8b61 into SciTools:unstructured_scheme Dec 13, 2021
stephenworsley added a commit to stephenworsley/iris-esmf-regrid that referenced this pull request Jan 10, 2022
* unstructured_scheme: (22 commits)
  Check mesh equality on MeshToGridESMFRegridder call (SciTools#138)
  Formalise regridder file format (SciTools#137)
  Fix issue 135 (mesh to grid chunking problems) (SciTools#136)
  Add load/save benchmarks (SciTools#132)
  Regridder load/saving (SciTools#130)
  Update dependencies (SciTools#128)
  Perform scalability for larger grids (SciTools#122)
  Add performance tests (SciTools#117)
  change iris source (SciTools#115)
  Unstructured scheme lazy regridding (with performance tests) (SciTools#111)
  Updating feature branch unstructured_scheme from 44d6048 to head of main, e528cbf
  Add grid to mesh scheme (SciTools#96)
  Unstructured scheme integration test (SciTools#66)
  Updated lockfiles according to branch requirement spec.
  Update Version to v0.1.dev2 (SciTools#59)
  Update version to v0.1.dev1 (SciTools#58)
  Unstructured Scheme - Extra Dims (SciTools#55)
  add __init__ to tests (SciTools#56)
  Unstructured Scheme - Additional Polish (docstrings and test coverage) (SciTools#53)
  Unstructured Scheme - Cube Creation 3D (SciTools#47)
  ...

# Conflicts:
#	benchmarks/benchmarks/ci/esmf_regridder.py
#	benchmarks/benchmarks/generate_data.py
#	requirements/nox.lock/py36-linux-64.lock
#	requirements/nox.lock/py37-linux-64.lock
#	requirements/nox.lock/py38-linux-64.lock
#	requirements/py36.yml
stephenworsley added a commit to stephenworsley/iris-esmf-regrid that referenced this pull request Jan 31, 2022
* unstructured_scheme: (24 commits)
  reset flag (SciTools#145)
  Use more stable version of connectivity indices (SciTools#144)
  Check mesh equality on MeshToGridESMFRegridder call (SciTools#138)
  Formalise regridder file format (SciTools#137)
  Fix issue 135 (mesh to grid chunking problems) (SciTools#136)
  Add load/save benchmarks (SciTools#132)
  Regridder load/saving (SciTools#130)
  Update dependencies (SciTools#128)
  Perform scalability for larger grids (SciTools#122)
  Add performance tests (SciTools#117)
  change iris source (SciTools#115)
  Unstructured scheme lazy regridding (with performance tests) (SciTools#111)
  Updating feature branch unstructured_scheme from 44d6048 to head of main, e528cbf
  Add grid to mesh scheme (SciTools#96)
  Unstructured scheme integration test (SciTools#66)
  Updated lockfiles according to branch requirement spec.
  Update Version to v0.1.dev2 (SciTools#59)
  Update version to v0.1.dev1 (SciTools#58)
  Unstructured Scheme - Extra Dims (SciTools#55)
  add __init__ to tests (SciTools#56)
  ...

# Conflicts:
#	benchmarks/benchmarks/ci/esmf_regridder.py
#	benchmarks/benchmarks/generate_data.py
#	requirements/nox.lock/py36-linux-64.lock
#	requirements/nox.lock/py37-linux-64.lock
#	requirements/nox.lock/py38-linux-64.lock
#	requirements/py36.yml
#	requirements/py37.yml
@trexfeathers trexfeathers mentioned this pull request Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants