Skip to content

Convert SCRIP files to CDF5 format for moab #121

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xylar
Copy link
Collaborator

@xylar xylar commented May 18, 2025

This is more efficient than partitioning them as we did previously.

Copilot summary

This pull request refactors the _build_map function in pyremap/remapper/build_map.py to improve compatibility with MOAB by introducing a new method for converting SCRIP files to CDF5 format and removing the partitioning logic. The most important changes include the addition of a _convert_to_cdf5 function and the removal of the _moab_partition_scrip_file function.

Changes to improve MOAB compatibility:

  • Replaced _moab_partition_scrip_file with _convert_to_cdf5, which converts SCRIP files to the CDF5 format required for MOAB compatibility. This simplifies the workflow by removing partitioning logic and using the ncks tool for file conversion. ([pyremap/remapper/build_map.pyL96-R113](https://github.com/MPAS-Dev/pyremap/pull/121/files#diff-129a160e000bfecfdac3efea475ddcf99d3251f6f295871c3c0cc08f3c5bcdf6L96-R113))
  • Updated _build_map to check the format of source and destination descriptors and invoke _convert_to_cdf5 when the format is not NETCDF3_64BIT_DATA. This ensures compatibility with MOAB while maintaining flexibility for other formats. ([pyremap/remapper/build_map.pyL61-R71](https://github.com/MPAS-Dev/pyremap/pull/121/files#diff-129a160e000bfecfdac3efea475ddcf99d3251f6f295871c3c0cc08f3c5bcdf6L61-R71))

@xylar xylar self-assigned this May 18, 2025
@xylar
Copy link
Collaborator Author

xylar commented May 18, 2025

This isn't working in MOAB for planar meshes in my testing.

@xylar xylar marked this pull request as draft May 18, 2025 10:32
This is more efficient than partitioning them as we did previously.
@xylar xylar force-pushed the streamline-moab branch from 5a434d6 to 2121e22 Compare May 18, 2025 12:39
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

Successfully merging this pull request may close these issues.

1 participant