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

FESOM Regridding #52

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

FESOM Regridding #52

wants to merge 23 commits into from

Conversation

pgierz
Copy link
Member

@pgierz pgierz commented Nov 4, 2024

Summary

@chrisdane wanted FESOM regridding to a regular grid. This PR incorporates pyfesom2 and uses
it's internal tools to convert to a regular grid via nearest neighbor interpolation. You should
specify the grid description (probably best to do this in the inherit section of the config), and add the pipeline
to the steps you want to take. Provides both a step to include in custom pipelines as well as a pre-built pipeline that performs
the regridding step

TODO:

  • Better documentatio
  • test cases with verification

Merge First

Commits:

  • ci: testing now also covers doctests in code
  • wip: fesom regridding, not yet done...
  • wip: removes breakpoint

Copilot Summary

This pull request introduces several significant changes to the codebase, including enhancements to the CI testing workflow, the addition of new submodules and dependencies, and the implementation of new functionalities for FESOM data processing. Below is a summary of the most important changes:

CI Workflow Enhancements:

  • Updated the CI-test.yaml to include verbose output and coverage options for pytest and added doctest modules for the src directory.

Submodules and Dependencies:

  • Added a new submodule for tests/data/test_experiments/piControl_on_PI/mesh/pi in .gitmodules.
  • Introduced a new dependency pyfesom2 under the fesom extra in setup.py.

FESOM Data Processing:

  • Implemented regrid_to_regular function and FESOMRegridPipeline class in src/pymorize/fesom.py for regridding FESOM data to a regular grid.
  • Updated FrozenPipeline and its subclasses in src/pymorize/pipeline.py to use class-level attributes for NAME and STEPS, and refactored the initialization method accordingly. [1] [2] [3] [4]

Test Configuration and Fixtures:

  • Added a new configuration file tests/configs/fesom_pi_mesh_run.yaml for FESOM mesh run tests.
  • Updated tests/conftest.py and added new fixtures in tests/fixtures to support FESOM data tests. [1] [2] [3] [4] [5]
  • Added a unit test for the regrid_to_regular function in tests/unit/test_fesom.py.

@pgierz pgierz self-assigned this Nov 7, 2024
@pgierz
Copy link
Member Author

pgierz commented Nov 7, 2024

Updated CoPilot Summary

This pull request introduces several changes to integrate FESOM (Finite-Element/volumetric Sea-Ice Ocean Model) functionality into the project. The key changes include updates to CI workflows, new dependencies, and the addition of FESOM-specific regridding functionality. Additionally, there are several updates to the testing framework to accommodate the new features.

CI Workflow Enhancements:

  • Added steps to checkout LFS (Large File Storage) files and verify mesh files in the CI workflow (.github/workflows/CI-test.yaml).
  • Updated the package installation command to include the fesom extra dependencies (.github/workflows/CI-test.yaml).

Dependency Management:

  • Added a new submodule for FESOM mesh files in .gitmodules.
  • Added pyfesom2 as a dependency under the fesom extra in setup.py.

New FESOM Functionality:

  • Introduced a new module fesom.py with functions for regridding FESOM data and a new pipeline class FESOMRegridPipeline (src/pymorize/fesom.py).
  • Enhanced the FrozenPipeline class to support named pipelines and steps (src/pymorize/pipeline.py). [1] [2] [3] [4]

Testing Enhancements:

  • Added new test configurations and fixtures for FESOM mesh and output files (tests/configs/fesom_pi_mesh_run.yaml, tests/fixtures/config_files.py, tests/fixtures/configs.py, tests/fixtures/datasets.py). [1] [2] [3] [4] [5]
  • Created unit tests for FESOM functionality (tests/externals/test_pyfesom2.py, tests/unit/test_fesom.py). [1] [2]

@pgierz
Copy link
Member Author

pgierz commented Nov 7, 2024

@pgierz pgierz marked this pull request as ready for review November 7, 2024 16:49
@pgierz pgierz requested a review from chrisdane November 7, 2024 16:49
@pgierz pgierz linked an issue Nov 19, 2024 that may be closed by this pull request
@pgierz pgierz enabled auto-merge January 9, 2025 10:53
@pgierz
Copy link
Member Author

pgierz commented Jan 9, 2025

#77 should go in first and this one should get rewritten.

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.

Remeshing to regular grids
1 participant