Preparing data for climate change analysis using MATLAB

Alexandre Martinez, University of California-Irvine, Civil Engineering
Author Profile
Initial Publication Date: August 23, 2019 | Reviewed: October 20, 2019


In this activity, we mainly learn the importance of analyzing data format before applying models to it, with the examples of drought. We use monthly precipitation from the Climate Research Unit (gridded data) and assess if it is suitable for extreme events or climate change analysis. We learn how to be critical with the initial data provided, about the results calculated, and how to ensure the quality of the calculations performed and to put the results calculated with model in perspective to the empirical results.

Used this activity? Share your experiences and modifications

Learning Goals

The principal obective of this activity is to be critical when using data and be able to quickly indentify a dataset with low consistency. In this activity, the student will learn

  • to inspect different key characteristics of a dataset (space uniformity, time variation).
  • different strategies data providers are using for filling missing data and how to reveal them.

Context for Use

This activity is designed for the people who wants to learn how to be critical with climate data analysis and for the students who are working on data analysis, at any academic level (undergraduate or graduate). Students with limited coding experiences will be able to successfully complete this activity since it involves more thinking than coding. However basic experience in Matlab syntax is preferred. Basic knowledge of data analysis is also preferred but not required.

Description and Teaching Materials

In the handout

Proposal (Acrobat (PDF) 88kB Aug19 19)

Handout (Acrobat (PDF) 551kB Aug19 19)

dataset (Matlab .MAT File 23.2MB Aug19 19)

Code (Zip Archive 3kB Aug19 19)

livescript.mlx (MATLAB Live Script 741kB Nov5 19)

livescript.pdf (Acrobat (PDF) 4.8MB Nov5 19)

Teaching Notes and Tips

This activity can be performed with other climatic variables: temperature, moisture, etc... Students should make simple calculations (such as average in space or time) and be critical with the physical meaning of the results. Randomly selected a pixel to make a point analysis and look at each steps in details prior going to a global analysis is very common and students should not be afraid (i.e. they should be grade-rewarded) to make extra analysis.


At the end of the activity, the student should have a global map of the length of record of precipitation using CRU data.

References and Resources

AghaKouchak, A., et al. "Remote sensing of drought: Progress, challenges and opportunities." Reviews of Geophysics 53.2 (2015): 452-480.

Martinez, A. "Climate change and extreme values analysis", Teaching Computation in the Sciences Using MATLAB Exemplary Teaching Activities collection (2018).