This topic captures issues that need addressing in planning CABLE4 coding. Issues could be summarised here as a list of dot points, with further information in separate posts.
In this plan, the development of CABLE4 happens in offline first.
2 code branches problem
CABLE4 will be the merge of two branches of CABLE: main and CABLE-POP_TRENDY. It will also include additional developments. We need to decide when the merge happens and where the developments should be done. Ideally, we do not want to copy new developments to several branches.
Considerations:
- who decides on science changes for the merge?
- Impact on ESM1.6. Is bringing science from CABLE-POP_TRENDY branch in CABLE main desirable for ESM1.6?
- Files reorganisation. CABLE-POP_TRENDY is using an old file organisation, should we refactor the code in that branch first? It is needed before doing the merge and it simplifies things if we need to keep 2 branches for some time.
- Finish BIOS merge first!
- Testing environment:
- POP and biophysics and SLI(?) cases for code coverage of bitwise-comparison when restructuring.
Vegetation distribution
- change PFT distribution we are using to have only one woody vegetation per gridcell. Need to decide how the code enforces this. Do we only consider the woody PFT with the highest fraction in a grid cell? Do we replace the whole area covered by woody PFTs with this one PFT?
- update the vegetation distribution map to use the same in offline and ACCESS
- settle on the source of vegetation map.
We would move to have gridinfo files at the resolution we want to run and the preparation of the vegetation map then becomes a pre-processing step.
- change POP and POPLUC to work with an exogenous vegetation distribution instead of one that is calculated within CABLE. Implement switch to choose between BIOME1 or external distribution.
- BIOME1 information handling: How to get the woody fraction if reading an external vegetation map and not doing
do_climate
?- Need to check the edge cases in the code to see when the
biome
variable (in luc type) is used.
- Need to check the edge cases in the code to see when the
- Any other information that depends on
do_climate
? Only iveg and biome are read from the climate restart
- BIOME1 information handling: How to get the woody fraction if reading an external vegetation map and not doing
POP
This includes work on POP itself.
- conversion of POP state variable from being carbon stocks in each patch/cohort/age class to proportion of total carbon stock in each patch/cohort/age class (will allow easier matching between CASA an POP). Attractive but not necessary, includes risk in doing it.
- creating a POP namelist file should help in reducing the number of hard-coded constants and make experiments easier wrt modifying number of patches and cohorts
- reviewing settings and flags in the POP module. What flags/configurations do we need to keep?
- Tidy up interface CASA / POP: only pass information that is needed.
LUC at the start of year
Because we want the land use information in the output file to be coherent with the other variables output, the LUC calculations should be done at the beginning of year instead of end of year. See slides
Need a better understanding of the output in the coupled model. Tile fraction information of online model is consistent with the land cover that was being used.
How does this work for JULES?
Will POP breaks if it is called on the very first step of a run without information to bring in POP? What climate variables POP depends on? Needs to know the NPP for the previous year and potential stem NPP: could we set these to 0?
Initialisation of land cover.
Do we want it called at the start or the end of the first time step?
CABLE offline working with 27 PFTs
- remove hard-wired vegetation-type and soil-type numbers
- Some are numbers, some are ranges that assume a specific ordering of types.
- Add handling of two tiles for the same type for primary and secondary vegetation.
- Need to decide how to implement this: do we have 2 indexes for the same type? Do we have 2 tiles with the same PFT number and a flag to differentiate primary and secondary?
- what do we want the tiled output to be like? Do we want to output the primary and secondary fractions separately or together?
- Rethink how the tiles are stored? Store all tiles for all gridcells instead of the stric minimum?
Mapping of vegetation types between CABLE (27) and POP (3)
See this post for Ian’s slides on the topic
- reorganise code to run LUC at the start of the year and not the end of the year.
- how to handle cells with no vegetation (lake, ice, bare soil, urban)
- How to map out the 27 tiles to 3 tiles? How to identify secondary/primary? How to aggregate and disaggregate non-woody, vegetated types?
- How to disaggregate rates?
- Deal with fractional vegetated gridcells.
Analytic spinup
- currently not working with phosphorus. It should speed up the spinup significantly if we can get it working.
Analytic solution is wrong when the phosphorus is on (and maybe with nitrogen as well). The fast spinup brings the model to a different “steady” state as running the whole model over long period. The spinup does not bring you closer.
Solution: tinker on how many steps and when we do each step.
Talk to Anna U. about what is going on.
Run a few tests to show what the problem is.
How big of an issue is it going to be for ESM3? Spin up of the ocean is going to be slower anyway.
Having a CABLE-as-ACCESS offline run working is higher priority and can simplify this whole question.
Low priority on the list.
BLAZE
It would be ready to implement, at least in offline.
- How to handle them so we don’t completely remove the feature from the offline code, even if not going into the coupled code.
It will come in part of the merge of BIOS to POP-TRENDY to main.
CROP
- Is CROP in a different branch?
- How to handle them so we don’t completely remove the feature from the offline code, even if not going into the coupled code.
Not ready for main. It will stay in the branch as a source of science for future potential development.
Efficient parallelization for CABLE4
This is already in progress.
- review the entire implementation of MPI to ensure we have efficient parallelization capacity.
- considerations of future development (river routing, lateral flow…)
Testing environment
Do we need one testing environment or do we need different testing for different tasks?
Need a testing configuration with CASA. How do we deal with the restart? In which cases can we start from an old spinup state and in which cases do we need to do a full run.
Interpretation of LUH2.
Consistency issue. Issue with grid cells that are part water/non-vegetated and part vegetated.
Carbon conservation
Pb with thresholds that do not update the fluxes. Do we do something about it? Develop a check on conservation, similar to water and energy balance.
Timelines:
Unlikely to start working on this before January 2025
Formal spinups not starting before 2026.