Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisRenchon committed Jun 23, 2024
1 parent e52329e commit 3b13bee
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
30 changes: 24 additions & 6 deletions experiments/standalone/Bucket/global_bucket_function.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ z_0b = FT(1e-3);
ρc_soil = FT(2e6);
τc = FT(3600);
t0 = 0.0;
tf = 7 * 86400;
tf = 1 * 86400; # change back to 7
Δt = 3600.0;

bucket_parameters = BucketModelParameters(FT; albedo, z_0m, z_0b, τc);
Expand Down Expand Up @@ -191,13 +191,31 @@ sol_test = SciMLBase.solve(prob, ode_algo; dt = Δt, callback = diag_cb)

#### ClimaAnalysis ####

# all
simdir = ClimaAnalysis.SimDir(output_dir)
println(summary(simdir))
alpha = get(simdir; short_name = "alpha")
fig = CairoMakie.Figure(size = (400, 600))
viz.plot!(fig, alpha, time = 2 * 86400)
CairoMakie.save(joinpath(output_dir, "alpha.png"), fig)
for short_name in [
"alpha",
"rn",
"tsfc",
"qsfc",
"lhf",
"rae",
"shf",
"vflux",
"rhosfc",
#"tsoil", # 3D
"wsoil",
"wsfc",
"ssfc",
]
var = get(simdir; short_name)
fig = CairoMakie.Figure(size = (400, 600))
viz.plot!(fig, var, time = 1 * 86400)
CairoMakie.save(joinpath(output_dir, "$short_name.png"), fig)
end

# TO DO: this works, but all variables are constant in space.
# Should we use another Bucket experiment?
###########

sol = ClimaComms.@time ClimaComms.device() SciMLBase.solve(
Expand Down
2 changes: 1 addition & 1 deletion src/diagnostics/default_diagnostics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function default_diagnostics(land_model::BucketModel, t_start; output_writer)
"wsoil",
"wsfc",
"ssfc",
]
] # TO DO: would it be helpful to return this list?

default_outputs =
hourly_averages(bucket_diagnostics...; output_writer, t_start)
Expand Down

0 comments on commit 3b13bee

Please sign in to comment.