Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the translation of @helgegoessling routines for spheRlab , which can read the FESOM ascii mesh files, compute a number of useful infos, such as polygon neighborhood info, and save it all as a CDO conform netCDF file.
I'd be happy to get feedback. I realize there is quite some duplication with the normal load_mesh function. I started with the file reading, and at the time I did not think about adding this to pyfesom2, but rather to ocp_tool2. However, I think in pyfesom2 it might be better fitting and available to more users.
Let me know what you think of the style. Functionality seems to work. I'm planning to add some more soon, so that we get a description of the cavity in the netcdf file. That was in fact the reason I started with this.
I tried using dask delayed on another branch: https://github.com/FESOM/pyfesom2/tree/25868585c3972a46db461e003a7334173b43bd96. While it worked, I save virtually no speedup. Which is strange, because I normally get a between x10 and x20, e.g. when loading files in parallel with dask delayed. Maybe too many operations, each of which is not expensive enough in itself?