From edb827a9e618ce5f178d9e475adc3a131dec0bb5 Mon Sep 17 00:00:00 2001 From: jennifer Date: Wed, 16 Aug 2023 12:19:35 -0600 Subject: [PATCH 1/4] Add SNODAS folder with R tutorials --- .../Download_Process_masked_SNODAS_data.Rmd | 214 +++++ .../Download_Process_masked_SNODAS_data.ipynb | 464 +++++++++++ ...ownload_Process_masked_SNODAS_data.nb.html | 775 ++++++++++++++++++ notebooks/SNODAS/img/nsidc_logo.png | Bin 0 -> 17603 bytes 4 files changed, 1453 insertions(+) create mode 100644 notebooks/SNODAS/Download_Process_masked_SNODAS_data.Rmd create mode 100644 notebooks/SNODAS/Download_Process_masked_SNODAS_data.ipynb create mode 100644 notebooks/SNODAS/Download_Process_masked_SNODAS_data.nb.html create mode 100644 notebooks/SNODAS/img/nsidc_logo.png diff --git a/notebooks/SNODAS/Download_Process_masked_SNODAS_data.Rmd b/notebooks/SNODAS/Download_Process_masked_SNODAS_data.Rmd new file mode 100644 index 0000000..3f4b725 --- /dev/null +++ b/notebooks/SNODAS/Download_Process_masked_SNODAS_data.Rmd @@ -0,0 +1,214 @@ +--- +title: "How to download and work with SNDOAS data" +output: html_notebook +--- + +## 1. Tutorial Overview +This notebook demonstrates how to download and unzip masked SNODAS files that are from after October 2013 and select one variable and compile it into a RasterStack for quick visualization and finally save as a .grd file. + +### Credits +This tutorial is based on an R script written in 2021 by Cara Thompson at New Mexico State University and has been converted to a tutorial with some minor additions by Jennifer Roebuck of NSIDC. + +For questions regarding the tutorial or to report problems, please create a new issue in the [NSIDC-Data-Tutorials repo](https://github.com/nsidc/NSIDC-Data-Tutorials/issues) + +### Learning Objectives + +By the end of this demonstration you will be able to: +1. Download and unzip masked SNODAS files +2. Convert the files to .bil format and put them in a RasterStack +3. Quickly visualize the rasters of the data +4. Save the RasterStack as .grd file + +### Prerequisites +1. The following libraries should already be installed: R.utils, rvest, dplyr, raster, sp, maptools, and data.table. + + +### Time requirement +Allow approximately 20 minutes to complete this tutorial. + +## 2. Tutorial steps + +### Load necessary libraries +```{r} +library(R.utils) +library(rvest) +library(dplyr) +library(raster) +library(sp) +library(maptools) +library(data.table) +``` + +### Download SNODAS data +We will download all the SNODAS masked files for June 2023. If you wish to download masked files from a different time period you can modify the path in the url variable below. + +```{r} +# set the URL for the SNODAS directory we want to download files from +url <- "https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun" + +# read html content from url +page <- read_html(url) + +# Get a list of the files listed in the directory at this url +files <- page %>% html_nodes("a") %>% html_attr("href") + +for(i in 2:length(files)){ + # generate the url for each of the files + u <- paste(url,files[i], sep="/") + # download each of the files + download.file(u,files[i], mode = "wb") +} +``` + +We will save the working directory path to a variable. +```{r} +WD <- getwd() +``` + +### Read in the SNODAS files +Next, we read in the .tar files as a list containing .tar +```{r} +files_1 <- list.files(path = WD, pattern = "*.tar", full.names = T, recursive = T) +``` + +Decompress the .tar files into the working directory +```{r} +asd <- sapply(files_1, untar) +``` + +### Select the variable we wish to use +There are eight parameters from SNODAS, each has an associated ID code which is used the filename. A full description of the ID codes can be found in Table 1 of the [SNODAS user guide](https://nsidc.org/sites/default/files/g02158-v001-userguide_2_1.pdf). We will choose one of the parameters to compile all the files related to this parameter. + +We can uncomment one of the variables below that corresponds to the parameter we are interested in. In this tutorial we will use the snow depth parameter as an example. + +```{r} +id_code = "us_ssmv11036tS" # Snow Depth +#id_code = "us_ssmv11034tS" # SWE +#id_code = "us_ssmv11044bS" # Snow melt runoff at base of snow pack +#id_code = "us_ssmv11050IL00" # Sublimation from the snow pack +#id_code = "us_ssmv11039IL00" # sublimation of blowing snow +#id_code = "us_ssmv11038wS" # snow pack average temperature +#id_code = "us_ssmv01025SIL01" # Solid precipitation +#id_code = "us_smsv01025SIL00" # Liquid precipitation +``` + +Now we will compile all the files that contain this id_code in the filename i.e. a .dat.gz file and .txt.gz file for each day of data that we downloaded. + +```{r} +files_2 <- list.files(path = WD, pattern = id_code, full.names = T, recursive = T) +files_2 +``` + +Decompress all the .gz files. +```{r} +dcompSD <- sapply(files_2, gunzip, remove=T) +``` + +We will create a new directory for these uncompressed files and move them over. +```{r} +dir.create("Snow Depth") +file.copy(dcompSD, "Snow Depth") +``` + +### Convert the .dat files to .bil +Next we need to convert the .dat files to .bil so they can be read as rasters. + +```{r} +files <- list.files(path=paste(WD,"/Snow Depth",sep=""), pattern="*.dat", full.names = T) +newfiles <- gsub(".dat$", ".bil", files) +file.rename(files, newfiles) +newfiles +``` + +### Create a text file header for each file +Now we will create a corresponding text header file for each .bil file using the associated .txt file that was downloaded. + +**Please note** that the parameters used in the m_post_2013 variable below are specific to SNODAS masked files for October 2013 onwards. If you wish to process masked files prior to October 2013 then you would need to change ulxmap and ulymap to the following: +ulxmap -124.72958333333334 +ulymap 52.870416666666664 + +If you wish to process unmasked files prior to October 2013 then you would need to change nrow, ncols, ulxmap and ulymap to the following: +nrows 4096 +ncols 8192 +ulxmap -130.51291666666665 +ulymap 58.228750000000005 + +If you wish to process unmasked files from October 2013 onwards then you would need to change the nrows, ncols, ulxmap and ulymap to the following: +nrows 4096 +ncols 8192 +ulxmap -130.51250000000002 +ulymap 58.229166666666664 +```{r} + +mylist<- list.files(path=paste(WD,"/Snow Depth",sep=""), pattern = "*.bil", full.names = T) +m_post_2013<-"SNODAS Snow Depth Description = +nrows 3351 +ncols 6935 +nbands 1 +nbits 16 +pixeltype signedint +byteorder M +layout dat +ulxmap -124.72916666666667 +ulymap 52.87083333333334 +xdim 0.00833333333 +ydim 0.00833333333 +pixeltype SIGNEDINT +nodata -9999" + + +mylist.hdr<-paste(mylist,".hdr",sep="") + +for(i in mylist.hdr) { + write(m_post_2013,i) +} + +``` + +Change the file type of the header text files from .bil.hdr to .hdr since the .bil file is already separate. + +```{r} +files4 <- list.files(path=paste(WD,"/Snow Depth",sep=""), pattern="*.bil.hdr", full.names = T) +newfiles <- gsub(".bil.hdr$", ".hdr", files4) +file.rename(files4, newfiles) +newfiles +``` + +### Create a RasterStack of all the rasters +Create a RasterStack of all the snow depth raster files. +```{r} +list.ras <- list.files(path=paste(WD,"/Snow Depth",sep=""), pattern = ".bil", full.names = T) +list.ras +ras_stack <- stack(list.ras) +ras_stack +``` + +### Plot RasterStack +Now we define a projection for the RasterStack and plot each of the rasters (must be in the format of what it is in, not what you want it to be). Please note that SNODAS data are point estimates in latitude/longitude coordinates with the horizontal datum WGS 84 thus the decision to project the data and the choice of projection is up to the user. In this tutorial we will use Geographic longitude/latitude. + +```{r} +crs.geo <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84") +proj4string(ras_stack) <- crs.geo +ras_stack +plot(ras_stack) +``` + +### Save RasterStack +Save the RasterStack to a new directory. We will write in the "raster"/native format to preserve layer names (i.e. dates). There is no attribute table because there is only one attribute per file (snow depth in mm). + +```{r} +#create a new directory Rasters +dir.create(paste(WD,"/Snow Depth","/Rasters",sep="")) +fp <- paste(WD,"/Snow Depth","/Rasters",sep="") +#save the RasterStack as a .grd file +writeRaster(ras_stack,filename=file.path(fp,"ras_stack.grd"), format="raster", progress="text", options=c("INTERLEAVE=BAND","COMPRESS=LZW")) + +``` + +## 3. Learning outcomes recap + +We have learned how to: +1. Download and unzip masked SNODAS files +2. Convert the files to .bil format and put them in a raster stack +3. Quickly visualize the rasters of the data +4. Save the raster stack as .grd file \ No newline at end of file diff --git a/notebooks/SNODAS/Download_Process_masked_SNODAS_data.ipynb b/notebooks/SNODAS/Download_Process_masked_SNODAS_data.ipynb new file mode 100644 index 0000000..8ff03aa --- /dev/null +++ b/notebooks/SNODAS/Download_Process_masked_SNODAS_data.ipynb @@ -0,0 +1,464 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "c0b71b3c", + "metadata": {}, + "source": [ + "
\n", + "\n", + "\n", + "# How to download and work with SNODAS data\n", + "\n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "c55a92ad", + "metadata": {}, + "source": [ + "## 1. Tutorial Overview \n", + "This notebook demonstrates how to download and unzip masked SNODAS files that are from after October 2013 and select one variable and compile it into a RasterStack for quick visualization and finally save as a .grd file.\n", + "\n", + "### Credits\n", + "This tutorial is based on an R script written in 2021 by Cara Thompson at New Mexico State University and has been converted to a tutorial by Jennifer Roebuck of NSIDC.\n", + "\n", + "For questions regarding the tutorial or to report problems, please create a new issue in the [NSIDC-Data-Tutorials repo](https://github.com/nsidc/NSIDC-Data-Tutorials/issues)\n", + "\n", + "### Learning Objectives\n", + "\n", + "By the end of this demonstration you will be able to:\n", + "1. Download and unzip masked SNODAS files\n", + "2. Convert the files to .bil format and put them in a RasterStack\n", + "3. Quickly visualize the rasters of the data\n", + "4. Save the RasterStack as .grd file\n", + "\n", + "### Prerequisites\n", + "1. The following libraries should already be installed: R.utils, rvest, dplyr, raster, sp, maptools, and data.table.\n", + "\n", + "\n", + "### Time requirement\n", + "Allow approximately 20 minutes to complete this tutorial." + ] + }, + { + "cell_type": "markdown", + "id": "f8733fb0", + "metadata": {}, + "source": [ + "## 2. Tutorial steps \n", + "\n", + "### Load necessary libraries" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "69083e0b", + "metadata": {}, + "outputs": [], + "source": [ + "library(R.utils)\n", + "library(rvest)\n", + "library(dplyr)\n", + "library(raster)\n", + "library(sp)\n", + "library(maptools)\n", + "library(data.table)" + ] + }, + { + "cell_type": "markdown", + "id": "034f3efa", + "metadata": {}, + "source": [ + "### Download SNODAS data\n", + "We will download all the SNODAS masked files for June 2023. If you wish to download masked files from a different time period you can modify the path in the url variable below. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9c7dc73f", + "metadata": {}, + "outputs": [], + "source": [ + "# set the URL for the SNODAS directory we want to download files from\n", + "url <- \"https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun\" \n", + "\n", + "# read html content from url\n", + "page <- read_html(url)\n", + "\n", + "# Get a list of the files listed in the directory at this url\n", + "files <- page %>% html_nodes(\"a\") %>% html_attr(\"href\")\n", + "\n", + "for(i in 2:length(files)){\n", + " # generate the url for each of the files \n", + " u <- paste(url,files[i], sep=\"/\")\n", + " # download each of the files\n", + " download.file(u,files[i], mode = \"wb\")\n", + "}" + ] + }, + { + "cell_type": "markdown", + "id": "4bfdbe57", + "metadata": {}, + "source": [ + "We will save the working directory path to a variable." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "64af70ee", + "metadata": {}, + "outputs": [], + "source": [ + "WD <- getwd()" + ] + }, + { + "cell_type": "markdown", + "id": "b951d2bf", + "metadata": {}, + "source": [ + "### Read in the SNODAS files\n", + "Next, we read in the .tar files as a list containing .tar" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9a8ba949", + "metadata": {}, + "outputs": [], + "source": [ + "files_1 <- list.files(path = WD, pattern = \"*.tar\", full.names = T, recursive = T)" + ] + }, + { + "cell_type": "markdown", + "id": "20e4077c", + "metadata": {}, + "source": [ + "Decompress the .tar files into the working directory" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f34d53fa", + "metadata": {}, + "outputs": [], + "source": [ + "asd <- sapply(files_1, untar)" + ] + }, + { + "cell_type": "markdown", + "id": "f91f1493", + "metadata": {}, + "source": [ + "### Select the variable we wish to use\n", + "There are eight parameters from SNODAS, each has an associated ID code which is used the filename. A full description of the ID codes can be found in Table 1 of the [SNODAS user guide](https://nsidc.org/sites/default/files/g02158-v001-userguide_2_1.pdf). We will choose one of the parameters to compile all the files related to this parameter.\n", + "\n", + "We can uncomment one of the variables below that corresponds to the parameter we are interested in. In this tutorial we will use the snow depth parameter as an example. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5b7c1b18", + "metadata": {}, + "outputs": [], + "source": [ + "id_code = \"us_ssmv11036tS\" # Snow Depth\n", + "#id_code = \"us_ssmv11034tS\" # SWE\n", + "#id_code = \"us_ssmv11044bS\" # Snow melt runoff at base of snow pack\n", + "#id_code = \"us_ssmv11050IL00\" # Sublimation from the snow pack\n", + "#id_code = \"us_ssmv11039IL00\" # sublimation of blowing snow\n", + "#id_code = \"us_ssmv11038wS\" # snow pack average temperature\n", + "#id_code = \"us_ssmv01025SIL01\" # Solid precipitation \n", + "#id_code = \"us_smsv01025SIL00\" # Liquid precipitation" + ] + }, + { + "cell_type": "markdown", + "id": "52cfb398", + "metadata": {}, + "source": [ + "Now we will compile all the files that contain this id_code in the filename i.e. a .dat.gz file and .txt.gz file for each day of data that we downloaded." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "328a5934", + "metadata": {}, + "outputs": [], + "source": [ + "files_2 <- list.files(path = WD, pattern = id_code, full.names = T, recursive = T)\n", + "files_2" + ] + }, + { + "cell_type": "markdown", + "id": "15e5313e", + "metadata": {}, + "source": [ + "Decompress all the .gz files." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "50fb8483", + "metadata": {}, + "outputs": [], + "source": [ + "dcompSD <- sapply(files_2, gunzip, remove=T)" + ] + }, + { + "cell_type": "markdown", + "id": "b0747e19", + "metadata": {}, + "source": [ + "We will create a new directory for these uncompressed files and move them over." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a7504997", + "metadata": {}, + "outputs": [], + "source": [ + "dir.create(\"Snow Depth\")\n", + "file.copy(dcompSD, \"Snow Depth\")" + ] + }, + { + "cell_type": "markdown", + "id": "7c11e739", + "metadata": {}, + "source": [ + "### Convert the .dat files to .bil\n", + "Next we need to convert the .dat files to .bil so they can be read as rasters." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "914a2108", + "metadata": {}, + "outputs": [], + "source": [ + "files <- list.files(path=paste(WD,\"/Snow Depth\",sep=\"\"), pattern=\"*.dat\", full.names = T)\n", + "newfiles <- gsub(\".dat$\", \".bil\", files)\n", + "file.rename(files, newfiles)\n", + "newfiles" + ] + }, + { + "cell_type": "markdown", + "id": "2d4b6101", + "metadata": {}, + "source": [ + "### Create a text file header for each file\n", + "Now we will create a corresponding text header file for each .bil file using the associated .txt file that was downloaded. \n", + "\n", + "**Please note** that the parameters used in the m_post_2013 variable below are specific to SNODAS masked files for October 2013 onwards. If you wish to process masked files prior to October 2013 then you would need to change ulxmap and ulymap to the following:\n", + "\n", + "`ulxmap -124.72958333333334`\n", + "\n", + "`ulymap 52.870416666666664`\n", + "\n", + "If you wish to process unmasked files prior to October 2013 then you would need to change nrow, ncols, ulxmap and ulymap to the following:\n", + "\n", + "`nrows 4096`\n", + "\n", + "`ncols 8192`\n", + "\n", + "`ulxmap -130.51291666666665`\n", + "\n", + "`ulymap 58.228750000000005`\n", + "\n", + "\n", + "If you wish to process unmasked files from October 2013 onwards then you would need to change the nrows, ncols, ulxmap and ulymap to the following:\n", + "\n", + "`nrows 4096`\n", + "\n", + "`ncols 8192`\n", + "\n", + "`ulxmap -130.51250000000002`\n", + "\n", + "`ulymap 58.229166666666664`\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1ecf55dd", + "metadata": {}, + "outputs": [], + "source": [ + "mylist<- list.files(path=paste(WD,\"/Snow Depth\",sep=\"\"), pattern = \"*.bil\", full.names = T)\n", + "m_post_2013<-\"SNODAS Snow Depth Description = \n", + "nrows 3351\n", + "ncols 6935\n", + "nbands 1\n", + "nbits 16\n", + "pixeltype signedint\n", + "byteorder M\n", + "layout dat\n", + "ulxmap -124.72916666666667\n", + "ulymap 52.87083333333334\n", + "xdim 0.00833333333\n", + "ydim 0.00833333333\n", + "pixeltype SIGNEDINT\n", + "nodata -9999\"\n", + "\n", + "\n", + "mylist.hdr<-paste(mylist,\".hdr\",sep=\"\")\n", + "\n", + "for(i in mylist.hdr) {\n", + " write(m_post_2013,i)\n", + "}" + ] + }, + { + "cell_type": "markdown", + "id": "1b0f96ca", + "metadata": {}, + "source": [ + "Change the file type of the header text files from .bil.hdr to .hdr since the .bil file is already separate." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d9c5996e", + "metadata": {}, + "outputs": [], + "source": [ + "files4 <- list.files(path=paste(WD,\"/Snow Depth\",sep=\"\"), pattern=\"*.bil.hdr\", full.names = T)\n", + "newfiles <- gsub(\".bil.hdr$\", \".hdr\", files4)\n", + "file.rename(files4, newfiles)\n", + "newfiles" + ] + }, + { + "cell_type": "markdown", + "id": "458f61c5", + "metadata": {}, + "source": [ + "### Create a RasterStack of all the rasters\n", + "Create a RasterStack of all the snow depth raster files. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "91fec11f", + "metadata": {}, + "outputs": [], + "source": [ + "list.ras <- list.files(path=paste(WD,\"/Snow Depth\",sep=\"\"), pattern = \".bil\", full.names = T)\n", + "list.ras\n", + "ras_stack <- stack(list.ras)\n", + "ras_stack" + ] + }, + { + "cell_type": "markdown", + "id": "d7cdc584", + "metadata": {}, + "source": [ + "### Plot RasterStack\n", + "Now we define a projection for the RasterStack and plot each of the rasters (must be in the format of what it is in, not what you want it to be). Please note that SNODAS data are point estimates in latitude/longitude coordinates with the horizontal datum WGS 84 thus the decision to project the data and the choice of projection is up to the user. In this tutorial we will use Geographic longitude/latitude." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9a6fed2e", + "metadata": {}, + "outputs": [], + "source": [ + "crs.geo <- CRS(\"+proj=longlat +ellps=WGS84 +datum=WGS84\")\n", + "proj4string(ras_stack) <- crs.geo\n", + "ras_stack\n", + "plot(ras_stack)" + ] + }, + { + "cell_type": "markdown", + "id": "e5584358", + "metadata": {}, + "source": [ + "### Save RasterStack\n", + "Save the RasterStack to a new directory. We will write in the \"raster\"/native format to preserve layer names (i.e. dates). There is no attribute table because there is only one attribute per file (snow depth in mm)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6fec3702", + "metadata": {}, + "outputs": [], + "source": [ + "#create a new directory Rasters\n", + "dir.create(paste(WD,\"/Snow Depth\",\"/Rasters\",sep=\"\"))\n", + "fp <- paste(WD,\"/Snow Depth\",\"/Rasters\",sep=\"\")\n", + "#save the RasterStack as a .grd file\n", + "writeRaster(ras_stack,filename=file.path(fp,\"ras_stack.grd\"), format=\"raster\", progress=\"text\", options=c(\"INTERLEAVE=BAND\",\"COMPRESS=LZW\"))" + ] + }, + { + "cell_type": "markdown", + "id": "83a04c93", + "metadata": {}, + "source": [ + "## 3. Learning outcomes recap\n", + "\n", + "We have learned how to:\n", + "1. Download and unzip masked SNODAS files\n", + "2. Convert the files to .bil format and put them in a raster stack\n", + "3. Quickly visualize the rasters of the data\n", + "4. Save the raster stack as .grd file" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "646d3b9d", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.15" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/notebooks/SNODAS/Download_Process_masked_SNODAS_data.nb.html b/notebooks/SNODAS/Download_Process_masked_SNODAS_data.nb.html new file mode 100644 index 0000000..ec8a266 --- /dev/null +++ b/notebooks/SNODAS/Download_Process_masked_SNODAS_data.nb.html @@ -0,0 +1,775 @@ + + + + + + + + + + + + + +How to download and work with SNDOAS data + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+

