Part 0 - Introduction

Prepared by Robin Noyelle.

Description of the project

This project is about computing a climatology of frontal structures with the output of a climate model. You will learn:

  • how to work with typical climate model data (including data format and plotting)

  • how to make computations on climate model data to isolate physical structures

  • how to distinguish between fast and slow implementations of python computations

We are going to use the output of one of the members of the CESM2 climate model large ensemble (Danabasoglu et al., 2020) for illustration of key concepts in climate model data handling. Because of time and space limitations, we will use only 10 years of this output (from 2015 to 2024). For your information, the large ensemble spans the period 1850-2100 and has 100 members.

We will study a key meteorological structure in the atmosphere: fronts. A weather front is generally defined as a transition zone between two different air masses which have different properties, especially in terms of temperature and humidity. The existence of fronts in the atmosphere comes from the fact that fluid masses do not mix easily on a rotating sphere such as the Earth. Fronts are often associated to precipitation (especially in the mid-latitudes) and the capacity of the model to correctly represent their frequency is therefore of utter importance for climate models projections to be useful. Fronts usually come in two forms: cold fronts and warm fronts. The distinction between the two is straightforward: a cold front occurs when cold air replaces warm air, whereas a warm front occurs when warm air replaces cold air. However, these two kinds of fronts have different physical properties and structures.

In this project we will be interested in fronts at 700hPa (what is the average corresponding altitude ?). We make use of four daily mean variables from the model:

(i) temperature t (ii) specific humidity q (iii) meridional wind speed v (iv) zonal wind speed u. The first two variables will be useful to find the fronts, while the last two will be used to distinguish between cold and warm fronts.

The project consists of three parts:

  • Part 1: Load gridded model data, compute equivalent potential temperature and identify visually fronts on specific days

  • Part 2: Identify warm and cold fronts based on the gradient of equivalent potential temperature for some specific dates

  • Part 3: Compute warm and cold fronts over the 10 years period and plot a climatology of the fronts you found

In each part we will try to illustrate how to make your code faster by implementing smartly the computations needed.

Download data

  • Create a new folder, name suggestion: ipp_project_fronts in your ip_python folder

  • In this folder, create two folders: one for the code (named code) and one for the data (named data)

  • Download the data file fronts_data.zip (2.3 GB) into ../ipp_project_fronts/data

  • Unzip fronts_data.zip

  • Remove fronts_data.zip You should now have four netcdf files q700_2015-2024.nc, t700_2015-2024.nc, u700_2015-2024.nc and v700_2015-2024.nc.

Python environment and Jupyter Lab

We will use the ipp_analysis environment that you have set up in the introduction of this course. Go to the directory ../ipp_project_fronts/code, open jupyter lab as in the introduction and create a notebook. You can choose the name of your notebooks but remember that being organized is usually a good idea (the you of the future will thank you, believe me…), so why not creating one notebook per part and giving them a name accordingly ;)

Getting help

These exercises can be challenging because they don’t provide any code for you to adapt. You are expected to write it yourself, which can be difficult! We want this to be an exciting learning experience and not a frustrating one - so we are available for questions at any time during the course. However, before you contact us you should try it yourself first. Especially, when you get an error, the bare minimum is (i) try to solve it yourself (it is likely that you have a small mistake in your code) and (ii) search for your error in the web. If you are stuck for more than half an hour or if you get frustrated, contact us by email. However, don’t just write “it doesn’t work” - the better you can describe your issue the easier it is to help you (this is a very important skill to get help from “the internet”):

  • mention which exercise you are working on

  • potentially copy the code that causes the issue

  • potentially copy the error message you get

  • make a screenshot of the code (but often copying the error & code as text is better)

References

Danabasoglu, G., Lamarque, J. F., Bacmeister, J., Bailey, D. A., DuVivier, A. K., Edwards, J., … & Strand, W. G. (2020). The community earth system model version 2 (CESM2). Journal of Advances in Modeling Earth Systems, 12(2), e2019MS001916.