ClimaParams.jl icon indicating copy to clipboard operation
ClimaParams.jl copied to clipboard

Add function to check if a specific parameter is used

Open ph-kev opened this issue 1 month ago • 0 comments

In ClimaLand, with the way that ClimaParams is used, there are extraneous parameters that are not used. For example, see the parameters not used for the bucket model.

┌ Warning: Keys are present in parameter file but not used in the simulation. 
│  Typically this is due to a mismatch in parameter name in toml and in source. Offending keys: Any["beta_min", "canopy_momentum_roughness_length", "pmodel_Ha_Vcmax", "kf", "f_over", "moisture_stress_pc", "pmodel_ϕ0_c3", "kd_p2", "z0", "pmodel_ϕ0_c4", "pmodel_ϕa1_c4", "pmodel_bRd", "canopy_height", "plant_S_s", "kn_p2", "RAI", "alpha_0", "moisture_stress_c", "x0", "pmodel_oi", "kappa_p2", "delta_S", "pmodel_ΔHko", "K_sat_plant", "k", "Weibull_c", "SAI", "pmodel_α", "min_kd", "pmodel_ΔHkc", "psi_63", "pmodel_aRd", "pmodel_ϕa0_c3", "pmodel_Kc25", "moisture_stress_sc", "emissivity_bare_soil", "pmodel_ϕa2_c4", "pmodel_Hd_Vcmax", "kn_p1", "pmodel_Γstar25", "pmodel_ϕa1_c3", "pmodel_Ha_Jmax", "delta_alpha", "R_sb", "pmodel_Hd_Jmax", "pmodel_aS_Vcmax", "pmodel_bS_Vcmax", "pmodel_aS_Jmax", "plant_nu", "pmodel_fC3", "a", "pmodel_cstar", "canopy_scalar_roughness_length", "pmodel_ΔHΓstar", "beta_0", "pmodel_bS_Jmax", "pmodel_ϕa2_c3", "ac_canopy", "pmodel_Ko25", "kd_p1", "kp", "beta", "pmodel_β", "pmodel_ϕa0_c4", "kappa_p1", "gamma"]
└ @ ClimaParams ~/.julia/packages/ClimaParams/c6eE0/src/ClimaParams.jl:358

As a result, check_override_parameter_usage cannot be used.

It would be nice to provide another function to check if a specific parameter is used or not. This would be helpful for the land calibration to ensure that the parameters being calibrated are actually being used in the simulation.

ph-kev avatar Oct 20 '25 23:10 ph-kev