1. Tutorial Overview

+

This notebook demonstrates how to download and unzip masked SNODAS files that are from after October 2013 and select one variable and compile it into a RasterStack for quick visualization and finally save as a .grd file.

+
+

Credits

+

This tutorial is based on an R script written in 2021 by Cara Thompson at New Mexico State University and has been converted to a tutorial with some minor additions by Jennifer Roebuck of NSIDC.

+

For questions regarding the tutorial or to report problems, please create a new issue in the NSIDC-Data-Tutorials repo

+
+
+

Learning Objectives

+

By the end of this demonstration you will be able to: 1. Download and unzip masked SNODAS files 2. Convert the files to .bil format and put them in a RasterStack 3. Quickly visualize the rasters of the data 4. Save the RasterStack as .grd file

+
+
+

Prerequisites

+
    +
  1. The following libraries should already be installed: R.utils, rvest, dplyr, raster, sp, maptools, and data.table.
  2. +
+
+
+

Time requirement

+

Allow approximately 20 minutes to complete this tutorial.

+
+
+
+

2. Tutorial steps

+
+

Load necessary libraries

+ + + +
library(R.utils)
+library(rvest)
+ + +
Loading required package: xml2
+ + +
library(dplyr)
+library(raster)
+library(sp)
+library(maptools)
+library(data.table)
+ + + +
+
+

