FATES liquid water boundary conditions sometimes include ice
- Dominant language
- Fortran
- Stars
- 352
- Forks
- 361
- Avg merge
- 6d 6h
- Merged PRs (30d)
- 8
Description
### Brief summary of bug
There are two FATES boundary conditions relating to liquid water that that are correctly set in `wrap_btran()` but set to _total_ soil water in `dynamics_driv()`. The incorrect `dynamics_driv()` calls overwrite the correct `wrap_btran()` calls, causing incorrect boundary conditions, but **only in the first timestep of the day**—see where those subroutines are called relative to each other in `clm_drv()`.
(Full disclosure: This bug was identified by Claude during my moss work, but I've traced it myself to check. I've also typed this issue out myself.)
### General bug information
**CTSM version you are using:** ctsm5.4.054
**Does this bug cause significantly incorrect results in the model's science?** Probably not meaningfully so, but answers _are_ affected.
**Configurations affected:**
Science affected in FATES runs with soil ice present:
- **Runs with any PFT that is "stress (hydro) deciduous"** (4 in default FATES parameter file) or "stress (hydro) semi-deciduous" (none).
- Maybe others, but that first one is so important that I don't think it's worth continuing to look for more.
Pure FATES diagnostics affected in any configuration with soil ice present:
- `FATES_MEANLIQVOL_DROUGHTPHEN_PF`
- `FATES_MEANSMP_DROUGHTPHEN_PF`
### Details of bug
#### `bc_in%h2o_liqvol_sl`
"Liquid volume in soil layer (m3/m3)." Set correctly to liquid water in `wrap_btran()`:
https://github.com/ESCOMP/CTSM/blob/dae706a769a04ff13def0a909930c899a265368a/src/utils/clmfates_interfaceMod.F90#L2546
but set to _total_ soil water in `dynamics_driv()`:
https://github.com/ESCOMP/CTSM/blob/dae706a769a04ff13def0a909930c899a265368a/src/utils/clmfates_interfaceMod.F90#L1245-L1247
#### `bc_in%smp_sl`
"Soil suction potential of layers in each site, negative, [mm]." Correctly liquid in `wrap_btran()`:
https://github.com/ESCOMP/CTSM/blob/dae706a769a04ff13def0a909930c899a265368a/src/utils/clmfates_interfaceMod.F90#L2584-L2586
but total in `dynamics_driv()`:
https://github.com/ESCOMP/CTSM/blob/dae706a769a04ff13def0a909930c899a265368a/src/utils/clmfates_interfaceMod.F90#L1262-L1268
Contributor guide
Assessment
This issue has not been assessed yet.