Skip to content

Commit

Permalink
Fix for Hydrus 1D GUI to correctly read ATMOSPH
Browse files Browse the repository at this point in the history
file (because otherwise it is not correctly shown in GUI)
  • Loading branch information
mrustl committed Jun 18, 2024
1 parent 8711f6b commit 068fbcc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/convert_atmosphere_to_string.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ convert_atmosphere_to_string <- function(
names(atm)[is_short] <- do_pad_short(names(atm)[is_short])
names(atm)[is_long] <- do_pad_long(names(atm)[is_long])

header_text <- kwb.utils::collapsed(names(atm), "")
header_text <- c(names(atm)[!grepl("(cTop|cBot)[2-9][1-9]?[0-9]?", names(atm))], "RootDepth") %>%
do_pad_long() %>%
kwb.utils::collapsed(collapse = "")

body_lines <- apply(atm, 1L, kwb.utils::collapsed, "")

kwb.utils::collapsed(c(header_text, body_lines), "\n")
Expand Down

0 comments on commit 068fbcc

Please sign in to comment.