Skip to content

Commit

Permalink
minor edits to biocro module
Browse files Browse the repository at this point in the history
  • Loading branch information
dlebauer committed Feb 20, 2013
1 parent edceb93 commit fe2bb36
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion models/biocro/R/start.runs.BIOCRO.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ start.runs.BIOCRO <- function(runid) {
"' and end_date >= '", end.date,
"' and site_id =", site.id, ";", sep = ""), con = con)

if(nrow(metfiles == 1)){
if(nrow(metfiles) == 1){
weather <- read.csv(file.path(metfiles$file_path, metfiles$file_name), row.names = NULL)
} else {
weather <- InputForWeach(lat, lon, year(start.date), year(end.date))
Expand Down
4 changes: 2 additions & 2 deletions models/biocro/inst/tests/test.pecan.biocro.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@
<met>NULL</met>
</site>
<folder>/tmp/out/run/</folder>
<start.date>2004-01-01 06:00:00</start.date>
<end.date>2005-12-31 05:59:00</end.date>
<start.date>2004-03-01 06:00:00</start.date>
<end.date>2004-07-31 05:59:00</end.date>
<host>
<name>localhost</name>
<rundir>/tmp/out/run/</rundir>
Expand Down
4 changes: 3 additions & 1 deletion models/ed/R/write.configs.ed.R
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,9 @@ remove.config.ED2 <- function(main.outdir = settings$outdir, settings) {
pattern = c('/c.*', '/ED2INc.*'),
recursive=TRUE, full.names = TRUE)

if(length(todelete>0)) file.remove(todelete)
if(length(todelete>0)){
file.remove(todelete)
}
rm(todelete)

## Remove model run configs and model run log files on local/remote host
Expand Down

0 comments on commit fe2bb36

Please sign in to comment.