Download SNODAS data

+

We will download all the SNODAS masked files for June 2023. If you wish to download masked files from a different time period you can modify the path in the url variable below.

+ + + +
# set the URL for the SNODAS directory we want to download files from
+url <- "https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun" 
+
+# read html content from url
+page <- read_html(url)
+
+# Get a list of the files listed in the directory at this url
+files <- page %>% html_nodes("a") %>% html_attr("href")
+
+for(i in 2:length(files)){
+  # generate the url for each of the files 
+  u <- paste(url,files[i], sep="/")
+  # download each of the files
+  download.file(u,files[i], mode = "wb")
+}
+ + +
trying URL 'https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun/SNODAS_20230601.tar'
+Content type 'application/octet-stream' length 5724160 bytes (5.5 MB)
+==================================================
+downloaded 5.5 MB
+
+trying URL 'https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun/SNODAS_20230602.tar'
+Content type 'application/octet-stream' length 6543360 bytes (6.2 MB)
+==================================================
+downloaded 6.2 MB
+
+trying URL 'https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun/SNODAS_20230603.tar'
+Content type 'application/octet-stream' length 6737920 bytes (6.4 MB)
+==================================================
+downloaded 6.4 MB
+
+trying URL 'https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun/SNODAS_20230604.tar'
+Content type 'application/octet-stream' length 6021120 bytes (5.7 MB)
+==================================================
+downloaded 5.7 MB
+
+trying URL 'https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun/SNODAS_20230605.tar'
+Content type 'application/octet-stream' length 5621760 bytes (5.4 MB)
+==================================================
+downloaded 5.4 MB
+
+trying URL 'https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun/SNODAS_20230606.tar'
+Content type 'application/octet-stream' length 6307840 bytes (6.0 MB)
+==================================================
+downloaded 6.0 MB
+
+trying URL 'https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun/SNODAS_20230607.tar'
+Content type 'application/octet-stream' length 5038080 bytes (4.8 MB)
+==================================================
+downloaded 4.8 MB
+
+trying URL 'https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun/SNODAS_20230608.tar'
+Content type 'application/octet-stream' length 5345280 bytes (5.1 MB)
+==================================================
+downloaded 5.1 MB
+
+trying URL 'https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun/SNODAS_20230609.tar'
+Content type 'application/octet-stream' length 5171200 bytes (4.9 MB)
+==================================================
+downloaded 4.9 MB
+
+trying URL 'https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun/SNODAS_20230610.tar'
+Content type 'application/octet-stream' length 5427200 bytes (5.2 MB)
+==================================================
+downloaded 5.2 MB
+
+trying URL 'https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun/SNODAS_20230611.tar'
+Content type 'application/octet-stream' length 5806080 bytes (5.5 MB)
+==================================================
+downloaded 5.5 MB
+
+trying URL 'https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun/SNODAS_20230612.tar'
+Content type 'application/octet-stream' length 5724160 bytes (5.5 MB)
+==================================================
+downloaded 5.5 MB
+
+trying URL 'https://noaadata.apps.nsidc.org/NOAA/G02158/masked/2023/06_Jun/SNODAS_20230613.tar'
+Content type 'application/octet-stream' length 5478400 bytes (5.2 MB)
+==================================================
+downloaded 5.2 MB
+ + + +

