Skip to content

Commit

Permalink
Merge pull request #31 from JordiBolibar/main
Browse files Browse the repository at this point in the history
Fix creation of `missing_glaciers.jld` file
  • Loading branch information
JordiBolibar authored Sep 26, 2023
2 parents d498a4b + 36f32ab commit 36ded49
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/glaciers/glacier/glacier2D_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ Keyword arguments
- `params`: `Parameters` object to be passed
"""
function initialize_glaciers(rgi_ids::Vector{String}, params::Parameters; test=false)

# Generate missing glaciers file
missing_glaciers_path = joinpath(params.simulation.working_dir, "data")
if !isdir(missing_glaciers_path)
mkdir(missing_glaciers_path)
end
missing_glaciers = Vector([])
jldsave(joinpath(params.simulation.working_dir, "data/missing_glaciers.jld2"); missing_glaciers)

# Initialize glacier directories
gdirs::Vector{PyObject} = init_gdirs(rgi_ids, params; velocities=params.simulation.velocities)
# Generate raw climate data if necessary
Expand Down

0 comments on commit 36ded49

Please sign in to comment.