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

Feature/bmauer/identify vertical coord extdata2g #3434

Merged
merged 47 commits into from
Feb 19, 2025

Conversation

bena-nasa
Copy link
Collaborator

@bena-nasa bena-nasa commented Feb 14, 2025

This is the first PR to get a beta version of proper vertical constituent regridding into ExtData2G. It seemed like it was time for a pause to get this in now that it is getting really big and I have a few cases working.

Basically the idea as follows.
I have redone the detection of the vertical level in the file, and identify it according to CF as either hybrid sigma, fixed pressures/heights etc, or just "simple" coordinate if it doesn't follow either of those according to the letter of CF in new code.

If it is hybrid sigma, then that means there is a surface pressure and ak/bk in the file (note that I'm not entirely satisfied with the format for the file I coded to, I tried to follow CF, but might want to change; see plan at end of issue). I add a new rule, borrowing the original items parameters to read PS like any other item, so it gets regridded, time interpolated etc.
Then after the time interpolation I check if hybrid sigma, then regrid.
This so far has limited functionality and supports regridding from a file on hybrid sigma levels as defined by the CF conventions with a time varying pressure and ak/bk in the file. It only supports constituents in either mass mixing ratios: kg kg-1 or mass per area per second. I.E. kg m-2 s-1. This uses the ppm code (brought a version into MAPL) from FV3 to conservatively regrid and also has corrections at the surface to ensure that mass is conserved.

I can go into greater detail what is being done here if needed.

In addition, in order for this feature to be usable ExtData must import PLE. This can be accomplished using the version Kyle added to the Cap by specify this in the CAP.rc file

CAP_EXPORTS:
PLE,DYN
::

EXTDATA_IMPORTS:
PLE,DYN
::

I have been testing this all along for 0 diff.
This is the first hopefully what will be much more frequent PR's now once this is in. The plan is as follows:

  • Implement Volume mixing regridding mol mol-1 (will require importing Q from model, and reading time varying Q from file), and reading species molecular weight from file.
  • Decide if we are happy with the metadata requirements, it not change it at this step I don’t want to have to change it later. What input types we need to support:
    1. Hybrid sigma levels defined by CF
    2. Fixed levels (either pressure or height) as defined by CF. Can also define edge boundaries via 7.1 of CF convention
  • Add support for hybrid sigma levels with a file containing a time dependent PLE rather than PS/AK/BK
  • Implement fixed pressure level regridding
  • Add support for fixed heights (regrid via ZLE)

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)
  • Refactor (no functional changes, no api changes)

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. labels Feb 14, 2025
@bena-nasa bena-nasa requested a review from a team as a code owner February 14, 2025 20:52
@bena-nasa bena-nasa requested a review from tclune February 14, 2025 20:52
tclune
tclune previously approved these changes Feb 18, 2025
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.

Please answer the one inline question I asked before merging. And the very small suggestion edits. (capitalize params)

And ... you are now not allowed to leave NASA until your knowledge is captured in MAPL3 on this front.

Co-authored-by: Tom Clune <thomas.l.clune@nasa.gov>
@tclune tclune merged commit 836ee3e into develop Feb 19, 2025
48 checks passed
@tclune tclune deleted the feature/bmauer/identify_vertical_coord_extdata2g branch February 19, 2025 16:21
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. 🎁 New Feature This is a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants