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

Initial infrastructure #1

Merged
merged 8 commits into from
Oct 19, 2023
Merged

Initial infrastructure #1

merged 8 commits into from
Oct 19, 2023

Conversation

spencerkclark
Copy link
Member

@spencerkclark spencerkclark commented Sep 19, 2023

Summary of changes

This PR adds an initial working prototype of a Python wrapper of SHiELD:

  • 2ab2ff8 adds initial code infrastructure for building SHiELD in a Docker container.
  • 3ff32b7 copies in the code of the current fv3gfs-wrapper in the fv3gfs-fortran repository.
  • 3516098 modifies this code such that we have a minimal working wrapper (with some features which rely on moderate changes to the source code of the base model left to be implemented later).
  • a7db213 adds a basic CircleCI workflow for building the image and running tests within the image.

Changes required to GFDL repositories

There were some minimal changes needed to be made to a couple GFDL-owned repositories:

  • An option for building a static library version of the dynamical core and drivers needed to be added to SHiELD_build (branch), as well as for building all code with the -fPIC flag (needed for building the wrapper).
  • A few containers needed to be marked as public in the atmos_drivers repository (branch) -- literally a one-line change.

These were currently added by pointing the relevant submodules to the appropriate branches on forks. Before merging this PR we should propose / discuss those changes to folks at GFDL and see if we can get those merged into the main public forks first.

Important features currently removed

A few features, which we use in fv3net, were not ported immediately as they require changes to the fortran code, which I prefer to handle on a case-by-case basis. These include:

  • The ability to prescribe radiative fluxes seen by the land surface model.
  • The ability to transform the winds between the A and D grid from Python (note upon further inspection this actually doesn't need any updates to SHiELD, but I'll make this update to the wrapper in a separate PR since this one is already large; see this commit in a branch).
  • The ability to "get" fields from the diagnostics container in the physics.
  • Tests of the ability to prescribe the sea surface temperature from Python (this is handled slightly differently in the SHiELD physics driver so I want to make sure I understand that first).

@spencerkclark spencerkclark force-pushed the prototype branch 8 times, most recently from 2aea9b4 to c8d49c5 Compare September 21, 2023 00:21
@spencerkclark spencerkclark force-pushed the prototype branch 4 times, most recently from 4ad2f91 to 25218ec Compare September 21, 2023 21:24
@spencerkclark spencerkclark force-pushed the prototype branch 4 times, most recently from e3b24d6 to 921c634 Compare September 28, 2023 16:35
@spencerkclark spencerkclark marked this pull request as ready for review September 28, 2023 16:54
wrapper/Makefile Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link

@mcgibbon mcgibbon left a comment

Choose a reason for hiding this comment

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

Nice job!

This will allow us to group all the relevant radiative-flux-override changes
into a single PR.
@spencerkclark
Copy link
Member Author

NOAA-GFDL/SHiELD_build#28 and NOAA-GFDL/atmos_drivers#26 have now been merged, which enables us to pin to commits on the main branches of both of those repos (see 5885352). This PR can now be merged.

@spencerkclark spencerkclark merged commit 361da20 into main Oct 19, 2023
@spencerkclark spencerkclark deleted the prototype branch October 19, 2023 13:20
spencerkclark added a commit that referenced this pull request Nov 2, 2023
This PR ports the wind transformations added in ai2cm/fv3gfs-fortran#345 to SHiELD-wrapper. Conveniently this did not require any updates to SHiELD that were not already present in #1.
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.

2 participants