Learn R Programming

MODISSnow (version 0.1.0.0)

download_data: Download MODIS snow cover data (version 6) from the National Snow and Ice Data Center.

Description

download_data is the main function to download a scene given the correct tile, date and satellite.

get_tile is a helper function that actually downloads a tile. Supplied with a correct ftp address and tile the function downloads the MODIS tile, and transforms the coordinate reference system to latlong (EPSG:4326).

Usage

download_data(date, sat = "MYD10A1", h = 10, v = 10, printFTP = FALSE, ...)
get_tile(ftp, tile, progress = FALSE, clean = TRUE)

Arguments

date
Day for which snow data should be downloaded as Date, POSIXct, or POSIXlt.
sat
Satellite mission used. Currently Terra ("MYD10A1") and Aqua ("MOD10A1") are supported.
h
Horizontal tile number, see also details.
v
Vertical tile number, see also details.
printFTP
If TRUE, the FTP address where the data are downloaded is printed.
...
Further arguments passed to get_tile().
ftp
Address of the repository.
tile
Name of the tile.
progress
Indicates whether or not progress is displayed.
clean
Indidcates whether or not temporary files are deleted.

Value

The function returns an object of the class RasterLayer with the following cell values:
  • 0-100 NDSI snow cover
  • 200 missing data
  • 201 no decision
  • 211 night
  • 237 inland water
  • 239 ocean
  • 250 cloud
  • 254 detector saturated
  • 255 fill
but see also the documentation for the NDSI_SNOW_COVER here.

Details

When downloading the data, the correct tile has to be specified. At the moment there is no automated way to find the tile. This means that the user has to consult the MODIS land grid to find the correct tile. Alternatively the MODIS tile calculator may be used.

References

When using the MODIS snow cover data, please acknowledge the data appropriately by
  1. reading the use and copyright
  2. citing the original data: Hall, D. K. and G. A. Riggs. 2016. MODIS/[Terra/Aqua] Snow Cover Daily L3 Global 500m Grid, Version 6. [Indicate subset used]. Boulder, Colorado USA. NASA National Snow and Ice Data Center Distributed Active Archive Center. doi: http://dx.doi.org/10.5067/MODIS/MOD10A1.006. [Date Accessed].

Examples

Run this code
## Not run: 
# # Download MODIS snow data for a central europe h = 18 and v = 5 for the 1 of January 2016
# dat <- download_data(lubridate::ymd("2016-01-01"), h = 18, v = 5)
# class(dat)
# raster::plot(dat)
# ## End(Not run)

Run the code above in your browser using DataLab