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

Toml dict is missing `LH_f0`

Open charleskawczynski opened this issue 3 years ago • 2 comments

ClimaLSM uses LH_f0, this was defined in Planet parameters, and the toml dict is missing it.

charleskawczynski avatar Jun 20 '22 15:06 charleskawczynski

Ah, again this was a derived parameter, I suppose we can define all derived parameters in a distributed fashion?

charleskawczynski avatar Jun 20 '22 15:06 charleskawczynski

https://github.com/CliMA/CloudMicrophysics.jl/blob/5376eab9933bf96ae6c2a1a5330a6d2b37a9ea2d/src/Parameters.jl#L125-L140

I believe this sets the current conventions.

  1. Parameter objects in a package, generally inherit (though not necessarily) parameters from dependent packages.
  2. Derived parameters are functions of the parameter-containing object
  3. Derived parameters in package B and A, add a method to the function definition for set B

I'm ok with the current convention as we have started, by simply transferring the method to PPS LH_f0(ps::PS) = TD.Parameters.LH_f0(thermodynamics_params(ps)) which can be done once per repo, and doesn't need code copying. Note that this does not disallow the choice to reload parameters and define derived parameter functions in a distributed fashion too.

odunbar avatar Jan 25 '23 22:01 odunbar