get_iemre_apsim_met: Get weather data from Iowa Environmental Mesonet Reanalysis

View source: R/get_iemre_apsim_met.R

get_iemre_apsim_metR Documentation

Get weather data from Iowa Environmental Mesonet Reanalysis

Description

Retrieves weather data from Iowa Environmental Mesonet Reanalysis into an APSIM met file

Usage

get_iemre_apsim_met(
  lonlat,
  dates,
  wrt.dir = ".",
  filename = NULL,
  fillin.radn = FALSE
)

Arguments

lonlat

Longitude and latitude vector

dates

date ranges

wrt.dir

write directory

filename

file name for writing out to disk

fillin.radn

whether to fill in radiation data using the nasapower pacakge. Default is FALSE.

Details

The original data can be obtained from: https://mesonet.agron.iastate.edu/iemre/

If the filename is not provided it will not write the file to disk, but it will return an object of class ‘met’. This is useful in case manipulation is required before writing to disk.

Value

returns an object of class ‘met’ and writes a file to disk when filename is supplied.

Note

Multi-year query is not supported for this product.

Examples

## Not run: 
## This will not write a file to disk
iemre <- get_iemre_apsim_met(lonlat = c(-93,42), dates = c("2012-01-01","2012-12-31"))
## Note that solar radiation is not available, but can be filled in
## using the nasapower package
iemre2 <- get_iemre_apsim_met(lonlat = c(-93,42), 
                             dates = c("2012-01-01","2012-12-31"), 
                             fillin.radn = TRUE)
summary(iemre)
summary(iemre2)

## Still it is important to check this object
check_apsim_met(iemre2)

## End(Not run)


apsimx documentation built on Sept. 11, 2024, 5:42 p.m.