Skip to content

Add mmm physics as submobule.#233

Open
dustinswales wants to merge 5 commits intoufs-community:gsl/developfrom
dustinswales:hotfix/mmmphys_2_submodule
Open

Add mmm physics as submobule.#233
dustinswales wants to merge 5 commits intoufs-community:gsl/developfrom
dustinswales:hotfix/mmmphys_2_submodule

Conversation

@dustinswales
Copy link
Collaborator

@dustinswales dustinswales commented Mar 18, 2026

This adds mmm_physics as a submodule to the repository.
This is an alternate solution to #231

Future updates to mmm_physics will be handled by updating the submodule hash., just as all other physics submodules. This removes the need for Manage_externals in our fork.

Mandatory Questions

  • Does this PR include any additions or changes to external inputs (e.g., microphysics lookup tables, static data for gravity-wave drag -- things like that)?
    No
  • Does this PR require updating one or more baselines for the CI tests? If so, what?
    No

Priority Reviewers

@guoqing-noaa

@guoqing-noaa
Copy link
Collaborator

@dustinswales @clark-evans
NCAR is working on another route to include checkout_externals inside CMakeLists.txt:
MPAS-Dev#1421

It will be great if we can start the talk about how to efficiently manage the submodules as early as possible. Thanks!

@dustinswales
Copy link
Collaborator Author

@guoqing-noaa Thanks for sharing this.
I worry about having the code checkout step as part of the CMake process (i.e. buildtime).
If the external is not to be developed (e.g., NetCDF), then this is fine from a workflow perspective, but still problematic for operational systems since it's not self-contained.

Using Git submodules gets around all of this, but I will leave it to NCAR.

@clark-evans
Copy link
Collaborator

@dustinswales @clark-evans NCAR is working on another route to include checkout_externals inside CMakeLists.txt: MPAS-Dev#1421

It will be great if we can start the talk about how to efficiently manage the submodules as early as possible. Thanks!

Thanks for pointing us to that new PR, @guoqing-noaa. I'd advocate that we adopt their approach for now. That will reduce merge conflicts when we sync with MPAS-Dev releases and also minimize the amount of additional code we have to manage. I agree that a larger discussion about managing external submodules is warranted in short order. There are many methods for doing so, each with their strengths and weaknesses. I'll be interested in hearing more about their perceptions and needs.

@guoqing-noaa
Copy link
Collaborator

I think we can close PR #231 but pursue the git submodule way in this PR.
And it will not conflict with NCAR's method.

(IMHO, checking out repos at the CMake runtime is not a good way forward).

@guoqing-noaa
Copy link
Collaborator

I suggest we include UGWP as a submodule as well in this PR. Although it does not give us problems at this moment, but always checking out the latest UGWP is NOT what we want and it may cause similar build failures unexpectedly in the future.

@dustinswales
Copy link
Collaborator Author

@guoqing-noaa We have two flavors of UGWP. One is already an MPAS submodule for the ufs-community usage, but is also part of Externals.cfg
Both use the same hash/tag, MPAS_20241223

That's just to say that we don't need to add UGWP submodule, the mmm-physics was the last one not "submodulized".

@guoqing-noaa
Copy link
Collaborator

@guoqing-noaa We have two flavors of UGWP. One is already an MPAS submodule for the ufs-community usage, but is also part of Externals.cfg Both use the same hash/tag, MPAS_20241223

That's just to say that we don't need to add UGWP submodule, the mmm-physics was the last one not "submodulized".

@dustinswales I did not notice this part. Thanks for the information!

Copy link
Collaborator

@guoqing-noaa guoqing-noaa left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks, @dustinswales

Copy link
Collaborator

@clark-evans clark-evans left a comment

Choose a reason for hiding this comment

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

If @AndersJensen-NOAA is OK with it, let's merge so that that Cmake CI tests stop failing because of the updated MMM-Physics version.

@clark-evans
Copy link
Collaborator

@dustinswales can you go ahead and update the version number to v8.3.1-2.20? I don't have write access to your commit/associated fork to do so.

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.

MPAS-Model built through CMake and make may use different codes for physics_mmm and UWGP Cannot build the latest MPAS-Model using CMake

4 participants