Export TerraClimate Data
rpygee.RdFilters the TerraClimate dataset for a specific date range and band, calculates the mean, and exports the resulting image to a local GeoTIFF file.
Arguments
- start_date
The start date for filtering data (e.g., '2020-01-01').
- end_date
The end date for filtering data (e.g., '2020-01-31').
- image_band
The specific TerraClimate band to export (e.g., 'tmmx').
- aoi_fc
The Area of Interest as an `ee.FeatureCollection` to clip the data.
- file_path
The full local path, including filename, to save the output .tif file.
- scale
The spatial resolution for the export in meters. Defaults to 4000.
Examples
if (FALSE) { # \dontrun{
# Initialize GEE
py_env_path <- "C:/Users/pulak/anaconda3/envs/maps/python.exe"
activate_rpygee(project_id = "spatialgeography", python_path = py_env_path)
# Define Delhi asset
delhi_asset <- rgee::ee$FeatureCollection("projects/spatialgeography/assets/delhi")
# Export average temperature (tmmx)
rpygee(
start_date = "2020-01-01",
end_date = "2020-12-31",
image_band = "tmmx",
aoi_fc = delhi_asset,
file_path = "output/delhi_terraclimate.tif",
scale = 4000
)
} # }