this is mostly auxiliary and called from download_chirps_monthly. Uses the function upscale_regular_lon_lat, but derives the weights for upscaling only once for efficiency and avoids simultaneous loading of all CHIRPS data.
upscale_chirps(
update = TRUE,
years = NULL,
months = NULL,
upscale_grid = data.table(expand.grid(lon = seq(GHA_extent()[1], GHA_extent()[2], 0.5),
lat = seq(GHA_extent()[3], GHA_extent()[4], 0.5))),
root_dir = NULL,
version = "UCSB",
us_dir = file.path(root_dir, "upscaled")
)
Nothing.
Logical, if TRUE, files that have already been upscaled are skipped
Which years and months do you want to upscale? NULL upscales everything there is (except if update is TRUE).
A regular lon/lat grid for upscaling. Defaults to half degrees.
directory where the high-resolution file is stored.
Version specifier, should be 'UCSB' or 'ICPAC'. The latter only works if you have access to CHIRPS blended.
Directory where the low-resolution file will be stored.
if(interactive()){
upscale_chirps()
}
Run the code above in your browser using DataLab