View source: R/new_functions.R
generate_wget | R Documentation |
Generate a bash script that can be run to download data from the Climatology Lab. Currently only TerraClimate is supported.
generate_wget( bbox, layers, startyear, endyear, db = "TerraClimate", writefile = TRUE, directory = "./" )
bbox |
an object of class extent indicating the bounding box, in latitude and longitude, to download (i.e. min and max lon and lat) |
layers |
a character vector indicating which climate/weather layers to download |
startyear |
an integer indicating the first year of data to download |
endyear |
an integer indicating the last year of data to download |
db |
a character vector indicating which database to use; currently only TerraClimate is supported |
writefile |
logical; if TRUE, the resulting bash script is written locally |
directory |
a path to a local directory where the bash script should be written if writefile=TRUE |
If downloading TerraClimate data, layers should correspond to the 17 TerraClimate variables:
aet: Actual Evapotranspiration, monthly total (mm)
def: Climate Water Deficit, monthly total (mm)
pet: Potential evapotranspiration, monthly total (mm)
ppt: Precipitation, monthly total (mm)
q: Runoff, monthly total (mm)
soil: Soil Moisture, total column - at end of month (mm)
srad: Downward surface shortwave radiation (W/m2)
swe: Snow water equivalent - at end of month (mm)
tmax: Max Temperature, average for month (C)
tmin: Min Temperature, average for month (C)
vap: Vapor pressure, average for month (kPa)
ws: Wind speed, average for month (m/s)
vpd: Vapor Pressure Deficit, average for month (kpa)
PDSI: Palmer Drought Severity Index, at end of month (unitless)
if writefile=TRUE, a .sh file in the specified directory; if writefile=FALSE, a character vector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.