Description Usage Arguments Details Value Examples
This function is a computationally efficient way to convert a large-scale GPM-IMERG STFDF (spacetime) object into an xts object, while also truncating the temporal extent to that of the supplied gauge time-series (xts object).
1 |
gpm |
A STFDF (spacetime) object containing the GPM-IMERG spatial information (i.e. grid nodes with attributes) and temporal information (i.e. precipitation time-series for each grid node location). |
gauge.ts |
A zoo object containing the gauge observations. |
This function is a computationally efficient way to convert a large-scale GPM-IMERG STFDF (spacetime) object into an xts object, while also truncating the temporal extent to that of the supplied gauge time-series (xts object).
Object gpm.ts
A zoo, xts object with temporal extent from the start date to the end date of the corresponding gauge zoo object and GPM-IMERG estimates in columns for the GPM grid nodes. To ensure that the temporal extent of gpm.ts equals that of gauge.ts, ensure that gauge.ts has the same time-step length as GPM-IMERG (30-min) and time-stamps coincide.
1 2 3 4 5 6 7 8 9 10 11 | data(gpm.hh.piura) # STFDF object with gpm imerg observations for the Piura region in Peru
gpm <- gpm.hh.piura
data(gauges.hh.piura) # STFDF object with gauge observations for the Piura region in Peru
gauges <- gauges.hh.piura
gauges <- spacetime_gauge(gauges,projection="+proj=longlat +ellps=WGS84 +datum=WGS84", timezone=-5)
gauges <- colocate(gauges,gpm,resolution=0.1,longlat=TRUE)
gauge.sp <- gauges@sp
gpm.sp <- gpm@sp
gauge.ts <- as(gauges[,,1],"xts")
colnames(gauge.ts) <- gauge.sp$estacion
gpm.ts <- gpm2ts(gpm,gauge.ts)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.