Skip to content

Pull UKMO components from Github#385

Closed
Whyborn wants to merge 17 commits intoapi-v2from
381-pull-UKMO-components-from-github
Closed

Pull UKMO components from Github#385
Whyborn wants to merge 17 commits intoapi-v2from
381-pull-UKMO-components-from-github

Conversation

@Whyborn
Copy link
Copy Markdown
Collaborator

@Whyborn Whyborn commented Feb 17, 2026

With the recent migration of the UKMO model components to Github, we can pull the auxiliary components (GCOM, Casim, Socrates and UKCA) from ACCESS-NRI forks of the codes, instead of the MOSRS mirror.

Tested against the previous release configuration (the one used in the release-n96e configuration) in this PR. Shows bitwise identical results for the first few months in the NetCDF output.

Should we also change the svn location to a git location while we're here?

@Whyborn Whyborn requested review from harshula and penguian February 17, 2026 03:35
@penguian
Copy link
Copy Markdown
Collaborator

Since we will now have the capability to do this for AM3, what is stopping us for doing it for the UM in general (e.g. rAM3, CM3)? Would the general capability need to be documented in a separate issue?

See also #377 which is still using MOSRS.

"jules_rev",
"shumlib_rev",
"socrates_rev")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does removing the "_rev" variants force all builds to use GitHub only? Will MOSRS-based builds still succeed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm genuinely unsure. The logic in the spack package is too hard to follow. The existing AM3 spack.yaml did not specify revisions or variants for these components- did that mean it took the revision from the specified UM revision?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I will do some testing today.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

CI is failing with

Run . /opt/spack/share/spack/setup-env.sh
==> Error: cannot load package 'um' from the 'access.nri' repository: name '_rev_variants' is not defined
==> Created environment default in: /opt/environments/default
==> Activate with: spack env activate default
==> Activated default environment in /opt/environments/default
==> Error: cannot load package 'um' from the 'access.nri' repository: name '_rev_variants' is not defined
Error: Process completed with exit code 1.

