get_worldmodeler_apsim_met: Obtain a weather APSIM met from the World Modeler database

View source: R/get_worldmodeler_soil_profile.R

get_worldmodeler_apsim_metR Documentation

Obtain a weather APSIM met from the World Modeler database

Description

Retrieves met data from the World Modeler global database and (optionally) saves it to a file

Usage

get_worldmodeler_apsim_met(
  lonlat,
  dates,
  wrt.dir,
  filenames,
  check = FALSE,
  verbose = FALSE
)

Arguments

lonlat

Longitude and latitude vector (e.g. c(-93, 42)) or matrix.

dates

date range (see example for format)

wrt.dir

optional directory where to save a file with ‘met’ extension. If missing it will be written to a temporary directory.

filenames

optional name(s) to be used when saving the file. It should be equal to the number of rows of the input matrix.

check

whether to check the met file

verbose

argument passed to read_apsim_met

Value

it creates a list with objects of class ‘met’. If it fails, then the objects will be of class ‘try-error’.

Examples

## Not run: 
## Get soil profile properties for a single point
  am1 <- get_worldmodeler_apsim_met(lonlat = c(-93, 42), 
                                    dates = c("2010-01-01", "2013-12-31"))
  if(inherits(am1, 'met')){
     plot(am1[[1]], met.var = "rain", cumulative = TRUE)
  }
 
## End(Not run)


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