diff --git a/CHANGELOG.md b/CHANGELOG.md index a9d18b0df29d45fa82b13bec6b9c2fff70e7037c..5b7ce0062ef1f0004ad86815c06c5b1fd5dd198d 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 e479b844c5826db0b7c404bf69a4ebfd5f058c68..7a89f6ccd4cedfd3c7dec6e4b8aa9f128910b43f 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"])