We will save the working directory path to a variable.

+ + + +
WD <- getwd()
+ + + +
+
+

Read in the SNODAS files

+

Next, we read in the .tar files as a list containing .tar

+ + + +
files_1 <- list.files(path = WD, pattern = "*.tar", full.names = T, recursive = T)
+ + + +

Decompress the .tar files into the working directory

+ + + +
asd <- sapply(files_1, untar)
+ + + +
+
+

Select the variable we wish to use

+

There are eight parameters from SNODAS, each has an associated ID code which is used the filename. A full description of the ID codes can be found in Table 1 of the SNODAS user guide. We will choose one of the parameters to compile all the files related to this parameter.

+

We can uncomment one of the variables below that corresponds to the parameter we are interested in. In this tutorial we will use the snow depth parameter as an example.

+ + + +
id_code = "us_ssmv11036tS" # Snow Depth
+#id_code = "us_ssmv11034tS" # SWE
+#id_code = "us_ssmv11044bS" # Snow melt runoff at base of snow pack
+#id_code = "us_ssmv11050IL00" # Sublimation from the snow pack
+#id_code = "us_ssmv11039IL00" # sublimation of blowing snow
+#id_code = "us_ssmv11038wS" # snow pack average temperature
+#id_code = "us_ssmv01025SIL01" # Solid precipitation 
+#id_code = "us_smsv01025SIL00" # Liquid precipitation
+ + + +

