Skip to content
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

MPAS to UGRID Conversion #491

Open
philipc2 opened this issue Feb 7, 2023 · 0 comments
Open

MPAS to UGRID Conversion #491

philipc2 opened this issue Feb 7, 2023 · 0 comments

Comments

@philipc2
Copy link

philipc2 commented Feb 7, 2023

We've been looking at adding support for reading in MPAS mesh files in UXarray, with some internal discussion about it here.

Internally, we represent unstructured grids using the UGRID conventions by encoding the input grid at the data loading step. We'd like to support directly converting from MPAS to UGRID.

One workaround I've explored is using the mpas_tools.scrip.from_mpas.scrip_from_mpas() function to first convert from MPAS to SCRIP and then from SCRIP to UGRID, since UXarray currently support converting from SCRIP to UGRID. However, there are a couple comments I'd like to discuss:

NetCDF

  • The current implementation of mpas_tools.scrip.from_mpas.scrip_from_mpas() is written with NetCDF and operates using file paths, meaning that it doesn't plug in nicely with our Xarray-styled code and workflows
  • We are interested in working directly with Xarray.Datasets without writing anything to disk
  • I've converted mpas_tools.scrip.from_mpas.scrip_from_mpas() to use Xarray instead of NetCDF as shown here with some more examples here
  • Would having an equivalent Xarray implementation of these conversion functions be something worth looking more into, especially with the dominance of Xarray in many scientific python workflows.

MPAS to UGRID

  • The solution to reading in MPAS files in UXarray works, but having a direct conversion from MPAS to UGRID would be more ideal
  • Are there any thoughts about implementing a ugrid_from_mpas() or similar function?

We are open to learning more about how we could best leverage the tools here and for any possible collaboration.

Pinging @erogluorhan and @anissa111

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

No branches or pull requests

1 participant