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

Support for pbl scheme #66

Merged
merged 6 commits into from
Aug 21, 2024
Merged

Conversation

oelbert
Copy link
Collaborator

@oelbert oelbert commented Aug 20, 2024

Description
This PR adds features needed for the ported PBL scheme. Mostly this means adding relevant namelist switches, but also includes a few useful physics constants and some 4d-field infrastructure

How Has This Been Tested?
The new namelist has been tested with the new PBLConfig in my PySHiELD branch, the 4d field allocator has also been used in the PBL scheme testing.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included

@bensonr
Copy link

bensonr commented Aug 21, 2024

@oelbert - I think we've talked about not wanting to saddle the NDSL with "namelists" for the various components if we can. Will there be a physics/pySHiELD init routine and an init routine for every parameterization? If so, shouldn't this be where the input parameters are encapsulated?


Index3D = Tuple[int, int, int]


def set_4d_field_size(n, dtype):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ping @CharlesKrop, we have a helper function in NDSL to get 4D field types after this PR is merged

Copy link
Collaborator

Choose a reason for hiding this comment

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

for 4D array, do we still keep k as vertical direction? so the verticalLoop node is the same as before, and horizontal execution nodes contain 3d loops?

Copy link
Collaborator

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@fmalatino fmalatino left a comment

Choose a reason for hiding this comment

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

lgtm

@fmalatino fmalatino requested a review from bensonr August 21, 2024 16:57
@oelbert
Copy link
Collaborator Author

oelbert commented Aug 21, 2024

@bensonr the PhysicsConfig dataclass should contain all of the parameters for the physics routines, but each scheme should have a child class that contains the parameters it needs, so there will be a PBLConfig, a MicrophysicsConfig, etc. Right now NDSL still has the infrastructure for parsing the namelists into Pace/PyFV3/PySHiELD, but I'd like to get some of these pjysics schemes in before tackling #64


Index3D = Tuple[int, int, int]


def set_4d_field_size(n, dtype):
Copy link
Collaborator

Choose a reason for hiding this comment

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

for 4D array, do we still keep k as vertical direction? so the verticalLoop node is the same as before, and horizontal execution nodes contain 3d loops?

@FlorianDeconinck
Copy link
Collaborator

@xyuan Data dimensions (anything after I, J, K) are executed serially.

@oelbert oelbert merged commit d0c1703 into NOAA-GFDL:develop Aug 21, 2024
5 checks passed
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.

5 participants