Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESM15 reconciliation: casa_delsoil phosphorus #283

Closed
rml599gh opened this issue May 3, 2024 · 0 comments · Fixed by #375
Closed

ESM15 reconciliation: casa_delsoil phosphorus #283

rml599gh opened this issue May 3, 2024 · 0 comments · Fixed by #375
Assignees
Labels
priority:high High priority issues that should be included in the next release.

Comments

@rml599gh
Copy link
Contributor

rml599gh commented May 3, 2024

Lines 1446-1466 in casa_cnp.F90, subroutine casa_delsoil includes alternate ifdef ESM15 versions of the calculation of casapool%dPsoillabdt and casapool%dPsoiloccdt.

             casapool%dPsoillabdt(nland)= casaflux%Psnet(nland) + fluxptase(nland)         &
                  + casaflux%Pdep(nland) + casaflux%Pwea(nland)      &
                  - casaflux%Pleach(nland)-casaflux%pupland(nland)   &
!jhan: ESM15 is effectively using xkpsorb**2 - inadvertently?!?!?!?!
#           ifdef ESM15
                  - casabiome%xkpsorb(casamet%isorder(nland))*casaflux%kpsorb(nland)*casapool%Psoilsorb(nland) &
#           else
                  - casaflux%kpsorb(nland)*casapool%Psoilsorb(nland) &
#           endif
                  + casaflux%kpocc(nland) * casapool%Psoilocc(nland)
             ! here the dPsoillabdt =(dPsoillabdt+dPsoilsorbdt)
             ! dPsoilsorbdt  = xdplabsorb
             casapool%dPsoillabdt(nland)  = casapool%dPsoillabdt(nland)/xdplabsorb(nland)
             casapool%dPsoilsorbdt(nland) = 0.0

#           ifdef ESM15
             casapool%dPsoiloccdt(nland) = casabiome%xkpsorb(casamet%isorder(nland))*casaflux%kpsorb(nland)* casapool%Psoilsorb(nland) &
#           else
             casapool%dPsoiloccdt(nland) = casaflux%kpsorb(nland)* casapool%Psoilsorb(nland) &
#           endif
                                         - casaflux%kpocc(nland) * casapool%Psoilocc(nland)

In CABLE2.4 xkpsorb is defined in cableparm as 0.01*deltcasa where deltcasa=1/365. This is used to calculate kpsorb in casa_coeffsoil. In delsoil kpsorb is then multiplied by xkpsorb but now xkpsorb is dependent on soil order with values specified in delsoil in a data statement (ranging from 0.5-0.99). Including the 0.01*deltcasa factor gives a range of 1.37e-5 to 2.71e-5.

In CABLE3 xkpsorb is read in from the pftlookup file and are dependent on soil order AND are consistent with the 0.01*deltcasa factor being included, i.e. xkpsorb ranges from 1.37e-5 to 2.71e-5. In casa_coeffsoil, kpsorb uses the soil order dependent xkpsorb values.

This means that the non-ESM15 version of the code gives the same behaviour as the CABLE2.4 code given appropriate values of xkpsorb in the pftlookup file. The ESM15 versions should be removed as they are inconsistent with how xkpsorb is now input.

@ccarouge ccarouge added the priority:high High priority issues that should be included in the next release. label May 3, 2024
@rml599gh rml599gh self-assigned this Aug 23, 2024
@rml599gh rml599gh linked a pull request Aug 23, 2024 that will close this issue
3 tasks
rml599gh added a commit that referenced this issue Oct 17, 2024
#375)

# CABLE

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

## Description

Removed two ifdef ESM15 cases related to the use of xkpsorb. The ESM15
code option is inconsistent with
how xkpsorb is input in the CABLE3 code.

Fixes #283

## Type of change

- [X ] Bug fix


## Checklist

- [ ] The new content is accessible and located in the appropriate
section.
- [ ] I have checked that links are valid and point to the intended
content.
- [ ] I have checked my code/text and corrected any misspellings

Please add a reviewer when ready for review.



<!-- readthedocs-preview cable start -->
----
📚 Documentation preview 📚:
https://cable--375.org.readthedocs.build/en/375/

<!-- readthedocs-preview cable end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:high High priority issues that should be included in the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants