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

Generic IO for server #2835

Merged
merged 19 commits into from
May 20, 2024
Merged

Generic IO for server #2835

merged 19 commits into from
May 20, 2024

Conversation

bena-nasa
Copy link
Collaborator

@bena-nasa bena-nasa commented May 17, 2024

This makes the server interaction totally generic in the new IO layer for History. Will work for any grid + any ungridded dimensions for any supported type.

Had to make new constructor for array reference. Note the new helper routines are needed and are a bit ugly because this was logic previously stuffed in the grid factory but per @tclune we are trying to avoid a proliferation of methods on the factories. So instead I say, if the grid has 6 tiles I do the messiness needed to the write to our cube format via the server. Still a bit kludgy but I don't see how there wouldn't be a kluge somewhere short of adding the methods that have to do this to the factories or something that is cube specific. This logic is unavoidable somewhere.

At the very least this shows how the actual call to the server can be made to require not a single conditional for rank and type where as the old GriddedIO layer had a if rank==2, if rank==3, and that was it.
This should make writing checkpoints via the server with this layer easy too @pchakraborty

Note I'm also still using a few helper functions in MAPL_Base (MAPL_GridGet and MAPL_GridGetInterior), both are still are needed for basic operations and introspection of grids.

I have confirmed I can write files on the cubed-sphere with this. This just seemed like a good spot to stop and make a PR on a Friday. Obviously more work to do, those helper procedures should be generalized to work with an ESMF Geom, grid specific now, need to work on this. Other details still to implement and units tests needed.

Types of change(s)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Trivial change (affects only documentation or cleanup)

Checklist

  • Tested this change with a run of GEOSgcm
  • Ran the Unit Tests (make tests)

Description

Related Issue

@bena-nasa bena-nasa added 🎁 New Feature This is a new feature 0 Diff The changes in this pull request have verified to be zero-diff with the target branch. 📈 MAPL3 MAPL 3 Related Changelog Skip Skips the Changelog Enforcer labels May 17, 2024
@bena-nasa bena-nasa requested a review from a team as a code owner May 17, 2024 20:29
@bena-nasa bena-nasa requested a review from tclune May 17, 2024 20:29
GeomIO/SharedIO.F90 Outdated Show resolved Hide resolved
GeomIO/SharedIO.F90 Outdated Show resolved Hide resolved
GeomIO/SharedIO.F90 Outdated Show resolved Hide resolved
pfio/ArrayReference.F90 Outdated Show resolved Hide resolved
GeomIO/SharedIO.F90 Outdated Show resolved Hide resolved
GeomIO/SharedIO.F90 Outdated Show resolved Hide resolved
Copy link
Collaborator

@tclune tclune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline comments.

@bena-nasa bena-nasa requested a review from a team as a code owner May 20, 2024 15:45
@bena-nasa bena-nasa requested a review from tclune May 20, 2024 15:45
GeomIO/pFIOServerBounds.F90 Outdated Show resolved Hide resolved
Copy link
Collaborator

@tclune tclune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline

GeomIO/pFIOServerBounds.F90 Show resolved Hide resolved
GeomIO/pFIOServerBounds.F90 Outdated Show resolved Hide resolved
GeomIO/pFIOServerBounds.F90 Outdated Show resolved Hide resolved
GeomIO/pFIOServerBounds.F90 Outdated Show resolved Hide resolved
tclune
tclune previously approved these changes May 20, 2024
GeomIO/pFIOServerBounds.F90 Outdated Show resolved Hide resolved
@tclune tclune merged commit d872d15 into release/MAPL-v3 May 20, 2024
36 checks passed
@tclune tclune deleted the feature/generic_server_io branch May 20, 2024 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 Diff The changes in this pull request have verified to be zero-diff with the target branch. Changelog Skip Skips the Changelog Enforcer 📈 MAPL3 MAPL 3 Related 🎁 New Feature This is a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants