Skip to content

Commit

Permalink
updating wsim 101a and 101b
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmartinez4 committed May 28, 2024
1 parent 0450821 commit f073ee2
Show file tree
Hide file tree
Showing 2 changed files with 151 additions and 19 deletions.
74 changes: 69 additions & 5 deletions m101a-wsim-gldas-acquisition.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ After completing this lesson, you should be able to:

## Introduction

The water cycle is the constant process of circulation of water on, above, and under the Earth's surface [@NOAA2019]. Human activities produce greenhouse gas emissions, land use changes, dam and reservoir development, and groundwater extraction which have affected the natural water cycle in recent decades [@intergovernmentalpanelonclimatechange2023]. The influence of these human activities on the water cycle have consequential impacts on oceanic, groundwater, and land processes, influencing phenomena such as droughts and floods [@Zhou2016].
The water cycle is the process of circulation of water on, above, and under the Earths surface [@NOAA2019]. Human activities produce greenhouse gas emissions, land use changes, dam and reservoir development, and groundwater extraction have affected the natural water cycle in recent decades [@intergovernmentalpanelonclimatechange2023]. The influence of these human activities on the water cycle has consequential impacts on oceanic, groundwater, and land processes, influencing phenomena such as droughts and floods [@Zhou2016].

Precipitation deficits, or periods of below average rainfall, can lead to drought, which is characterized by prolonged periods of little to no rainfall and resulting water shortages. Droughts often trigger environmental stresses and can create cycles of reinforcement, impacting both ecosystems and people [@Rodgers2023]. For example, while California frequently experiences drought, the combination of prolonged dry spells and sustained high temperatures prevented the replenishment of cool fresh water to the Klamath river, which led to severe water shortages in 2003 and again from 2012 to 2014. These shortages affect agricultural areas like the Central Valley, which grows almonds, one of California's most important crops, with the state producing 80% of the world's almonds. These severe droughts, coupled with competition for limited fresh water resources, resulted in declining populations of [Chinook salmon](https://www.fisheries.noaa.gov/species/chinook-salmon) due to heat stress and gill rot disease disrupting the food supply for Klamath basin tribal groups [@guillen2002; @Bland2014].
Precipitation deficits, or periods of below-average rainfall, can lead to drought, characterized by prolonged periods of little to no rainfall and resulting water shortages. Droughts often trigger environmental stresses and can create cycles of reinforcement impacting ecosystems and people [@Rodgers2023]. For example, California frequently experiences drought but the combination of prolonged dry spells and sustained high temperatures prevented the replenishment of cool fresh water to the Klamath River, which led to severe water shortages in 2003 and again from 2012 to 2014. These shortages affect agricultural areas like the Central Valley, which grows almonds, one of California’s most important crops, with the state producing 80% of the world’s almonds. These severe droughts, coupled with competition for limited freshwater resources, resulted in declining populations of [Chinook salmon](https://www.fisheries.noaa.gov/species/chinook-salmon) due to heat stress and gill rot disease disrupting the food supply for Klamath basin tribal groups [@guillen2002; @Bland2014].

![](docs/images/watercycle_rc.png)[^1]

Expand All @@ -35,12 +35,34 @@ Precipitation deficits, or periods of below average rainfall, can lead to drough
::: {.callout-tip style="color: #5a7a2b;"}
## Data Science Review

A [raster](https://docs.qgis.org/2.18/en/docs/gentle_gis_introduction/raster_data.html) dataset is a type of geographic data in digital image format which has numerical information stored in each pixel. (Rasters are often referred to as grids because of their regularly-shaped matrix data structure.) Rasters can store many types of information, and they usually have dimensions that include latitude, longitude, and time. NetCDF is one format for raster data; others include Geotiff, ASCII and many more. Several raster formats like NetCDF can store multiple raster layers, or a "raster stack," which can be useful for storing and analyzing a series of rasters.
A [raster](https://docs.qgis.org/2.18/en/docs/gentle_gis_introduction/raster_data.html) dataset is a type of geographic data in digital image format with numerical information stored in each pixel. (Rasters are often called grids because of their regularly-shaped matrix data structure.) Rasters can store many types of information and can have dimensions that include latitude, longitude, and time. NetCDF is one format for raster data; others include Geotiff, ASCII, and many more. Several raster formats like NetCDF can store multiple raster layers, or a raster stack, which can be useful for storing and analyzing a series of rasters.
:::
:::

The **Water Security (WSIM-GLDAS) Monthly Grids, v1 (1948 - 2014)** The Water Security (WSIM-GLDAS) Monthly Grids, v1 (1948 - 2014) dataset "identifies and characterizes surpluses and deficits of freshwater, and the parameters determining these anomalies, at monthly intervals over the period January 1948 to December 2014" [@isciences2022]. The dataset can be downloaded from the [NASA SEDAC](https://sedac.ciesin.columbia.edu/data/set/water-wsim-gldas-v1) website. Downloads of the WSIM-GLDAS data are organized by a combination of thematic variables (composite surplus/deficit, temperature, PETmE, runoff, soil moisture, precipitation) and integration periods (a temporal aggregation) (1, 3, 6, 12 months). Each variable-integration combination consists of a NetCDF raster (.nc) file ( with a time dimension that contains a raster layer for each of the 804 months between January, 1948 and December, 2014. Some variables also contain multiple attributes each with their own time series. Hence, this is a large file that can take a lot of time to download and may cause computer memory issues on certain systems. This is considered BIG data.

::: {.callout-note}
## Knowledge Check

1. How would you best describe the water cycle?
a. A prolonged period of little to no rainfall.
b. Low precipitation combined with record temperatures.
c. The circulation of water on and above Earth’s surface.
d. A cycle that happens due to drought.

2. What human interventions affect the water cycle? (select all that apply)
a. Greenhouse gas emissions
b. Land use changes
c. Dam and reservoir development
d. Groundwater overexploitation

3. What is a precipitation deficit?
a. A period of rainfall below the average.
b. A prolonged period of little to no rainfall.
c. A period of chain reactions.
d. A period of rainfall above the average.
:::

## Acquiring the Data

::: {.callout-tip style="color: #5a7a2b;"}
Expand All @@ -63,7 +85,11 @@ For this lesson, we will work with the **WSIM-GLDAS data set Composite Anomaly T
::: {.callout-tip style="color: #5a7a2b;"}
## Data Science Review

This lesson uses the [`stars`](https://r-spatial.github.io/stars/), [`sf`](https://r-spatial.github.io/sf/), [`lubridate`](https://lubridate.tidyverse.org/), and [cubelyr](https://cran.r-project.org/web/packages/cubelyr/index.html) packages. Make sure they are installed before you begin working with the code in this document. If you'd like to learn more about the functions used in this lesson you can use the help guides on their package websites.
This lesson uses the [`stars`](https://r-spatial.github.io/stars/), [`sf`](https://r-spatial.github.io/sf/), [`lubridate`](https://lubridate.tidyverse.org/), and [cubelyr](https://cran.r-project.org/web/packages/cubelyr/index.html) packages.

The `stars` package in R helps you work with large and complex spatial data, making it easier to analyze and visualize maps and satellite images. The `sf` package lets you handle and analyze spatial data in a simple way, allowing you to work with maps and geographic information seamlessly. The `lubridate` package makes it really easy to handle dates and times in R, so you can effortlessly convert, manipulate, and perform calculations with them. The `cubelyr` package helps you create and analyze multidimensional data cubes, making it easier to explore complex datasets and discover patterns.

Make sure they are installed before you begin working with the code in this document. If you'd like to learn more about the functions used in this lesson you can use the help guides on their package websites.
:::
:::

Expand Down Expand Up @@ -138,6 +164,25 @@ wsim_gldas_anoms |>

Although we have now reduced the data to a single attribute with a restricted time of interest, we can take it a step further and limit the spatial extent to a country or state of interest.

::: {.callout-note}
## Knowledge Check
1. Which of these best describe a raster dataset?
a. A type of geographic data in digital image format.
b. A table or list of numbers.
c. A geographic region of interest.
d. An attribute with a time period of interest.
2. Which of the following is true about the information that rasters can store? (select all that apply)
a. Attributes (thematic content)
b. Dimensions (information expressing spatial or temporal extent information)
c. Geographic coordinates
d. A list of numbers
3. In the R programming language, what does the term vector refer to?
a. A grid of geographic data.
b. A collection or list of numbers.
c. A geographic region of interest.
d. An attribute with a time period of interest.
:::

## Spatial Selection

::: column-margin
Expand Down Expand Up @@ -283,6 +328,25 @@ You can download this image if you are running this script locally. **Not for 2i

Once you run this code you can find the file in the file location... This allows you to share your findings.

::: {.callout-note}
## Knowledge Check
1. There are several options for spatially subsetting (or clipping) a raster/raster stack to a region of interest. What method was used in this lesson?
a. Using a vector of dates.
b. Using another raster object.
c. Specifying a bounding box.
d. Using a vector boundary dataset.
2. When running into memory issues, what is something you can do to reduce the computational load?
a. Work with one time frame or region at a time.
b. Save it as a new file.
c. Subset the data to a region of interest/time frame.
d. Find other data to work with.
3. What is the importance of subsetting data?
a. Freeing up space.
b. Analyzing a certain time or area of interest.
c. Making code run faster.
d. All of the above.
:::

## In this Lesson, You Learned...

Congratulations! Now you should be able to:
Expand All @@ -299,4 +363,4 @@ In the next lesson, we will create more advanced visualizations and extract data

[Lesson 1b: WSIM-GLDAS Visualizations and Data Extraction](https://ciesin-geospatial.github.io/TOPSTSCHOOL-water/m101b-wsim-gldas-vis.html){.btn .btn-primary .btn role="button"}

# References
# References
Loading

0 comments on commit f073ee2

Please sign in to comment.