It is probably best to revert your removal of the _rev variants so that the remainder of the CI check can proceed.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also, it is may be better to migrate from MOSRS to GitHub gradually. I will need to think of how to do this.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For the UM Spack build, the main configuration elements are the model/*/rose-app.conf files. The Python code for the UM Spack package recipe starts from the appropriate rose-app.conf file corresponding to the version, modifies this config based on the variants provided by the Spack spec, exports the result to corresponding environment variables, and then runs fcm make using fcm-make.cfg. The fcm make run depends only on the environment variables and the contents of fcm-make.cfg. In particular, the config_root_path variable determines where

include = $config_root_path/fcm-make/$platform_config_dir/um-$config_type-$optimisation_level.cfg$config_revision

points to. If (e.g.) config_root_path is left as fcm:um.xm_tr, then fcm make will use the UM trunk from the MOSRS mirror. See #362

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

At this point, I would recommend waiting until I have made the changes needed for #362 to be merged.

Copy link
Copy Markdown
Collaborator

@penguian penguian left a comment

Choose a reason for hiding this comment

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

Is the intent to change all UM builds to use GitHub only, or just the AM3 builds?

@penguian
Copy link
Copy Markdown
Collaborator

If the intent is to change all UM builds, what testing has been done with rAM3?

@Whyborn
Copy link
Copy Markdown
Collaborator Author

Whyborn commented Feb 18, 2026

Is the intent to change all UM builds to use GitHub only, or just the AM3 builds?

I don't see why we wouldn't. I've confirmed bitwise equivalent results for AM3, so we should be able to get the same for other components. What are the advantages to maintaining support for MOSRS components?

If the intent is to change all UM builds, what testing has been done with rAM3?

No testing has been done yet, but we don't need to update its spack-packages version yet.

@Whyborn
Copy link
Copy Markdown
Collaborator Author

Whyborn commented Feb 18, 2026

@penguian Do you know the history as to why GCOM got its own spack package, but the other UKMO components did not e.g. socrates, ukca? Should we be making spack packages for these components?

@penguian
Copy link
Copy Markdown
Collaborator

@Whyborn GCOM is compiled separately as a library. The other "components" are cherry-picked for source code extraction by FCM and are compiled into a monolithic UM executable. Short of re-architecting the other components for standalone build, or refactoring the FCM make so that it works differently from the way it does now, the simplest thing to do was leave the FCM make as-is, and use its features while respecting its limitations.

@penguian
Copy link
Copy Markdown
Collaborator

Is the intent to change all UM builds to use GitHub only, or just the AM3 builds?

I don't see why we wouldn't. I've confirmed bitwise equivalent results for AM3, so we should be able to get the same for other components. What are the advantages to maintaining support for MOSRS components?

At this point, there is no advantage in maintaining MOSRS support. The main "gotcha" that I see coming is that the UKMO builds from UM 14.X GitHub differently from the way that we build from UM 13.X, so when we get to UM 14.X we will probably need to revisit the Spack builds. Hopefully by that stage we can do away with FCM -- but only if FAB works better with GitHub.

It is probably wise to test building with rAM3 now to make sure that we don't have to make changes for rAM3 to work that will affect AM3 as well.

@Whyborn
Copy link
Copy Markdown
Collaborator Author

Whyborn commented Feb 18, 2026

@Whyborn GCOM is compiled separately as a library. The other "components" are cherry-picked for source code extraction by FCM and are compiled into a monolithic UM executable. Short of re-architecting the other components for standalone build, or refactoring the FCM make so that it works differently from the way it does now, the simplest thing to do was leave the FCM make as-is, and use its features while respecting its limitations.

Ah ok, so it's the only one that's a true library.

The main "gotcha" that I see coming is that the UKMO builds from UM 14.X GitHub differently from the way that we build from UM 13.X, so when we get to UM 14.X we will probably need to revisit the Spack builds. Hopefully by that stage we can do away with FCM -- but only if FAB works better with GitHub.

Are we ever planning to upgrade to UM14? Do you think it'd be possible and/or productive to just CMake-ify the UM stack?

@penguian
Copy link
Copy Markdown
Collaborator

As for UM 14 or LFRic, ask @heidinett or Chermell Engel. They might have a better handle on what the Atmosphere WG intends to do with ACCESS-rAM3 in future, vs what ACCESS-NRI is doing to track the progress of Momentum Partnership regional workflows and RAL4. (For example, see https://code.metoffice.gov.uk/trac/rmed/query?group=status&milestone=RAL4 ).

Copy link
Copy Markdown
Collaborator

@penguian penguian left a comment

Choose a reason for hiding this comment

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

Wait for pull request #362.

"jules_rev",
"shumlib_rev",
"socrates_rev")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I will do some testing today.

homepage = "https://code.metoffice.gov.uk/trac/gcom"
svn = "file:///g/data/ki32/mosrs/gcom/main/trunk"

# svn = "file:///g/data/ki32/mosrs/gcom/main/trunk"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If you want to remove a line, just remove it, otherwise explain in the comment why the line is commented out.


# svn = "file:///g/data/ki32/mosrs/gcom/main/trunk"
git = "https://github.com/ACCESS-NRI/gcom"
maintainers("scottwales", "paulleopardi")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should you add yourself to maintainers?

"jules_rev",
"shumlib_rev",
"socrates_rev")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

CI is failing with

Run . /opt/spack/share/spack/setup-env.sh
==> Error: cannot load package 'um' from the 'access.nri' repository: name '_rev_variants' is not defined
==> Created environment default in: /opt/environments/default
==> Activate with: spack env activate default
==> Activated default environment in /opt/environments/default
==> Error: cannot load package 'um' from the 'access.nri' repository: name '_rev_variants' is not defined
Error: Process completed with exit code 1.

It is probably best to revert your removal of the _rev variants so that the remainder of the CI check can proceed.

"jules_rev",
"shumlib_rev",
"socrates_rev")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also, it is may be better to migrate from MOSRS to GitHub gradually. I will need to think of how to do this.

"jules_rev",
"shumlib_rev",
"socrates_rev")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For the UM Spack build, the main configuration elements are the model/*/rose-app.conf files. The Python code for the UM Spack package recipe starts from the appropriate rose-app.conf file corresponding to the version, modifies this config based on the variants provided by the Spack spec, exports the result to corresponding environment variables, and then runs fcm make using fcm-make.cfg. The fcm make run depends only on the environment variables and the contents of fcm-make.cfg. In particular, the config_root_path variable determines where

include = $config_root_path/fcm-make/$platform_config_dir/um-$config_type-$optimisation_level.cfg$config_revision

points to. If (e.g.) config_root_path is left as fcm:um.xm_tr, then fcm make will use the UM trunk from the MOSRS mirror. See #362

"jules_rev",
"shumlib_rev",
"socrates_rev")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

At this point, I would recommend waiting until I have made the changes needed for #362 to be merged.

@penguian
Copy link
Copy Markdown
Collaborator

See #400

@Whyborn
Copy link
Copy Markdown
Collaborator Author

Whyborn commented Mar 17, 2026

Superseded by #400

@Whyborn Whyborn closed this Mar 17, 2026
@Whyborn Whyborn deleted the 381-pull-UKMO-components-from-github branch March 17, 2026 04:47
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.

3 participants