Skip to content

Support Wave Watch III unstructured grid format  #1084

Description

@tinaok

Proposed new feature or change:

Hello UXARRAY community,

The Wave Watch III (WW3) model generates outputs on unstructured grids. Has the UXARRAY community previously worked with WW3 model outputs? If so, could you provide examples of loading and plotting these datasets?

For reference, here's an example WW3 output: RSCD_WW3-RSCD-UG_202301.nc

Thank you for your assistance.
@mickaelaccensi @ardhuin @keewis

Activity

  1. added
    new feature
    on Nov 22, 2024
  2. self-assigned this
    on Nov 22, 2024
  3. moved this from 📚 Backlog to 📝 To-Do in UXarray Developmenton Nov 22, 2024
  4. philipc2 commented on Nov 22, 2024

    @philipc2
    Member

    Hi @tinaok

    Thank you for reaching out! We haven't previously worked with any WW3 model output before, however the dataset that you provided has enough information to create a triangular grid using UXarray.

    import uxarray as ux
    import xarray as xr
    # load an xarray dataset since 
    xrds = xr.open_dataset(r"RSCD_WW3-RSCD-UG_202301.nc")
    
    # face node connectivity (indices of the nodes that make up each face, zero-indexed)
    face_node_connectivity = xrds.tri.data - 1
    node_lon = xrds.longitude.data
    node_lat = xrds.latitude.data
    
    # create a minimal grid from corner nodes and face node connectivity
    uxgrid = ux.Grid.from_topology(face_node_connectivity=face_node_connectivity, node_lon=node_lon, node_lat=node_lat)

    Here's a plot of a region of the grid (1.0 degree bounding circle centered around -5 longitude 50 latitude)

    import holoviews as hv
    out = uxgrid.subset.bounding_circle((-5, 50), r=1.0).plot(backend='matplotlib', width=4000, height=4000, linewidth=1)
    hv.save(out, filename='RSCD-UG.png')

    Image

    All the data variables appear to be mapped to the corners of the triangles. I'll open up a PR for supporting this grid format and also for creating a UxDataset from all the data variables.

    Would you be able to provide any reference visualizations or workflows that I can take a look at? I'd love to put together an example for UXarray.

  5. mickaelaccensi commented on Nov 25, 2024

    @mickaelaccensi

    Hi @philipc2 ,

    Thanks for this great example ! I'll try to play with it asap.
    If you want to look how we do visualization, please look at :
    https://nbviewer.org/urls/gitlab.ifremer.fr/resourcecode/tools/exploratory-data-analysis/-/raw/branch/default/index.ipynb

    Let me know if you need more information.

  6. mickaelaccensi commented on Nov 26, 2024

    @mickaelaccensi

    I'm not able to import uxarray in a fresh new micromamba env due to static TLS error. Do you have any clue ?

    Thanks for your help

    >>> import uxarray as ux
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/uxarray/__init__.py", line 1, in <module>
        from .core.api import open_grid, open_dataset, open_mfdataset
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/uxarray/core/__init__.py", line 1, in <module>
        from .api import open_grid, open_dataset, open_mfdataset
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/uxarray/core/api.py", line 9, in <module>
        from uxarray.grid import Grid
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/uxarray/grid/__init__.py", line 1, in <module>
        from .grid import Grid
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/uxarray/grid/grid.py", line 68, in <module>
        from uxarray.grid.neighbors import (
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/uxarray/grid/neighbors.py", line 8, in <module>
        from sklearn.neighbors import BallTree as SKBallTree
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/sklearn/__init__.py", line 85, in <module>
        from .utils._show_versions import show_versions
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/sklearn/utils/_show_versions.py", line 15, in <module>
        from ._openmp_helpers import _openmp_parallelism_enabled
    ImportError: dlopen: cannot load any more object with static TLS
    
  7. philipc2 commented on Nov 26, 2024

    @philipc2
    Member

    I'm not able to import uxarray in a fresh new micromamba env due to static TLS error. Do you have any clue ?

    Thanks for your help

    >>> import uxarray as ux
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/uxarray/__init__.py", line 1, in <module>
        from .core.api import open_grid, open_dataset, open_mfdataset
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/uxarray/core/__init__.py", line 1, in <module>
        from .api import open_grid, open_dataset, open_mfdataset
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/uxarray/core/api.py", line 9, in <module>
        from uxarray.grid import Grid
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/uxarray/grid/__init__.py", line 1, in <module>
        from .grid import Grid
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/uxarray/grid/grid.py", line 68, in <module>
        from uxarray.grid.neighbors import (
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/uxarray/grid/neighbors.py", line 8, in <module>
        from sklearn.neighbors import BallTree as SKBallTree
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/sklearn/__init__.py", line 85, in <module>
        from .utils._show_versions import show_versions
      File "/home1/datawork/maccensi/micromamba/envs/env_xarray/lib/python3.12/site-packages/sklearn/utils/_show_versions.py", line 15, in <module>
        from ._openmp_helpers import _openmp_parallelism_enabled
    ImportError: dlopen: cannot load any more object with static TLS
    

    Can you show me the versions of all of your packages? conda list or mamba list should work.

  8. moved this from 📝 To-Do to 🏗 In progress in UXarray Developmenton Nov 26, 2024
  9. tinaok commented on Nov 26, 2024

    @tinaok
    Author

    Hi @mickaelaccensi , I tried on pangeo-eosc cloud, https://pangeo-data.github.io/pangeo-eosc/
    just with pip install uxarray on pangeo enviroment it works.

    Image

    ( If we can expose your file in virtual zarr, it should go faster. )

    If you are using datarmor, I think RIC put pangeo enviroment, so if it up to date, you just need to do pip install xarray.

  10. moved this from 🏗 In progress to 📝 To-Do in UXarray Developmenton Apr 15, 2025
  11. changed the title [-]Wave Watch III unstructured grid[/-] [+]Support Wave Watch III unstructured grid format [/+] on Jun 23, 2025
  12. added this to the General I/O milestone on Mar 24, 2026
  13. erogluorhan commented on Oct 27, 2026

    @erogluorhan
    Member

    Hi @tinaok @mickaelaccensi , it's been a while since we last worked on this, and while unfortunately we couldn't make any progress on it in the meantime, we'd like to revisit and do it now. I just wanted to check in with you both first though: Would it still be useful if we created this support in uxarray?

  14. mickaelaccensi commented on Nov 2, 2026

    @mickaelaccensi

    Hi @erogluorhan, for sure it would be very great to have to WW3 unstructured mesh output directly supported with uxarray ! Thanks a lot for your help

  15. erogluorhan commented on Nov 2, 2026

    @erogluorhan
    Member

    Thanks for confirming, @mickaelaccensi ! Perfect, we'll start working on it this iteration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

new feature

Fields

Priority

Medium

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions