Takes the output of ReadGrib or DODSGrab and extracts data at a specific point, performing interpolation if required.
Usage
BuildProfile(model.data, lon, lat, spatial.average, points = 4)
Arguments
model.data
Data structure returned by ReadGrib or DODSGrab.
lon
Longitudes of points of interest.
lat
Latitudes of points of interest.
spatial.average
Whether to interpolate data using b-splines to obtain value at the requested point (spatial.average = TRUE) or use the nearest model node (spatial.average = FALSE).
points
How many points to include in the interpolation, will be ignored if spatial.average = FALSE.
Details
It is much more efficient to download a large chunk of data and extract profile points from that as opposed to downloading individual small model chunks in the vicinity of each point of interest.
Value
profile
A list with as many elements as profile points, with fields:
profile$profile.data
A levels x variables x time matrix with data at a specific point