Get POWER values for a single point or region and create
met file suitable for use in APSIM for
crop modelling; saving it to local disk.
create_met(lonlat, dates, dsn, file_out)
A numeric vector of geographic coordinates for a cell or region entered as x, y coordinates. See argument details for more.
A character vector of start and end dates in that order,
A file path where the resulting text file should be stored.
A file name for the resulting text file, e.g. “Kingsthorpe.met”. A “.met” extension will be appended if given or otherwise specified by user.
A text file in met format saved to local disk for use in APSIM crop modelling.
The weather values from POWER for temperature are 2 metre max and min temperatures, “T2M_MAX” and “T2M_MIN”; radiation, “ALLSKY_SFC_SW_DWN”; and rain, “PRECTOT” from the POWER AG community on a daily time-step.
Further details for each of the arguments are provided in their respective sections following below.
To get a specific cell, 1/2 x 1/2 degree, supply
a length-two numeric vector giving the decimal degree longitude and
latitude in that order for data to download,
lonlat = c(151.81, -27.48).
To get a region, supply a length-four numeric
vector as lower left (lon, lat) and upper right (lon, lat) coordinates,
lonlat = c(xmin, ymin, xmax, ymax) in that order for a
given region, e.g., a bounding box for the southwestern corner of
lonlat = c(112.5, -55.5, 115.5, -50.5). Max
bounding box is 10 x 10 degrees of 1/2 x 1/2 degree data, i.e., 100
points maximum in total.
dates is unspecified,
defaults to a start date of 1983-01-01 (the earliest available data) and an
end date of current date according to the system.
If one date only is provided, it will be treated as both the start date and the end date and only a single day's values will be returned.
create_icasa Create a DSSAT ICASA File from NASA POWER