Helper Function: Get Metadata of Outputs ('A_LEVEL.out', 'T_LEVEL.out')
Source:R/get_output_meta.R
get_output_meta.Rd
Helper Function: Get Metadata of Outputs ('A_LEVEL.out', 'T_LEVEL.out')
Value
returns metainformation list with sublists "general" and "units" of imported 'A_LEVEL.out' or 'T_LEVEL.out' file
Examples
test_file <- function(x) system.file("extdata/model/test", x, package = "kwb.hydrus1d")
alevel <- read_alevel(path = test_file("A_LEVEL.out"))
get_output_meta(alevel)
#> $general
#> NULL
#>
#> $units
#> # A tibble: 10 × 3
#> name col_width unit_general
#> <chr> <int> <chr>
#> 1 time 12 "T"
#> 2 sum_r_top 14 "L"
#> 3 sum_r_root 14 "L"
#> 4 sum_v_top 14 "L"
#> 5 sum_v_root 14 "L"
#> 6 sum_v_bot 14 "L"
#> 7 h_top 11 "L"
#> 8 h_root 11 "L"
#> 9 h_bot 11 "L"
#> 10 a_level 8 ""
#>
tlevel <- read_tlevel(path = test_file("T_LEVEL.out"))
get_output_meta(tlevel)
#> $general
#> # A tibble: 1 × 5
#> description modelstart_datetime unit_L unit_T unit_M
#> <chr> <chr> <chr> <chr> <chr>
#> 1 Flextreat Hydraulic Model 30.6.2022 12:49:10 cm days mmol
#>
#> $units
#> # A tibble: 22 × 4
#> name col_width unit_general unit
#> <chr> <int> <chr> <chr>
#> 1 time 13 T days
#> 2 r_top 13 L/T cm/days
#> 3 r_root 13 L/T cm/days
#> 4 v_top 13 L/T cm/days
#> 5 v_root 13 L/T cm/days
#> 6 v_bot 13 L/T cm/days
#> 7 sum_r_top 13 L cm
#> 8 sum_r_root 13 L cm
#> 9 sum_v_top 13 L cm
#> 10 sum_v_root 13 L cm
#> # ℹ 12 more rows
#>