Draft
Conversation
from TSMP repo, branch `dev-lstda`, commit 143ea800
``` eclm/enkf_clm_mod_5.F90(413): error #6404: This name does not have a type, and must have an explicit type. [T_SKIN] ```
this was wrongly placed outside the condition checking `newgridcell` leading to `obs_index_p` not being set at all, if not at the very first patch.
`clmupdate_T.eq.3`
jjokella
added a commit
to HPSCTerrSys/TSMP2
that referenced
this pull request
Oct 9, 2025
Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
if the absolute value of the increment is larger than clmT_max_increment, use the clmT_max_increment as increment with the sign of the actual increment.
Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
this is the same (TSKIN as first part of the state vector) for each state vector variant of LSTDA
Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Open
Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1. `spval filter on t_veg`: Excludes non-vegetated patches (t_veg = 1e36) from TVEG averaging and updates. Falls back to TSKIN mean for fully non-vegetated gridcells instead of crashing. 2. `Per-column update guard (col_updated)`: Prevents TSOIL increments from being applied multiple times to the same column when multiple patches share it. 3. `NaN check on increment_factor`: Fortran's abs(NaN) < threshold silently evaluates to .false., bypassing the cap. An explicit ieee_is_nan guard leaves the variable unchanged instead. 4. `Temperature clamp [TKFRZ−130, TKFRZ+100]`: Last-resort physical bounds check on all updated temperatures. --------- Co-authored-by: Visakh <visakhraja@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
## Summary Extends the existing `CLM:statevec_max_layer` parameter (previously only active for the SWC state vector) to also cap the number of `t_soisno` layers included in the temperature state vector for `CLM:update_T = 2` and `CLM:update_T = 3`. The effective number of soil layers is now `min(nlevgrnd, CLM:statevec_max_layer)` in both the state vector definition (`define_clm_statevec`) and the collection/distribution routines (`set_clm_statevec_T`, `update_clm_statevec_T`). The local observation dimension (`init_dim_l_clm`) is updated accordingly. ## Motivation For typical LST-DA use cases only the near-surface soil layers are physically meaningful to update. Restricting the state vector depth reduces the ensemble state size and avoids spurious increments in deep layers that are not connected to the LST signal. ## Default behaviour The default value of `CLM:statevec_max_layer` is 25, which equals the number of CLM5 soil layers — so existing configurations are unaffected. --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
`CLM:update_T == 4/5`, see documentation for details --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LST-DA is controlled by
enkfpf.parinputCLM:update_T.