{
"cells": [
{
"cell_type": "markdown",
"id": "d157bce7-ea0e-45ad-9c4e-7ee254b54d92",
"metadata": {
"tags": []
},
"source": [
"
\n",
"\n",
"# ICON Training - Hands-on Session - Basic Plot Script for Ex 5 - Allocating Additional Fields\n",
"---"
]
},
{
"cell_type": "markdown",
"id": "38c20862-5e83-4989-b72a-47da1e8483d3",
"metadata": {},
"source": [
"This is a Python 3 Jupyter notebook. We create a plot with Matplotlib and Cartopy and start by loading the necessary modules."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2e0f9f82-1eb9-4e3c-b7ef-72115a70c0d8",
"metadata": {},
"outputs": [],
"source": [
"import getpass\n",
"import numpy as np\n",
"import xarray as xr\n",
"import cartopy\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "markdown",
"id": "c11082ca-9043-499e-9774-461180eda54f",
"metadata": {},
"source": [
"Define the directory and filenames."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8a2d2642-a044-4848-8e51-b52b1bdc5cbb",
"metadata": {},
"outputs": [],
"source": [
"user = getpass.getuser()\n",
"\n",
"# absolute path to directory with plenty of space:\n",
"EXPDIR=f\"/scratch/{user[0]}/{user}/exercise_programming/\"\n",
"\n",
"# file names\n",
"filename_ll = f\"{EXPDIR}/Ex5_Diagnostic_DOM01_20210714T120000Z.nc\"\n",
"print(f\"Filename: {filename_ll=}\")"
]
},
{
"cell_type": "markdown",
"id": "59e7225f-9361-4ea5-a838-0b6969eec772",
"metadata": {},
"source": [
"