Assignment 9

If you have installed Python locally, launch JupyterLab by running:

conda activate sds

and

jupyter lab
rain

Task 1 (4 points)

Download the data for the assignment from here. This is WorldClim version 2.1 monthly precipitation data averaged across the 1970-2000 period. The spatial resolution is 2.5 minutes (around 21 km2 at the equator) and the units are in mm. The numbers in the file name represent the month of the year (January is 01; December is 12).

Read in the January precipitation data (i.e. wc2.1_2.5m_prec_01.tif) and answer the following questions:

  • a) How many rows and columns does this raster have?

  • b) What is the coordinate reference system?

  • c) What is the data type?

  • d) What value represents NoData


Task 2 (8 points)

Mask the NoData values and answer the following questions about the January precipitation data:

  • a) Which row/column index represents the highest precipitation?

  • b) Which row/column index represents the lowest precipitation?

  • c) What is the longitude/latitude of the highest precipitation?

  • d) What is the longitude/latitude of the lowest precipitation?

  • e) What is the precipitation at grid cell index 1500, 1200?

  • f) What is the precipitation at 87.8 E, 54.8 N?

  • g) What is the precipitation at -5.1 N, 24.7 E?

  • h) What is the precipitation at 46.4 N, -106.8 E?


Task 3 (5 points)

Read in the July precipitation data (i.e. wc2.1_2.5m_prec_07.tif, mask the NoData values, and provide the longitude/latitude for the following:

  • a) Location with the largest absolute difference between January vs. July precipitation.

  • b) Location with the smallest absolute difference between January vs. July precipitation?

  • c) Location with the largest combined January and July precipitation?


Task 4 (3 points)

  • a) Make a plot showing the mean annual precipitation for the world (i.e. by averaging over all twelve files).

  • b) Compute the standard deviation of precipitation across all twelve files and make a plot showing new variable.


Task 5 (5 points)

Download the Landsat data from here and display the following:


Important

Save your notebook to your local course folder and submit assignment (in .pdf format) to Canvas by the deadline.