-
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
TOML schema #58
Comments
What I had been thinking (and is roughly what is implemented in #57) is something like the following: A parameter set file would have the following keys (all are optional unless marked as required)
A parameter is an entry in a table. Each key in the table should be a descriptive but valid Julia symbolic name, e.g.
Additional keys for UQ (e.g. prior distributions, etc) can also be added. We might also be able to add some mechanism for derived parameters, to support things like Examples# default.toml
name = "DefaultParameterSet"
parameters_include = [
"parameters/universal.toml",
"parameters/planet.toml",
] # parameters/universal.toml
[MolarMassConstant]
description = "universal gas constant"
symbol = "R"
units = "J*K^−1*mol^−1"
value = 8.3144598 # custom.toml
name = "CustomParameterSet"
inherits_from = "CLIMAParameters.DefaultParameterSet"
# add new parameter
[parameters.Wobble]
description = "wobble rate"
units = "s^-1"
value = 10.2
[override_values]
MolarMassConstant = 8.5 |
A couple of questions I would like to clarify:
On this last point, depending on how we choose to represent the parameters (#59), it may be helpful to distinguish between information we need to know at compile time (e.g. which parameters are "overrideable"), and information that is only needed at runtime (the actual override values). Also, at one point there was some discussion about having a mechanism to output all the parameter values (both overrides and not) that were used in a given experiment. I'm not sure this is feasible, because there isn't an obvious way to track whether a parameter is "used" in a given experiment, but if you store both the Manifest.toml (which will contain the exact version of CLIMAParameters used), and the override file, you should have all the information to reproduce the exact experiment. |
|
To add to what @odunbar says:
Logging parameters and other model configuration for each run will be extremely important for being able to use the model effectively. This can just consist of a merge of all the parameter files. The way we have done this in the past is to write a log file with configuration information, into which parameter information is written as the parameter files are parsed. |
Still, regarding point 1. I would still argue for just 1 file for now - as this partitioning is maybe not so clear yet until we have everything together. |
Are there any examples of non-float parameters? |
We have used integers in the past, e.g., for different structural choices in parameterization schemes, or to specify the number of updrafts in the EDMF scheme. |
We should have, at minimum, files for
If we make it too monolithic, we create barriers to use for people who do not want to deal with a plethora of, for them, irrelevant parameters. |
Okay, that's helpful to know. For a point of reference, here is what @haakon-e, @costachris and @charleskawczynski had been using in TurbulenceConvection.jl:
|
It would be useful to see more examples of how parameters have been used: if you have any example, please post them here |
Flatter hierarchies may be better. And we do need vector-valued and array-valued parameters (e.g., to specify neural network weights). |
For NN weights, would it be easier to save these to file and just provide the file name to clima as the parameter? |
If the only information it needs to add is the value for each parameter, why would we need to output all the other information (since that is already available in CLIMAParameters)? |
I think there has been a general consensus that we should move to a TOML format. The specifics of how it should be specified in this file need to be clarified.
@odunbar did you have some examples somewhere?
The text was updated successfully, but these errors were encountered: