-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Derived parameters #60
Comments
Thanks Simon, One additional note: we are talking about parameter defaults being defined in terms of other parameter defaults here right? |
We discussed this. There are two classes:
|
(Being able to specify expressions in the TOML file would be nice. But I'm concerned that an attempt of making something maximally flexible delays getting something to work.) |
It could be a functional relationship (see my point 2 above), but that depends on how we implement it. |
An update: given the new proposal, see the comments in the thread of #59. The likely way this would be handled in the proposal is within the struct MicrophysicsComponent
#parameters used directly in Microphysics:
ρ_cloud_ice
r0_ice
me_ice
...
#derived parameters
m0_ice
...
#subcomponents
Thermodynamics
....
end
#Example Constructor
function MicrophysicsComponent(paramset)
#create the derived parameter definitions
m0_ice = /3 * π * paramset.ρ_cloud_ice * paramset.r0_ice^paramset.me_ice
...
new MicrophysicsComponent(ρ_cloud_ice, r0_ice, me_ice, ..., m0_ice, ...)
end On construction of the component function get_ice_stuff(micro::MicrophysicsComponent,...)
return micro.m0_ice, micro.r0_ice
end The different values in |
Currently we many parameters which are defined in terms of others, e.g.
The current TOML format under discussion (#58), this approach will no longer work. There are a couple of options that I can think of:
cc: @odunbar @trontrytel
The text was updated successfully, but these errors were encountered: