Learn R Programming

apsimx (version 2.8.0)

get_worldmodeler_apsim_met: 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
)

Value

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

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

Examples

Run this code
if (FALSE) {
## 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)
  }
 }

Run the code above in your browser using DataLab