Part 0 - Intro & preparation
Prepared by Mathias Hauser.
In this project you will learn some aspects on how to work with climate model data. This is a fundamental skill for climate scientists, but will also be helpful for any other subject as it covers topics like loading and manipulating data, computing average statistics, plotting, …
The data used stems from the sixth phase of the Coupled Model Intercomparison Project
(CMIP6; Eyring et al., 2016),
an experiment where a large number of groups run their climate model with the same
boundary conditions. Here we make use of two climate variables, (i) mean surface
air temperature, abbreviated tas
in CMIP6 and (ii) the daily maximum temperatures
- tasmax
- or rather its annual maximum - named TXx.
The project consists of four parts - the code you need to write was mostly presented in the introduction but also extends it.
Part 1: Load gridded model temperature data and calculate the global mean.
Part 2: Load global mean temperature data and analyse how the temperature evolution compares between different models. Also compare the warming of the annual maximum temperature (TXx) for two models.
Part 3: Calculate the time period when a climate model reaches a certain global mean temperature anomaly - a global warming level (GWL), and compare TXx for two models for the the same GWL.
Part 4: Learn a more convenient way to load the data of several climate models and compare TXx for two global warming levels.
Tip
The different Parts build on each other.
Hand ins
For students if the ip python course: please submit Part 1 on the first hand in date and Part 4 on the second hand in date.
Download data
Before we can start you need to download the data:
Create a new folder, name suggestion:
ipp_project_cmip
in yourip_python
folder.Download the data file
cmip_data.zip
(600 MB) intoproject_cmip
.Unzip
cmip_data.zip
Make sure your folder structure looks as follows:
project_cmip ├── code └── data └── cmip6 ├── tas └── tasmax └── txx
You can now delete
cmip_data.zip
Start jupyterlab
Start jupyter lab on your computer - or log in to the JupyterHub instance!
To start jupyter lab
Open a
terminal
(or theMiniforge prompt
on windows)Make sure you are in the
(base)
environment and startjupyter lab
If your browser does not automatically open, copy the address to a browser.
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! I want this to be an exiting learning experience and not a frustrating one - so I am available for questions at any time during the course. However, before you contact me you should try it yourself first. Also, remember that most of the code you need to write was already shown in the introduction. Thus, before you write me an email,
Check the introduction for the topic. It’s perfectly fine to copy-paste code snippets from the intro.
Search the web. Often looking for the library name and a keyword, yields good results, e.g.,
xarray groupby
orpandas to xarray
, …If you are stuck for more than half an hour or if you get frustrated, contact me 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 coping the error & code as text is better)