Skip to content

Conversation

@dougiesquire
Copy link
Contributor

@dougiesquire dougiesquire commented Jan 20, 2026

This PR removes the static copies of the CESM_share source files from the share/src directory. Instead, these sources are generated at build time from the template *.F90.in files in CESM_share.

The template files are processed using the genf90.pl script, which has been added as a git submodule. Note, genf90.pl is actually already included as a submodule in CDEPS but it felt awkward to me to use that version to process files in CESM_share. Let me know if you disagree and you would prefer to have one less git submodule.

I've checked that this builds locally, but will also spin off some repro tests with ACCESS-OM3 now.

Contributes to #23

@dougiesquire
Copy link
Contributor Author

Testing confirms that this change does not change answers. See linked PRs in ACCESS-NRI/ACCESS-OM3#181

Copy link
Collaborator

@anton-seaice anton-seaice left a comment

Choose a reason for hiding this comment

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

Note, genf90.pl is actually already included as a submodule in CDEPS but it felt awkward to me to use that version to process files in CESM_share

I guess that CESM use the one from CDEPS though right? It's convenient to use the CDEPS one so we don't have to update the genf90 submodule ever?

I am happy enough this builds and doesn't change answers, does it need a review from a CMake person ?

@dougiesquire
Copy link
Contributor Author

Note, the CMake code for preprocessing the templates is loosely based on code from CIME:

@dougiesquire
Copy link
Contributor Author

I guess that CESM use the one from CDEPS though right? It's convenient to use the CDEPS one so we don't have to update the genf90 submodule ever?

It's also in CIME and I think CESM uses that one. I thought that having our own submodule would make it easier to make sure we use the same version as CESM. Although currently CDEPS and CIME have the same version and it doesn't look like the package is updated very often...

@dougiesquire
Copy link
Contributor Author

I am happy enough this builds and doesn't change answers, does it need a review from a CMake person ?

I think I'm comfortable with it - it follows the same approach as CIME. But it's your call really

@anton-seaice
Copy link
Collaborator

I guess that CESM use the one from CDEPS though right? It's convenient to use the CDEPS one so we don't have to update the genf90 submodule ever?

It's also in CIME and I think CESM uses that one. I thought that having our own submodule would make it easier to make sure we use the same version as CESM. Although currently CDEPS and CIME have the same version and it doesn't look like the package is updated very often...

I guess if we end up with a list of where to check dependencies we need to add genf90 ?

@dougiesquire dougiesquire force-pushed the 23-CESM_share-genf90 branch 2 times, most recently from 7a01e7f to 6c8115a Compare January 20, 2026 22:39
@chrisb13
Copy link
Contributor

I guess if we end up with a list of where to check dependencies we need to add genf90 ?

@anton-seaice suggest adding to this then: https://github.com/ACCESS-NRI/access-om3-configs/blob/main/.github/ISSUE_TEMPLATE/upstream-model-component-update-.md
?

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