SciTools / iris-esmf-regrid

A collection of structured and unstructured ESMF regridding schemes for Iris.
https://iris-esmf-regrid.readthedocs.io/en/latest
BSD 3-Clause "New" or "Revised" License
20 stars 17 forks source link

Error when face node connectivity is not masked #329

Closed stephenworsley closed 3 months ago

stephenworsley commented 11 months ago

Discussed in https://github.com/SciTools-incubator/iris-esmf-regrid/discussions/323

Solution proposed by @trexfeathers here https://github.com/SciTools-incubator/iris-esmf-regrid/discussions/323#discussioncomment-7854481

Add logic to this line of code so that it allows for unmasked arrays:

https://github.com/SciTools-incubator/iris-esmf-regrid/blob/d1f1c8ffb83107fb223688f3e059c624f274d07c/esmf_regrid/experimental/unstructured_regrid.py#L104


Originally posted by **thomaswilder** December 14, 2023 I am attempting to regrid data from an orca025 grid to a rectilinear grid so the orca data can be compared with climatology data e.g. EN.4. I am hoping someone can help me with an error I am receiving when running `rg = MeshToGridESMFRegridder(meshcube, target_cube)` where the error is ``` File "/home/users/twilder/Python/ORCA025/regrid_iris/lib/python3.10/site-packages/esmf_regrid/experimental/unstructured_regrid.py", line 104, in _as_esmf_info elemType = self.fnc.count(axis=1) AttributeError: 'numpy.ndarray' object has no attribute 'count'. Did you mean: 'conj'? ``` The error file is [14520233.err.txt](https://github.com/SciTools-incubator/iris-esmf-regrid/files/13673702/14520233.err.txt) After following [this example](https://scitools-iris.readthedocs.io/en/stable/further_topics/ugrid/other_meshes.html#nemo-data-on-orca-tripolar-grid) on how to create an orca meshcube, I have acquired the following output ``` sea_water_conservative_temperature / (degC) (-- : 1740494) Mesh coordinates: latitude x longitude x Mesh: name unknown location face Cell methods: 0 time: mean (thickness weighted) Attributes: Conventions 'CF-1.6' ``` which is similar to the example in the above link. My target cube takes the form ``` conservative_temperature / (degC) (latitude: 173; longitude: 360) Dimension coordinates: latitude x - longitude - x Scalar coordinates: depth 0.5057600140571594 m ``` Could anyone advise why I am receiving this error, and how i might fix it? Thanks in advance
github-actions[bot] commented 5 months ago

@SciTools-incubator/esmf-regrid-devs This issue is stale due to a lack of activity in the last 180 days. Remove stale label or comment, otherwise this issue will close automatically in 14 days time.

pp-mo commented 3 months ago

385 fixed