Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated write.configs.ed to throw an error if revision not specified #3156

Merged
merged 2 commits into from
Apr 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.depends
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $(call depends,models/cable): | .install/base/logger .install/base/utils
$(call depends,models/clm45): | .install/base/logger .install/base/utils
$(call depends,models/dalec): | .install/base/logger .install/base/remote .install/base/utils
$(call depends,models/dvmdostem): | .install/base/logger .install/base/utils
$(call depends,models/ed): | .install/modules/data.atmosphere .install/modules/data.land .install/base/db .install/base/logger .install/base/remote .install/base/settings .install/base/utils
$(call depends,models/ed): | .install/modules/data.atmosphere .install/modules/data.land .install/base/logger .install/base/remote .install/base/settings .install/base/utils
$(call depends,models/fates): | .install/base/logger .install/base/remote .install/base/utils
$(call depends,models/gday): | .install/base/utils .install/base/logger .install/base/remote
$(call depends,models/jules): | .install/modules/data.atmosphere .install/base/logger .install/base/remote .install/base/utils
Expand Down
1 change: 0 additions & 1 deletion models/ed/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Imports:
ncdf4 (>= 1.15),
PEcAn.data.atmosphere,
PEcAn.data.land,
PEcAn.DB,
PEcAn.logger,
PEcAn.remote,
PEcAn.settings,
Expand Down
3 changes: 1 addition & 2 deletions models/ed/R/write.configs.ed.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ write.config.ED2 <- function(trait.values, settings, run.id, defaults = settings
## Edit ED2IN file for runs
revision <- settings$model$revision
if (is.null(revision)) {
model <- PEcAn.DB::db.query(paste("SELECT * FROM models WHERE id =", settings$model$id), params = settings$database$bety)
revision <- model$revision
PEcAn.logger::logger.severe("ED2 model `revision` not specified in PEcAn settings file.")
}
revision <- gsub("^r", "", revision)

Expand Down