Now we will compile all the files that contain this id_code in the filename i.e. a .dat.gz file and .txt.gz file for each day of data that we downloaded.

+ + + +
files_2 <- list.files(path = WD, pattern = id_code, full.names = T, recursive = T)
+files_2
+ + +
 [1] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060105HP001.dat.gz"
+ [2] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060105HP001.txt.gz"
+ [3] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060205HP001.dat.gz"
+ [4] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060205HP001.txt.gz"
+ [5] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060305HP001.dat.gz"
+ [6] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060305HP001.txt.gz"
+ [7] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060405HP001.dat.gz"
+ [8] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060405HP001.txt.gz"
+ [9] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060505HP001.dat.gz"
+[10] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060505HP001.txt.gz"
+[11] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060605HP001.dat.gz"
+[12] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060605HP001.txt.gz"
+[13] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060705HP001.dat.gz"
+[14] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060705HP001.txt.gz"
+[15] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060805HP001.dat.gz"
+[16] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060805HP001.txt.gz"
+[17] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060905HP001.dat.gz"
+[18] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023060905HP001.txt.gz"
+[19] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023061005HP001.dat.gz"
+[20] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023061005HP001.txt.gz"
+[21] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023061105HP001.dat.gz"
+[22] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023061105HP001.txt.gz"
+[23] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023061205HP001.dat.gz"
+[24] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023061205HP001.txt.gz"
+[25] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023061305HP001.dat.gz"
+[26] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/us_ssmv11036tS__T0001TTNATS2023061305HP001.txt.gz"
+ + + +

Decompress all the .gz files.

+ + + +
dcompSD <- sapply(files_2, gunzip, remove=T)
+ + + +

We will create a new directory for these uncompressed files and move them over.

