Skip to content

Commit

Permalink
remove complete_report attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
albangossard committed Feb 24, 2025
1 parent 219b653 commit 4cd04a9
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 8 deletions.
7 changes: 2 additions & 5 deletions src/parameters/SimulationParameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ struct SimulationParameters{I <: Integer, F <: AbstractFloat} <: AbstractParamet
test_mode::Bool
rgi_paths::Dict{String, String}
ice_thickness_source::String
complete_report::Bool
end


Expand All @@ -39,7 +38,6 @@ end
test_mode::Bool = false,
rgi_paths::Dict{String, String} = Dict{String, String}(),
ice_thickness_source::String = "Farinotti19",
complete_report::Bool = false,
)
Initialize the parameters for a simulation.
Keyword arguments
Expand All @@ -66,15 +64,14 @@ function SimulationParameters(;
test_mode::Bool = false,
rgi_paths::Dict{String, String} = Dict{String, String}(),
ice_thickness_source::String = "Farinotti19",
complete_report::Bool = false,
) where {I <: Integer, F <: AbstractFloat}

@assert ((ice_thickness_source == "Millan22") || (ice_thickness_source == "Farinotti19")) "Wrong ice thickness source! Should be either `Millan22` or `Farinotti19`."

simulation_parameters = SimulationParameters(use_MB, use_iceflow, plots, velocities,
overwrite_climate, use_glathida_data,
float_type, int_type,
tspan, step, multiprocessing, workers, working_dir, test_mode, rgi_paths, ice_thickness_source, complete_report)
tspan, step, multiprocessing, workers, working_dir, test_mode, rgi_paths, ice_thickness_source)

if !ispath(working_dir)
mkpath(joinpath(working_dir, "data"))
Expand All @@ -88,4 +85,4 @@ Base.:(==)(a::SimulationParameters, b::SimulationParameters) = a.use_MB == b.use
a.float_type == b.float_type && a.int_type == b.int_type &&
a.tspan == b.tspan && a.step == b.step && a.multiprocessing == b.multiprocessing &&
a.workers == b.workers && a.working_dir == b.working_dir && a.test_mode == b.test_mode && a.rgi_paths == b.rgi_paths &&
a.ice_thickness_source == b.ice_thickness_source && a.complete_report == b.complete_report
a.ice_thickness_source == b.ice_thickness_source
Binary file modified test/data/params/params_default.jld2
Binary file not shown.
Binary file modified test/data/params/params_specified.jld2
Binary file not shown.
Binary file modified test/data/params/simulation_params_default.jld2
Binary file not shown.
Binary file modified test/data/params/simulation_params_specified.jld2
Binary file not shown.
5 changes: 2 additions & 3 deletions test/params_construction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function params_constructor_specified(; save_refs::Bool = false)
physical_params = PhysicalParameters= 900.0,
g = 9.81,
ϵ = 1e-3,
η₀ = 1.0,
η₀ = 1.0,
maxA = 8e-17,
minA = 8.5e-20,
maxTlaw = 1.0,
Expand All @@ -28,8 +28,7 @@ function params_constructor_specified(; save_refs::Bool = false)
multiprocessing = false,
workers = 10,
working_dir = "",
rgi_paths = rgi_paths,
complete_report = true)
rgi_paths = rgi_paths)

params = Parameters(physical=physical_params,
simulation=simulation_params)
Expand Down

0 comments on commit 4cd04a9

Please sign in to comment.