-
Notifications
You must be signed in to change notification settings - Fork 19
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
DYAMOND Summer
low-resolution simulation
#3458
base: main
Are you sure you want to change the base?
Conversation
9471246
to
f63259b
Compare
DYAMOND Summer
low-resolution simulation
9241853
to
fbfedb7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add documentation before we start looking at the code?
fbfedb7
to
4b03103
Compare
Provides a method that overwrites initial conditions in instances where initial values are assigned from existing datasets.
4b03103
to
5bd01c6
Compare
(return nothing) | ||
|
||
""" | ||
overwrite_initial_conditions!(initial_condition, Y, thermo_params, config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @Sbozzolo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this function recompuing some hydrostatic balance? This should be mentioned and explained somewhere, otherwise how could people understand what's the point of these lines
ᶜ∂lnp∂z = @. -thermo_params.grav /
(TD.gas_constant_air(thermo_params, TD.PhasePartition(ᶜq_tot)) * ᶜT)
ᶠlnp_over_psfc = zeros(face_space)
Operators.column_integral_indefinite!(ᶠlnp_over_psfc, ᶜ∂lnp∂z)
ᶠp = p_sfc .* exp.(ᶠlnp_over_psfc)
There is no mention anywhere (code, comments, GitHub) of the challanges you were facing and why this code looks like this instead of just reading the pressure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
(return nothing) | ||
|
||
""" | ||
overwrite_initial_conditions!(initial_condition, Y, thermo_params, config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this function recompuing some hydrostatic balance? This should be mentioned and explained somewhere, otherwise how could people understand what's the point of these lines
ᶜ∂lnp∂z = @. -thermo_params.grav /
(TD.gas_constant_air(thermo_params, TD.PhasePartition(ᶜq_tot)) * ᶜT)
ᶠlnp_over_psfc = zeros(face_space)
Operators.column_integral_indefinite!(ᶠlnp_over_psfc, ᶜ∂lnp∂z)
ᶠp = p_sfc .* exp.(ᶠlnp_over_psfc)
There is no mention anywhere (code, comments, GitHub) of the challanges you were facing and why this code looks like this instead of just reading the pressure.
and populates prognostic variables with interpolated values using the `SpaceVaryingInputs` | ||
tool. | ||
""" | ||
function overwrite_initial_conditions!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make this function independent of the parsed_args
?
src/solver/type_getters.jl
Outdated
elseif parsed_args["initial_condition"] in ["DYAMONDSummer"] | ||
return getproperty(ICs, Symbol(parsed_args["initial_condition"]))() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just add DYAMONDSummer
to the list below this
NEWS.md
Outdated
Added functionality to allow initial conditions to be overwritten by | ||
interpolated datasets. Currently supports equilibrium moisture models. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the intent for the function added to be general, or is it only for the dyamond case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @sriharshakandala Do we wish to maintain this overwrite
method for all such future initial condition file-reads? Or is there some way this can be done entirely within the LocalState
prescription to avoid such an overwrite
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this workflow, the user can define a custom overwrite function for each of the supported initial condition types if, for example, they wish to use data from a file for setting up the initial condition.
Currently, this is primarily intended for the DYAMONDSummer
simulation which reads initial condition from file. We are planning to refactor the initial condition prescription to separate out
- Allocation of prognostic variables and
- initialization of prognostic variables
We plan to address this refactoring in a different PR.
@@ -0,0 +1,30 @@ | |||
dt_save_state_to_disk: "Inf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature is not being tested anywere, we should add it to buildkite and maybe add a couple of plots too
function dyamond_summer_artifact_path(; context = nothing) | ||
filename = "DYAMOND_SUMMER_ICS_p98deg.nc" | ||
return joinpath( | ||
@clima_artifact("DYAMOND_SUMMER_ICS_p98deg", context), | ||
filename, | ||
) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a docstring here with a brief description of this artifact, what it contains, and what's used for?
modified: src/initial_conditions/initial_conditions.jl
modified: post_processing/ci_plots.jl
Purpose
Add
DYAMOND Summer
low-resolution simulation.To-do
Content