Skip to content

Commit

Permalink
Merge branch 'master' into scan-metadata-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
brownag authored Sep 19, 2024
2 parents 30bc37f + 902f911 commit cbfa883
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions R/fetchSCAN.R
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,11 @@ fetchSCAN <- function(site.code = NULL, year = NULL, report = 'SCAN', timeseries
return(NULL)
}

## https://github.com/ncss-tech/soilDB/issues/14
## there may be multiple above-ground sensors (takes the first)
## there may be multiple above-ground sensors
if (length(d.cols) > 1 && code %in% c('TAVG', 'TMIN', 'TMAX', 'PRCP', 'PREC',
'SNWD', 'WTEQ', 'WDIRV', 'WSPDV', 'LRADT')) {
message(paste0('multiple sensors per site [site ', d$Site[1], '] ',
paste0(names(d)[d.cols], collapse = ',')))
# use only the first sensor
d.cols <- d.cols[1]
}

# coerce all values to double (avoids data.table warnings)
Expand Down

0 comments on commit cbfa883

Please sign in to comment.