Skip to content

Commit

Permalink
Fix kwargs handling in get_variable()
Browse files Browse the repository at this point in the history
Previously `kwargs` were not always passed through to
`postproc_load_variable()`.
  • Loading branch information
johnomotani committed Feb 22, 2024
1 parent 56e5fdc commit 4122fe2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions moment_kinetics/src/load_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2868,14 +2868,14 @@ end

function get_variable(run_info, variable_name; kwargs...)
if variable_name == "temperature"
vth = postproc_load_variable(run_info, "thermal_speed")
vth = postproc_load_variable(run_info, "thermal_speed"; kwargs...)
variable = vth.^2
elseif variable_name == "collision_frequency"
n = postproc_load_variable(run_info, "density")
vth = postproc_load_variable(run_info, "thermal_speed")
n = postproc_load_variable(run_info, "density"; kwargs...)
vth = postproc_load_variable(run_info, "thermal_speed"; kwargs...)
variable = get_collision_frequency(run_info.collisions, n, vth)
elseif variable_name == "temperature_neutral"
vth = postproc_load_variable(run_info, "thermal_speed_neutral")
vth = postproc_load_variable(run_info, "thermal_speed_neutral"; kwargs...)
variable = vth.^2
elseif variable_name == "sound_speed"
T_e = run_info.composition.T_e
Expand All @@ -2892,7 +2892,7 @@ function get_variable(run_info, variable_name; kwargs...)
cs = get_variable(run_info, "sound_speed"; kwargs...)
variable = upar ./ cs
else
variable = postproc_load_variable(run_info, variable_name)
variable = postproc_load_variable(run_info, variable_name; kwargs...)
end

return variable
Expand Down

0 comments on commit 4122fe2

Please sign in to comment.