You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We will still keep the idea that parameter sets are types, and parameters are functions, but we have the problem that in Julia you can't subtype concrete types. So what I was thinking is that we could build our own inheritance system, so the above would generate:
abstract type AbstractParameterSet endstruct Default{FT} <:AbstractParameterSetendstruct Earth{FT} <:AbstractParameterSetendparent(::Earth{FT}) where {FT} =Default{FT}()
and that each parameter would promote if no compatible parameter set was found, e.g.
since calling molmass_ratio(Earth{FT}()) => molmass_ratio(Default{FT}()) => molmass_dryair(Default{FT}()) / molmass_water(Default{FT}()) which would throw an error.
The only other way I can see to do this is to define an abstract type and a struct for every ParameterSet, not dissimilar to what we have now (except that the struct would be part of the repo).
You can also specify the inheritance tree with abstract types and then have a ParameterSet{Earth}, where Earth is a abstract type. Not sure what the best solution here is.
The current package was a stop-gap until we can figure out something more useable.
In the current package we would have a series of .toml files; the first would specify the parameter sets:
the second would specify the parameters:
We will still keep the idea that parameter sets are types, and parameters are functions, but we have the problem that in Julia you can't subtype concrete types. So what I was thinking is that we could build our own inheritance system, so the above would generate:
and that each parameter would promote if no compatible parameter set was found, e.g.
Some open questions:
How to handle derive quantities?
We could allow symbolic expressions, where any non-numeric symbols would be treated as parameters, i.e.
would generate:
How to override parameter values
An experiment would provide their own custom Toml file, which would have a simplified version of the above schema:
How to specify a parameter ensemble?
There are two ways we could do this: the first is an array of tables:
The second is just specifying arrays for the relevant parameters
This would correspond to a
struct
with fields for the ensemble parameters, and the parameter would just access the field:and we would need to store vector of ensemble members somewhere:
How to specify prior distributions?
TBD...
The text was updated successfully, but these errors were encountered: