Skip to content

Commit

Permalink
Fix problems with variables in ag5_extract
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrownf committed Feb 6, 2024
1 parent 2b23d6c commit 355379d
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 40 deletions.
24 changes: 12 additions & 12 deletions R/check_args.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
check_var <- function(x){
valid_variables <- c("Cloud-Cover",
"Precipitation-Rain-Duration-Fraction",
"snow_thickness_lwe",
"Snow-Thickness-LWE",
"Solar-Radiation-Flux",
"Temperature-Air-2m",
"2m_dewpoint_temperature",
"Dew-Point_Temperature-2m",
"Precipitation-Flux",
"solid_precipitation_duration_fraction",
"snow_thickness",
"vapour_pressure",
"10m_wind_speed",
"Precipitation-Solid-Duration-Fraction",
"Snow-Thickness",
"Vapour-Pressure",
"Wind-Speed-10m",
"Relative-Humidity-2m")

if(x %in% valid_variables){
Expand Down Expand Up @@ -69,12 +69,12 @@ check_temp_vars <- function(x){
check_vars_with_stat <- function(x){

vars_with_stat <- c("Temperature-Air-2m",
#"Cloud_Cover",
"snow_thickness_lwe",
"2m_dewpoint_temperature",
"snow_thickness",
"vapour_pressure",
"10m_wind_speed")
"Cloud_Cover",
"Snow-Thickness-LWE",
"Dew-Point_Temperature-2m",
"Snow-Thickness",
"Vapour-Pressure",
"Wind-Speed-10m")

if(x %in% vars_with_stat){
return(TRUE)
Expand Down
28 changes: 14 additions & 14 deletions R/extract.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
#'\itemize{
#'\item "Cloud-Cover"
#'\item "Precipitation-Rain-Duration-Fraction"
#'\item "snow_thickness_lwe"
#'\item "Snow-Thickness-LWE"
#'\item "Solar-Radiation-Flux"
#'\item "Temperature-Air-2m"
#'\item "2m_dewpoint_temperature"
#'\item "Dew-Point_Temperature-2m"
#'\item "Precipitation-Flux"
#'\item "solid_precipitation_duration_fraction"
#'\item "snow_thickness"
#'\item "vapour_pressure"
#'\item "10m_wind_speed"
#'\item "Precipitation-Solid-Duration-Fraction"
#'\item "Snow-Thickness"
#'\item "Vapour-Pressure"
#'\item "Wind-Speed-10m"
#'\item "Relative-Humidity-2m"
#'}
#'
Expand All @@ -53,15 +53,15 @@
#'\item Min-Night-Time}
#'
#'# Variables that require statistic
#'For the following variables, only "24_hour_mean" statistic is available,
#'but should be explicitly indicated.
#'For the following variables, only 24 hour mean statistic is available,
#'but should be explicitly indicated as "Mean".
#'\itemize{
#'\item cloud_cover
#'\item snow_thickness_lwe
#'\item 2m_dewpoint_temperature
#'\item snow_thickness
#'\item vapour_pressure
#'\item 10m_wind_speed
#'\item "Cloud-Cover"
#'\item "Snow-Thickness-LWE"
#'\item "Dew-Point_Temperature-2m"
#'\item "Snow-Thickness"
#'\item "Vapour-Pressure"
#'\item "Wind-Speed-10m"

#'}
#'
Expand Down
28 changes: 14 additions & 14 deletions man/ag5_extract.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 355379d

Please sign in to comment.