Skip to content

Conversation

@jjokella
Copy link
Contributor

@jjokella jjokella commented Nov 20, 2025

During a meeting-discussion ( @Toeroeoe ), it came up that the functionality of setting soil hydraulic parameters from surface files, while used for perturbing the parameters in eCLM-PDAF, is not restricted to eCLM-PDAF.

It can make sense to set soil hydraulic parameters specifically for a standalone eCLM simulation, e.g. when these parameters are known from literature.

Therefore, the #ifdef USE_PDAF statements are removed in src/clm5/biogeophys/SoilStateInitTimeConstMod.F90.

  • arrays for parameter reading are only allocated once the namelist settings are invoked
  • documentation of soil hydraulic parmaters is separated from the PDAF-specific atmospheric forcing noise documentation

Namelist settings

  • soil_hyd_inparm_from_file
  • soil_hyd_inparm_from_file_adj

Documentation

@kvrigor
Copy link
Member

kvrigor commented Nov 21, 2025

is the additional locally allocated memory for the introduced arrays, which will now be allocated for all eCLM simulations, rather than only for eCLM-PDAF simulations.

This could be avoided if extra parameter checking on the surface file (e.g. parameters_in_file) is not used as a switch to use modified soil hydraulic parameters. Perhaps making this as an explicit namelist setting under clm_soilstate_inparm would be better?

character(len=*), parameter :: nl_name = 'clm_soilstate_inparm' ! Namelist name
! MUST agree with name in namelist and read
namelist / clm_soilstate_inparm / organic_frac_squared

This way, additional memory is only allocated, when parameters are
read from file.
@jjokella
Copy link
Contributor Author

I think the namelist setting idea is the correct way to go! I added a implementation.

This way:

  • memory is only allocated if really needed
  • multiple error handling can be inserted
    • only one of the parameter input types can be true
    • all of the parameters have to be in the surface data file

@jjokella jjokella requested a review from kvrigor November 21, 2025 15:39
`soil_hyd_inparm_from_surfdata`
@jjokella jjokella requested a review from kvrigor November 25, 2025 09:13
- separate atmospheric forcing noise and soil hydraulic parameters
- change shp-sections suggesting a PDAF-only usage
`soil_hyd_inparm_from_file[_adj]`
@kvrigor kvrigor linked an issue Nov 25, 2025 that may be closed by this pull request
@jjokella jjokella merged commit 91d5f7b into master Nov 25, 2025
8 checks passed
@jjokella jjokella deleted the dev-shp branch November 25, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handling of Shape Parameter bsw_col in organic matter mixing

3 participants