rasterize_SNODAS: Rasterize SNODAS files

View source: R/SNODAS_fun.R

rasterize_SNODASR Documentation

Rasterize SNODAS files

Description

Saves as raster already untarred files in SNODAS directory

Usage

rasterize_SNODAS(
  data_dir = "data",
  out_dir = "data/geo",
  rm_data = TRUE,
  format = c("raster", "GTiff"),
  crop = NULL,
  reproject = NULL,
  method = "ngb",
  verbose = TRUE
)

Arguments

data_dir

⁠[character = "data"]⁠ Directory where ⁠SNODAS_*⁠ folders are located

out_dir

⁠[character = "data"]⁠ Directory where rasters should be saved

rm_data

⁠[logical = TRUE]⁠ Delete untarred files after saving to raster?

format

⁠[character = "raster"]⁠ Output format of raster. Either "raster" (.grd) or "GTiff" (.tif).

crop

⁠[Extent = NULL]⁠ Optional. Extent for cropping Daymet rasters. If NULL (default), no cropping occurs. reproject takes priority over crop if both are specified.

reproject

⁠[Raster* = NULL]⁠ Optional. Raster for reprojecting Daymet rasters. If NULL (default), no reprojection occurs. reproject takes priority over crop if both are specified.

method

⁠[character = "ngb"]⁠ Method used to compute values if reprojecting raster. Either "ngb" or "bilinear". Ignored if reproject is NULL.

verbose

⁠[logical = TRUE]⁠ Determines whether the user will be notified of progress.

Details

Note that if this function exits with an error, it will most likely have already untarred the compressed files that were downloaded. That will typically cause the function rasterize_SNODAS() to fail when run a second time. This is not a desirable outcome, and it is on my to-do list to fix this.

More details required. TBD


bsmity13/snowdl documentation built on Feb. 24, 2024, 9:03 p.m.