Skip to content
Snippets Groups Projects
Commit b94d18d7 authored by Svajunas Plunge's avatar Svajunas Plunge
Browse files

remove caps from headings

parent d86436ab
No related branches found
No related tags found
No related merge requests found
......@@ -113,3 +113,8 @@ remove_tail <- function(f, pattern){
}
return(f)
}
lwr <- function(df){
names(df) <- tolower(names(df))
return(df)
}
......@@ -70,26 +70,27 @@ run_swat_verification <- function(project_path, outputs = c('wb', 'mgt', 'plt'),
} else if(nchar(msg$stderr) == 0) {
model_output <- list()
if ('plt' %in% outputs) {
model_output$hru_pw_day <- read_tbl('hru_pw_day.txt', run_path, 3)
model_output$hru_pw_day <- read_tbl('hru_pw_day.txt', run_path, 3) %>% lwr
}
if ('wb' %in% outputs) {
model_output$basin_wb_day <- read_tbl('basin_wb_day.txt', run_path, 3)
model_output$basin_pw_day <- read_tbl('basin_pw_day.txt', run_path, 3)
model_output$hru_wb_aa <- read_tbl('hru_wb_aa.txt', run_path, 3)
model_output$basin_wb_day <- read_tbl('basin_wb_day.txt', run_path, 3) %>% lwr
model_output$basin_pw_day <- read_tbl('basin_pw_day.txt', run_path, 3) %>% lwr
model_output$hru_wb_aa <- read_tbl('hru_wb_aa.txt', run_path, 3) %>% lwr
tryCatch({
model_output$recall_yr <- read_tbl('recall_yr.txt', run_path, 3)
model_output$recall_yr <- read_tbl('recall_yr.txt', run_path, 3) %>% lwr
},
error = function(e) {
model_output$recall_yr <- NULL
})
}
if ('mgt' %in% outputs) {
model_output$mgt_out <- read_mgt(run_path)
model_output$mgt_sch <- read_sch(run_path)
model_output$mgt_out <- read_mgt(run_path) %>% lwr
model_output$mgt_sch <- read_sch(run_path) %>% lwr
hru_data <- read_tbl('hru-data.hru', run_path, 2)
landuse_lum <- read_tbl('landuse.lum', run_path, 2)
model_output$lum_mgt <- left_join(hru_data, landuse_lum,
hru_data <- read_tbl('hru-data.hru', run_path, 2) %>% lwr
landuse_lum <- read_tbl('landuse.lum', run_path, 2) %>% lwr
model_output$lum_mgt <- left_join(hru_data,
landuse_lum,
by = c("lu_mgt" = 'name')) %>%
distinct() %>%
select(id, topo, hydro, soil, lu_mgt, plnt_com, mgt, tile)
......
citHeader("To cite SWATdoctR in publications use:")
citEntry(
entry = "Manual",
title = 'SWATdoctR: SWAT+ model setup verification tool',
author = 'Christoph Schürz and Svajunas Plunge',
year = '2023',
note = 'R package',
url = 'https://git.ufz.de/schuerz/swatdoctr',
textVersion = paste('Schürz, Christoph and Plunge, Svajunas (2023),',
'R package for SWAT+ model setup verification.',
'URL https://git.ufz.de/schuerz/swatdoctr')
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment