-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wave Watch III unstructured grid #1084
Comments
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') 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 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. |
Hi @philipc2 , Thanks for this great example ! I'll try to play with it asap. Let me know if you need more information. |
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
|
Can you show me the versions of all of your packages? |
Hi @mickaelaccensi , I tried on pangeo-eosc cloud, https://pangeo-data.github.io/pangeo-eosc/ ( 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. |
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
The text was updated successfully, but these errors were encountered: