read.SNODAS: Converts a raw SNODAS file into a georeferenced raster,...

read.SNODASR Documentation

Converts a raw SNODAS file into a georeferenced raster, saving the file if desired,

Description

Converts a raw SNODAS file into a georeferenced raster, saving the file if desired,

Usage

read.SNODAS(
  filename,
  read_path = "./SNODAS/",
  write_file = TRUE,
  write_path = "./SNODAS/",
  write_extension = ".img"
)

Arguments

filename

A character string specifying the .dat file to convert

read_path

A character string specifying the path to the location of filename, with a trailing slash (e.g. './SNODAS/')

write_file

Logical. Should the converted file be written to storage or returned in memory?

write_path

A character string specifying the path to write to, with a trailing slash (e.g. './SNODAS/') Directory will be created if it does not exist.

write_extension

#A character string specifying the file extension to save outputted data. Will be parsed by raster::writeRaster do determine appropriate format (see ?writeRaster for possible formats). Including leading period (e.g. '.img')

Value

If write_file=FALSE, returns a RasterLayer object, otherwise only used for its side effect of writing a raster file to storage.

Examples

read.SNODAS('us_ssmv01025SlL01T0024TTNATS2010022005DP001.dat', read_path='./SNODAStest/')

marinosr/SNODASR documentation built on Aug. 19, 2022, 7:11 p.m.