From c2e321743919c263a5e180cd2e131aa11fa40544 Mon Sep 17 00:00:00 2001 From: Daniel Vedder <daniel.vedder@idiv.de> Date: Tue, 10 Sep 2024 11:09:04 +0200 Subject: [PATCH] Updated CHANGELOG, added debugging code --- CHANGELOG.md | 3 +++ src/core/input.jl | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9d18b0..5b7ce00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 current working directory. If not, it checks whether it can be reached from the package directory. This makes running simulations easier when Persefone has been installed as a package. +- `simulate()` and `initialise()` now take a `params` keyword argument that can be used to + override parameters from other input sources + ### Deprecated ### Removed diff --git a/src/core/input.jl b/src/core/input.jl index e479b84..7a89f6c 100644 --- a/src/core/input.jl +++ b/src/core/input.jl @@ -97,11 +97,14 @@ function preprocessparameters(settings::Dict{String,Any}, defaultoutdir::String) end # check if input data are present in the working directory or the package directory if !isdir(settings["world.mapdirectory"]) + @warn "$(@param(world.mapdirectory)) not found in current working directory." if isdir(abspath(pkgdir(@__MODULE__), settings["world.mapdirectory"])) settings["world.mapdirectory"] = abspath(pkgdir(@__MODULE__), settings["world.mapdirectory"]) - @debug "Using package directory to load map data: $(settings["world.mapdirectory"])". + @warn "Using package directory to load maps: $(@param(world.mapdirectory))." + #@debug "Using package directory to load map data: $(settings["world.mapdirectory"])". else - Base.error("Couldn't find map directory $(settings["world.mapdirectory"]).") + @warn "Couldn't find maps at $(@param(world.mapdirectory))." + #Base.error("Couldn't find map directory $(settings["world.mapdirectory"]).") #FIXME end end if !isdir(settings["crop.cropdirectory"]) -- GitLab