cefa_createRawsObject: Obtain RAWS data and create a timeseries object.

View source: R/cefa_createRawsObject.R

cefa_createRawsObjectR Documentation

Obtain RAWS data and create a timeseries object.

Description

Obtains station data from a webservice and converts it into a quality controlled, metadata enhanced "raw" tibble ready for use with all raw_~ functions.

Steps involved include:

  1. download data text

  2. parse data text

  3. standardized names

The columns of the 'data' dataframe include:

  • datetime: UTC datetime of observation

  • temperature: temperature (°C)

  • humidity: average relative humidity (%)

  • windSpeed: average wind speed (m/s)

  • windDirection: average wind direction (°)

  • maxGustSpeed: max gust speed (m/s)

  • maxGustDirection: max gust direction (°)

  • precipitation: precipitation (mm/hr)

  • solarRadiation: solar radiation (W/m^2)

  • fuelMoisture: 10-hour time lag fuel moisture

  • fuelTemperature: NA for FW13 data

Usage

cefa_createRawsObject(
  nwsID = NULL,
  meta = NULL,
  baseUrl = "https://cefa.dri.edu/raws/fw13/",
  verbose = FALSE
)

Arguments

nwsID

Station identifier found in 'meta'.

meta

Tibble of RAWS metadata containing nwsID.

baseUrl

Base URL for data queries.

verbose

Logical flag controlling detailed progress statements.

Value

Timeseries object with 'meta' and 'data'.

References

Program for Climate, Ecosystem and Fire Applications

FW13 Data Format

See Also

cefa_createMeta

cefa_parseData

Examples

## Not run: 
# Fail gracefully if any resources are not available
try({

library(RAWSmet)
setRawsDataDir("~/Data/RAWS")

library(MazamaSpatialUtils)
setSpatialDataDir("~/Data/Spatial")
loadSpatialData("NaturalEarthAdm1.rda")

nws_500726 <- cefa_createRawsObject(nwsID = 500726)

}, silent = FALSE)

## End(Not run)


MazamaScience/RAWSmet documentation built on May 6, 2023, 6:57 a.m.