Skip to content

Commit 75c244f

Browse files
committed
output debug plots to artifacts dir
1 parent 5896f4f commit 75c244f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

experiments/AMIP/coupler_driver.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ The data files are downloaded from the `ClimaCoupler` artifacts directory. If th
175175
original sources.
176176
=#
177177

178-
debug_dir = joinpath(COUPLER_ARTIFACTS_DIR, "debug_output/")
178+
debug_dir = COUPLER_ARTIFACTS_DIR
179179
isdir(debug_dir) ? nothing : mkpath(debug_dir)
180180

181181
# get the paths to the necessary data files: land-sea mask, sst map, sea ice concentration

experiments/AMIP/user_io/debug_plots.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ using ClimaCore
1212
Plot the fields of a coupled simulation and save plots to a directory.
1313
"""
1414
function debug(cs::CoupledSimulation, dir = "debug", cs_fields_ref = nothing)
15-
mkpath(dir)
16-
@info "plotting debug in " * dir
15+
# mkpath(dir)
16+
# @info "plotting debug in " * dir
1717
for sim in cs.model_sims
1818
debug(sim, dir)
1919
end
@@ -80,7 +80,7 @@ function debug(cs_fields::NamedTuple, dir, cs_fields_ref = nothing)
8080
end
8181
end
8282
Plots.plot(all_plots..., size = (1500, 800))
83-
Plots.png(joinpath(dir, "debug_coupler"))
83+
Plots.png(dir * "debug_coupler")
8484

8585
# plot anomalies if a reference cs.fields, `cs_fields_ref`, are provided
8686
if !isnothing(cs_fields_ref)
@@ -99,7 +99,7 @@ function debug(cs_fields::NamedTuple, dir, cs_fields_ref = nothing)
9999
)
100100
end
101101
Plots.plot(all_plots..., size = (1500, 800))
102-
Plots.png(joinpath(dir, "debug_coupler_amomalies"))
102+
Plots.png(dir * "debug_coupler_amomalies")
103103
end
104104
end
105105

@@ -156,7 +156,7 @@ function debug(sim::ComponentModelSimulation, dir)
156156
push!(all_plots, Plots.plot(cpu_field, title = string(field_name) * print_extrema(field)))
157157
end
158158
fig = Plots.plot(all_plots..., size = (1500, 800))
159-
Plots.png(joinpath(dir, "debug_$(name(sim))"))
159+
Plots.png(dir * "debug_$(name(sim))")
160160

161161
end
162162

0 commit comments

Comments
 (0)