Closed xylar closed 3 years ago
The new masking tools have been tested in both compass and MPAS-Analysis on several machines as detailed below.
The branch https://github.com/xylar/compass/tree/add_python_masks makes use of the new command-line tools for both culling global ocean meshes in mesh
test cases and generating regions masks in files_for_e3sm
test cases. The results show show substantially better performance than has been seen with mpas_tools.mesh.conversion.mask
(which uses MpasMaskCreator.x
), particularly on larger meshes.
Machines and configurations tests:
QU240
, QUwISC240
, EC30to60
, ECwISC30to60
QU240
, QUwISC240
QU240
, QUwISC240
QU240
, QUwISC240
QU240
, QUwISC240
QU240
, QUwISC240
The branch https://github.com/xylar/MPAS-Analysis/tree/use_mpas_tools_python_masks changes MPAS-Analysis to use the new command-line tools to generate regions masks if they aren't already cached for a given mesh. This approach has been tested on several machines:
QU240wLI
, QU480
QU240wLI
, QU480
, WC14to60E2r3
QU480
QU480
@dengwirda, I wanted to make you aware of this work in case it is of use to you. This work replaces nearly every use of MpasMaskCreator.x
or mpas_tools.mesh.conversion.mask()
in my workflows. The only remaining use of mpas_tools.mesh.conversion.mask()
is for creating transport transect masks because the python tool doesn't (yet) produce the edge sign.
I believe you have your own tools for mask creation. It would be great to converge on a set of interoperable tools for masking if possible. But this functionality is needed in compass and MPAS-Analysis urgently enough that I would like to go ahead with what I have for now.
@xylar, great that there's work happening re: the mask creator --- lots of opportunities to improve efficiency I think.
I'm happy to try to merge in various things from the ICoM workflow, I make use of a fast in-polygon routine + sparse-matrix treatments of various MPAS operators to improve algorithmic scaling. The ICoM workflows require keeping track of various additional constraints + non-ocean parts of the mesh, etc though, which may require some thought.
Hi @xylar: I've been using the MpasMaskcreator tool a ton recently, for creating ocean subbasins and new transects for the WC campaign. I would like to test these new tools: should I just call the new functions with a --help
flag to see how to run them?
Thanks for creating these.
@milenaveneziani, I always try to keep the documentation up-to-date: http://mpas-dev.github.io/MPAS-Tools/stable/mesh_conversion.html#mask-creation-with-python-multiprocessing Please let me know if the documentation needs work, though (or submit a PR of your own).
Fantastic. Thanks!
@dengwirda, inpoly
looks really promising! I'll have to take a more careful look. It runs in serial, I assume? If it's fast, I suppose that doesn't matter.
This merge adds 4 functions and corresponding command-line tools for making MPAS region, transect and flood-fill masks and for making lon/lat regions masks:
compute_mpas_region_masks
compute_mpas_transect_masks
compute_mpas_flood_fill_mask
compute_lon_lat_region_masks
The command-line tools will be used by compass as part of generating meshes and by MPAS-Analysis for generating region and transect masks efficiently for large meshes.
closes #321