Skip to content

Conversation

@Whyborn
Copy link
Contributor

@Whyborn Whyborn commented Jan 19, 2026

CABLE

Thank you for submitting a pull request to the CABLE Project.

Description

Merges the src/science/casa-cnp/casa_phenology.F90 file into src/science/casa-cnp/casa_variable.F90. That file already defines the rest of the CASA derived types- there's no reason for it not to define this as well. Also makes the merging with AM3 easier, as it's version of casa_variable.F90 and the offline version will have a unified purpose.

Fixes #674

Type of change

  • Code clean up

Testing

  • Are the changes bitwise-compatible with the main branch? If working on an optional feature, are the results bitwise-compatible when this feature is off? If yes, copy benchcab output showing successful completion of the bitwise compatibility tests or equivalent results below this line.

  • Are the changes non bitwise-compatible with the main branch because of a bug fix or a feature being newly implemented or improved? If yes, add the link to the modelevaluation.org analysis versus the main branch or equivalent results below this line.

Please add a reviewer when ready for review.


📚 Documentation preview 📚: https://cable--676.org.readthedocs.build/en/676/

src/science/casa-cnp/casa_inout.F90
src/science/casa-cnp/casa_param.F90
src/science/casa-cnp/casa_phenology.F90
#src/science/casa-cnp/casa_phenology.F90
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not just kill this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because I think (and I forgot to mention this) I think it will break ESM1.6, when we try to update the CABLE code. There are a number of mentions of phenvariable in the UM7 code- I kept this here for now as a reminder, mainly to myself, that this needs to be addressed in UM7 as well.

Copy link
Collaborator

@JhanSrbinovsky JhanSrbinovsky left a comment

Choose a reason for hiding this comment

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

I do like having a separate module for phenology parameters, in principal phen parameters could be used in the absence of CASA. My bigger concern is that this renders the CABLE in CABLE:main different to that in ESM1.6?

@Whyborn
Copy link
Contributor Author

Whyborn commented Jan 22, 2026

I do like having a separate module for phenology parameters, in principal phen parameters could be used in the absence of CASA.

I can take this avenue as well, it would just require changes on the JULES side, rather than the CABLE side. We either split the phenology type definitions and allocations out of casa_variable.F90 in JULES, or merge the phenology definition into casa_variable.F90 in CABLE. It must be one of these 2 options, I'm happy to do either. Now that I've got my head around how things are put together, I can make the AM3 changes pretty easily.

@JhanSrbinovsky
Copy link
Collaborator

We are far away from incorporating CASA into a JAC framework. This whole AM3 version was in the direction to accomplish that. However, I think that now it might be more prudent to proceed in the direction of staying closer to the ESM1.6 version of CABLE/CASA?

Typically what happens is we do a CMIP using CABLE version X and then for the next 5+ years all research stems from CMIP using CABLE-X. Variation on the code level are much less common than changes in configuration, requested output - and thats if they even run the model again. Probably most common is they just use the CMIP data.

In the meantime CABLE will evolve. I suppose should this be relative to a common CMIP7 version of CABLE? or the ESM/AM3 version? The version of CABLE roughly corresponding to the science/ directory, or what has been included in the library. You have probably noticed that the directory structure of CABLE follows that of JULES. This was a CABLE 3 thing that made the mapping trivial. At that time the UMST were adamant that the code be present in their repo if it was intended to ship with JULES releases. They seem to have changed their position on this. Prior to CABLE 3 there was

offline/
coupled/
core/

We "basically" pulled things out of core/ to create science/ utils/ params/ etc. coupled/ contained a further breakdown of e.g. ESM/ CM2/.

In summary, perhaps WRT to the changes in science/ we should keep them as in ESM1.6. Perhaps stash the AM3 style changes into a branch that we can pick up later if necessary?

@Whyborn
Copy link
Contributor Author

Whyborn commented Jan 22, 2026

I'll do up a PR containing the set of JULES changes required to achieve the same goal as this PR, which is to be able to use the CABLE src/science directory as a drop in for JULES src/science_cable without any changes.

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.

Merging the phenology data type file with casa_variable.F90

3 participants