ESCOMP / ESCOMP/CTSM

uninitialized errors with fates: get_croot_carbon_patch and dustmod

Open
#2,321 4 comments 1 reaction 1 assignee Claimed by @adrifoster View on GitHub
bug
Dominant language
Fortran
Stars
352
Forks
361
Avg merge
2d 21h
Merged PRs (30d)
7

Description

These routines, get_croot_carbon_patch and get_froot_carbon_patch are found in CNVegetationFacade and called in clm_driver right before CanopyFluxes. These routines are apparently there to calculate the patch level fine-root and coarse root carbon. They are called while fates is active, over fates columns and performing nonsense calculations on probably uninitialized variables:

https://github.com/ESCOMP/CTSM/blob/ctsm5.1.dev163/src/biogeochem/CNVegetationFacade.F90#L1603-L1623

This did generate a fail when I changed the FatesColdSatPhen_prescribed test to use gnu and debug (which catches uninitialized variables): SMS_D_Ld3.f09_g17.I2000Clm51FatesSpCruRsGs.derecho_gnu.clm-FatesColdSatPhen_prescribed

Solution: Simple solution is to not call the routines and block it out from clm_driver, a slightly more elegant and future proofed way would be to filter at the column level inside the routine in case fates is run along side a crop model or something.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.