diff --git a/experiments/AMIP/coupler_driver.jl b/experiments/AMIP/coupler_driver.jl index 6dcc8a03a0..dad289033f 100644 --- a/experiments/AMIP/coupler_driver.jl +++ b/experiments/AMIP/coupler_driver.jl @@ -175,7 +175,7 @@ The data files are downloaded from the `ClimaCoupler` artifacts directory. If th original sources. =# -debug_dir = joinpath(COUPLER_ARTIFACTS_DIR, "debug_output/") +debug_dir = COUPLER_ARTIFACTS_DIR isdir(debug_dir) ? nothing : mkpath(debug_dir) # get the paths to the necessary data files: land-sea mask, sst map, sea ice concentration diff --git a/experiments/AMIP/user_io/debug_plots.jl b/experiments/AMIP/user_io/debug_plots.jl index c84ccf501f..c811697256 100644 --- a/experiments/AMIP/user_io/debug_plots.jl +++ b/experiments/AMIP/user_io/debug_plots.jl @@ -12,8 +12,8 @@ using ClimaCore Plot the fields of a coupled simulation and save plots to a directory. """ function debug(cs::CoupledSimulation, dir = "debug", cs_fields_ref = nothing) - mkpath(dir) - @info "plotting debug in " * dir + # mkpath(dir) + # @info "plotting debug in " * dir for sim in cs.model_sims debug(sim, dir) end @@ -80,7 +80,7 @@ function debug(cs_fields::NamedTuple, dir, cs_fields_ref = nothing) end end Plots.plot(all_plots..., size = (1500, 800)) - Plots.png(joinpath(dir, "debug_coupler")) + Plots.png(dir * "debug_coupler") # plot anomalies if a reference cs.fields, `cs_fields_ref`, are provided if !isnothing(cs_fields_ref) @@ -99,7 +99,7 @@ function debug(cs_fields::NamedTuple, dir, cs_fields_ref = nothing) ) end Plots.plot(all_plots..., size = (1500, 800)) - Plots.png(joinpath(dir, "debug_coupler_amomalies")) + Plots.png(dir * "debug_coupler_amomalies") end end @@ -156,7 +156,7 @@ function debug(sim::ComponentModelSimulation, dir) push!(all_plots, Plots.plot(cpu_field, title = string(field_name) * print_extrema(field))) end fig = Plots.plot(all_plots..., size = (1500, 800)) - Plots.png(joinpath(dir, "debug_$(name(sim))")) + Plots.png(dir * "debug_$(name(sim))") end