+ + + +
dir.create("Snow Depth")
+file.copy(dcompSD, "Snow Depth")
+ + +
 [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
+[16] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
+ + + +
+
+

Convert the .dat files to .bil

+

Next we need to convert the .dat files to .bil so they can be read as rasters.

+ + + +
files <- list.files(path=paste(WD,"/Snow Depth",sep=""), pattern="*.dat", full.names = T)
+newfiles <- gsub(".dat$", ".bil", files)
+file.rename(files, newfiles)
+ + +
 [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
+ + +
newfiles
+ + +
 [1] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060105HP001.bil"
+ [2] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060205HP001.bil"
+ [3] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060305HP001.bil"
+ [4] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060405HP001.bil"
+ [5] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060505HP001.bil"
+ [6] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060605HP001.bil"
+ [7] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060705HP001.bil"
+ [8] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060805HP001.bil"
+ [9] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060905HP001.bil"
+[10] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023061005HP001.bil"
+[11] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023061105HP001.bil"
+[12] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023061205HP001.bil"
+[13] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023061305HP001.bil"
+ + + +
+
+

Create a text file header for each file

+

Now we will create a corresponding text header file for each .bil file using the associated .txt file that was downloaded.

+

Please note that the parameters used in the m_post_2013 variable below are specific to SNODAS masked files for October 2013 onwards. If you wish to process masked files prior to October 2013 then you would need to change ulxmap and ulymap to the following: ulxmap -124.72958333333334 ulymap 52.870416666666664

+

If you wish to process unmasked files prior to October 2013 then you would need to change nrow, ncols, ulxmap and ulymap to the following: nrows 4096 ncols 8192 ulxmap -130.51291666666665 ulymap 58.228750000000005

+

If you wish to process unmasked files from October 2013 onwards then you would need to change the nrows, ncols, ulxmap and ulymap to the following: nrows 4096 ncols 8192 ulxmap -130.51250000000002 ulymap 58.229166666666664

+ + + +
#setwd("/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth")
+mylist<- list.files(path=paste(WD,"/Snow Depth",sep=""), pattern = "*.bil", full.names = T)
+x<-"SNODAS Snow Depth Description = 
+nrows 3351
+ncols 6935
+nbands 1
+nbits 16
+pixeltype signedint
+byteorder M
+layout dat
+ulxmap -124.72958333333334
+ulymap 52.870416666666664
+xdim 0.00833333333
+ydim 0.00833333333
+pixeltype SIGNEDINT
+nodata -9999"
+
+mylist.hdr<-paste(mylist,".hdr",sep="")
+
+for(i in mylist.hdr) {
+  write(x,i)
+}
+
+ + + +

Change the file type of the header text files from .bil.hdr to .hdr since the .bil file is already separate.

+ + + +
#setwd("/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth")
+files4 <- list.files(path=paste(WD,"/Snow Depth",sep=""), pattern="*.bil.hdr", full.names = T)
+newfiles <- gsub(".bil.hdr$", ".hdr", files4)
+file.rename(files4, newfiles)
+ + +
 [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
+ + +
newfiles
+ + +
 [1] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060105HP001.hdr"
+ [2] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060205HP001.hdr"
+ [3] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060305HP001.hdr"
+ [4] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060405HP001.hdr"
+ [5] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060505HP001.hdr"
+ [6] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060605HP001.hdr"
+ [7] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060705HP001.hdr"
+ [8] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060805HP001.hdr"
+ [9] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060905HP001.hdr"
+[10] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023061005HP001.hdr"
+[11] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023061105HP001.hdr"
+[12] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023061205HP001.hdr"
+[13] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023061305HP001.hdr"
+ + + +
+
+

Create a RasterStack of all the rasters

+

Create a RasterStack of all the snow depth raster files.

+ + + +
#create new directory to save the RasterStack in
+#dir.create("Rasters")
+#setwd("/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/Rasters")
+
+list.ras <- list.files(path=paste(WD,"/Snow Depth",sep=""), pattern = ".bil", full.names = T)
+list.ras
+ + +
 [1] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060105HP001.bil"
+ [2] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060205HP001.bil"
+ [3] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060305HP001.bil"
+ [4] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060405HP001.bil"
+ [5] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060505HP001.bil"
+ [6] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060605HP001.bil"
+ [7] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060705HP001.bil"
+ [8] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060805HP001.bil"
+ [9] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023060905HP001.bil"
+[10] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023061005HP001.bil"
+[11] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023061105HP001.bil"
+[12] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023061205HP001.bil"
+[13] "/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/us_ssmv11036tS__T0001TTNATS2023061305HP001.bil"
+ + +
ras_stack <- stack(list.ras)
+ras_stack
+ + +
class      : RasterStack 
+dimensions : 3351, 6935, 23239185, 13  (nrow, ncol, ncell, nlayers)
+resolution : 0.008333333, 0.008333333  (x, y)
+extent     : -124.7338, -66.94208, 24.94958, 52.87458  (xmin, xmax, ymin, ymax)
+crs        : NA 
+names      : us_ssmv11//60105HP001, us_ssmv11//60205HP001, us_ssmv11//60305HP001, us_ssmv11//60405HP001, us_ssmv11//60505HP001, us_ssmv11//60605HP001, us_ssmv11//60705HP001, us_ssmv11//60805HP001, us_ssmv11//60905HP001, us_ssmv11//61005HP001, us_ssmv11//61105HP001, us_ssmv11//61205HP001, us_ssmv11//61305HP001 
+min values :                -32768,                -32768,                -32768,                -32768,                -32768,                -32768,                -32768,                -32768,                -32768,                -32768,                -32768,                -32768,                -32768 
+max values :                 32767,                 32767,                 32767,                 32767,                 32767,                 32767,                 32767,                 32767,                 32767,                 32767,                 32767,                 32767,                 32767 
+ + + +
+
+

Plot RasterStack

+

Now we define a projection for the RasterStack and plot each of the rasters (must be in the format of what it is in, not what you want it to be). Please note that SNODAS data are point estimates in latitude/longitude coordinates with the horizontal datum WGS 84 thus the decision to project the data and the choice of projection is up to the user. In this tutorial we will use Geographic longitude/latitude.

+ + + +
crs.geo <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84")
+proj4string(ras_stack) <- crs.geo
+ras_stack
+ + +
class      : RasterStack 
+dimensions : 3351, 6935, 23239185, 13  (nrow, ncol, ncell, nlayers)
+resolution : 0.008333333, 0.008333333  (x, y)
+extent     : -124.7338, -66.94208, 24.94958, 52.87458  (xmin, xmax, ymin, ymax)
+crs        : +proj=longlat +datum=WGS84 +no_defs 
+names      : us_ssmv11//60105HP001, us_ssmv11//60205HP001, us_ssmv11//60305HP001, us_ssmv11//60405HP001, us_ssmv11//60505HP001, us_ssmv11//60605HP001, us_ssmv11//60705HP001, us_ssmv11//60805HP001, us_ssmv11//60905HP001, us_ssmv11//61005HP001, us_ssmv11//61105HP001, us_ssmv11//61205HP001, us_ssmv11//61305HP001 
+min values :                -32768,                -32768,                -32768,                -32768,                -32768,                -32768,                -32768,                -32768,                -32768,                -32768,                -32768,                -32768,                -32768 
+max values :                 32767,                 32767,                 32767,                 32767,                 32767,                 32767,                 32767,                 32767,                 32767,                 32767,                 32767,                 32767,                 32767 
+ + +
plot(ras_stack)
+ + +

+ + + +
+
+

Save RasterStack

+

Save the RasterStack to a new directory. We will write in the “raster”/native format to preserve layer names (i.e. dates). There is no attribute table because there is only one attribute per file (snow depth in mm).

+ + + +
#setwd("/Users/jero7025/Documents/NOAA/Datasets/G02158/R_code/Snow Depth/Rasters")
+dir.create(paste(WD,"/Snow Depth","/Rasters",sep=""))
+fp <- paste(WD,"/Snow Depth","/Rasters",sep="")
+writeRaster(ras_stack,filename=file.path(fp,"ras_stack.grd"), format="raster", progress="text", options=c("INTERLEAVE=BAND","COMPRESS=LZW"))
+ + +

+  |                                                                            
+  |                                                                      |   0%
+  |                                                                            
+  |===                                                                   |   4%
+  |                                                                            
+  |======                                                                |   8%
+  |                                                                            
+  |========                                                              |  12%
+  |                                                                            
+  |===========                                                           |  16%
+  |                                                                            
+  |==============                                                        |  20%
+  |                                                                            
+  |=================                                                     |  24%
+  |                                                                            
+  |====================                                                  |  28%
+  |                                                                            
+  |======================                                                |  32%
+  |                                                                            
+  |=========================                                             |  36%
+  |                                                                            
+  |============================                                          |  40%
+  |                                                                            
+  |===============================                                       |  44%
+  |                                                                            
+  |==================================                                    |  48%
+  |                                                                            
+  |====================================                                  |  52%
+  |                                                                            
+  |=======================================                               |  56%
+  |                                                                            
+  |==========================================                            |  60%
+  |                                                                            
+  |=============================================                         |  64%
+  |                                                                            
+  |================================================                      |  68%
+  |                                                                            
+  |==================================================                    |  72%
+  |                                                                            
+  |=====================================================                 |  76%
+  |                                                                            
+  |========================================================              |  80%
+  |                                                                            
+  |===========================================================           |  84%
+  |                                                                            
+  |==============================================================        |  88%
+  |                                                                            
+  |================================================================      |  92%
+  |                                                                            
+  |===================================================================   |  96%
+  |                                                                            
+  |======================================================================| 100%
+ + + +
+
+
+

3. Learning outcomes recap

+

We have learned how to: 1. Download and unzip masked SNODAS files 2. Convert the files to .bil format and put them in a raster stack 3. Quickly visualize the rasters of the data 4. Save the raster stack as .grd file

+ +
+ +
LS0tCnRpdGxlOiAiSG93IHRvIGRvd25sb2FkIGFuZCB3b3JrIHdpdGggU05ET0FTIGRhdGEiCm91dHB1dDogaHRtbF9ub3RlYm9vawotLS0KCiMjIDEuIFR1dG9yaWFsIE92ZXJ2aWV3IApUaGlzIG5vdGVib29rIGRlbW9uc3RyYXRlc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1jKCJJTlRFUkxFQVZFPUJBTkQiLCJDT01QUkVTUz1MWlciKSkKCmBgYAoKIyMgMy4gTGVhcm5pbmcgb3V0Y29tZXMgcmVjYXAKCldlIGhhdmUgbGVhcm5lZCBob3cgdG86CjEuIERvd25sb2FkIGFuZCB1bnppcCBtYXNrZWQgU05PREFTIGZpbGVzCjIuIENvbnZlcnQgdGhlIGZpbGVzIHRvIC5iaWwgZm9ybWF0IGFuZCBwdXQgdGhlbSBpbiBhIHJhc3RlciBzdGFjawozLiBRdWlja2x5IHZpc3VhbGl6ZSB0aGUgcmFzdGVycyBvZiB0aGUgZGF0YQo0LiBTYXZlIHRoZSByYXN0ZXIgc3RhY2sgYXMgLmdyZCBmaWxl
+ + + +
+ + + + + + + + + + + + + + + + diff --git a/notebooks/SNODAS/img/nsidc_logo.png b/notebooks/SNODAS/img/nsidc_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..35a06e02d3e9d47b3a392d05a550364d8cfd8aaa GIT binary patch literal 17603 zcmXtAWmH?;5=Be!;O-XO-J!T!f#UA&?ry~$iWe>JE$&)U+})kx^78$7S?lITR+4i@ z_w1S67*%B%R3t(qC@3gYIoZ$ZkhAxH2jCOrp5L5j4swEXlaSK{KyLm3^JvI(L}yuD zHz+99o&OH#MJbO{$cqH-QabJ$PL}RoCaxAxUS3`-HjZ{~W+u)SEKaUgxfeo&P*CJh za-YRDz4OlUy|PHO2(E&x9DDrQ9x}|q$j9Nc6v48HLomg%T0k{bRk)h(oDPdYBk@SqZ{p2ffzCuC~o={!KE@wwd*HIMtrZr;R8IFRO#UZFz0^oL3*)9|IrA z`iQR}5E)K+4Wd zk`LCt4;(;-IuDE$^aylRYQ$_EwCJg4Ym=iD(dw%25ed?)AeY2qaN))_RFN!Gg>vCY z#NvKw}mwl+vQl%fNbfvn^+JTWe#Wwx9v*dwiqJWUhR};?(V>L%&Jewg*2H=-wxK zNJ}Caf1nRQN9GUZC-AboHkS(@o_wpEgI!=Ol27eeu{L*%IHvpc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`Ue0^7lj016unP&Onp)w^cKUd7Yv0KqEs&u%( zR>fS?%zCs0DE&!%DXYs_g!SWje9#7lD0l{vZ{9Pu0{iJAA#t?~`4Qf^BQ3?RARu)j zD3JBKD9}sD^iNo)1EMYqAoT-1v=BnS)iwV&keEmonq@$ zBKnW$+$+X5mXtG0X_^&m4}!nm*Urbud9Ox?T}yD7RQUtQETQ$r=@K?{L}1(PuD|4+ z|Kf&6P>HkrrY)BhLLW&71Drd6JLqIZZZ9iwDx{Mh{|im-U|uY)a?2zC;^+4~ zL8Pxc4XFu^P8K4Q!z{RNG(YjEU?EmNR)P>Hz9PPN@frN|!c!872AhDhgb*KERPc$w ze+#B1T;uzq0;4&e^o_%llqr-m%!3mI3o(kNG`8l?C zHtpu;4?NHFue^oy4`w+L(wqkAh#nV=#~r#KWlcpd412Ee<=b zq7u$nzKmbmk_Vvg25tfVB!t-aZ{B~*@Lxx80@4uuW8gqAPO|&Q+Z%b{`8RoW z<-2I1fRVdo3F&UZ^z}MnHzzpW^giXRpH>=s*55Weir2@&c{BOuStoGTu?ON#9XP%T zW1anrxv%Sg0{&+ZoB;D1PRoGvfX@OxFurN@+&de2_@8gH^8NJ$hlUN#&Wmu%+DRff z5yThyls60_usiS+6><2|`CRn*a|hv0OOQhI>p zz`4MQ@PFDnW0i)XC=7pBqjnIfwJ`+SqNtSWR>f7QZ|M{G5V{HCP+TfzvKWjsMIugZ z65H!=BE+C#7j2*)-05aS5YPV6$q|+~48&aF3(L7R}vSHhs1YoC0S`sR_JFf6r74oJMPH11HI8 z0k!n~Fp7Eb16)7A^L4S!S47YrveLj&N(IcAkr& Date: Wed, 16 Aug 2023 13:10:12 -0600 Subject: [PATCH 2/4] Add README file --- notebooks/SNODAS/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 notebooks/SNODAS/README.md diff --git a/notebooks/SNODAS/README.md b/notebooks/SNODAS/README.md new file mode 100644 index 0000000..5996590 --- /dev/null +++ b/notebooks/SNODAS/README.md @@ -0,0 +1,13 @@ +## Download and Process SNODAS data + +## Summary + +In this tutorial we demonstrate how to download SNODAS data from the NOAA@NSIDC HTTPS File System and select one variable and compile it into a RasterStack for quick visualization and save as a .grd file. + +### Set up + +### Key Learning Objectives +1. Download and unzip masked SNODAS data files +2. Convert the files to .bil format and put them in a RasterStack +3. Quickly visualize rasters of the data +4. Save the RasterStack as a .grd file From dcfcaa1176ae6e076375eef1be69773890ed9f1f Mon Sep 17 00:00:00 2001 From: jennifer Date: Wed, 16 Aug 2023 13:12:13 -0600 Subject: [PATCH 3/4] Update README --- notebooks/SNODAS/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/SNODAS/README.md b/notebooks/SNODAS/README.md index 5996590..025070b 100644 --- a/notebooks/SNODAS/README.md +++ b/notebooks/SNODAS/README.md @@ -2,7 +2,7 @@ ## Summary -In this tutorial we demonstrate how to download SNODAS data from the NOAA@NSIDC HTTPS File System and select one variable and compile it into a RasterStack for quick visualization and save as a .grd file. +In this tutorial we demonstrate how to download SNODAS data from the NOAA@NSIDC HTTPS File System and select one variable and compile it into a RasterStack for quick visualization and save as a .grd file. Please note that the tutorial demonstrate processing masked files from after October 2013. If you wish to process any masked files prior to October 2013 or any unmasked files you will need to modify the tutorial slightly, details on how to do this are included in the tutorial. ### Set up From 37a5d97c9ec2b4a2d3e7a2aff77f5b5cdb29ae46 Mon Sep 17 00:00:00 2001 From: jennifer Date: Wed, 16 Aug 2023 13:18:42 -0600 Subject: [PATCH 4/4] Add credits to README file --- notebooks/SNODAS/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/notebooks/SNODAS/README.md b/notebooks/SNODAS/README.md index 025070b..2171bde 100644 --- a/notebooks/SNODAS/README.md +++ b/notebooks/SNODAS/README.md @@ -2,6 +2,8 @@ ## Summary +**Credits** This tutorial is based on code provided by Cara Thompson at New Mexico State University. It has been modifed slightly and converted into a tutorial by NSIDC. + In this tutorial we demonstrate how to download SNODAS data from the NOAA@NSIDC HTTPS File System and select one variable and compile it into a RasterStack for quick visualization and save as a .grd file. Please note that the tutorial demonstrate processing masked files from after October 2013. If you wish to process any masked files prior to October 2013 or any unmasked files you will need to modify the tutorial slightly, details on how to do this are included in the tutorial. ### Set up