{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Figure 10.\n", "\n", "Snapshot of top-of-atmosphere outgoing longwave radiation ($W~m^{-2}$) in the Proxima b simulation at 102 d: from the global model (a) over the whole planet, (b) zoomed in on the *HighRes* domain; and (c) from the *HighRes* simulation. The dark blue box in (a) shows the location of the *HighRes* domain. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[Skip code and jump to the figure](#Show-the-figure)\n", "\n", "----------------------------------" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Import the necessary libraries." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import warnings\n", "\n", "warnings.filterwarnings(\"ignore\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Progress bar" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "from fastprogress import progress_bar" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "from datetime import datetime, timedelta" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Scientific stack" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "import cartopy.crs as ccrs\n", "import iris\n", "\n", "import numpy as np\n", "\n", "from matplotlib import gridspec\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "from aeolus.coord_utils import UM_LATLON\n", "from aeolus.core import Run\n", "from aeolus.plot import GeoAxesGrid, label_global_map_gridlines\n", "from aeolus.region import Region\n", "from aeolus.util import fmt_lonlat, subplot_label_generator" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Local modules" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "from commons import (\n", " DT_FMT,\n", " FCST_DIM_CNSTR,\n", " FCST_PRD_CNSTR,\n", " GLM_RUNID,\n", " NS_COLORS,\n", " NS_MODEL_TYPES,\n", " NS_RUN_ALIASES,\n", " NS_RUNID,\n", " PLANET_ALIASES,\n", ")\n", "import mypaths\n", "from plot_func import use_style, CART_KW\n", "from proc_um_output import process_cubes" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Global stylesheet for figures." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "use_style()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "A few local definitions" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "planet = \"proxb\"\n", "run_key = \"grcs\"\n", "\n", "OUTPUT_NAME_PREFIX = f\"{planet}_{run_key}\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Define the region to zoom in to in the figure." ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [], "source": [ "ss_region = Region(-10, 30, -20, 20, \"HighRes domain\")\n", "\n", "extent = [i[\"value\"] for i in ss_region]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Set metadata for the variable." ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "varname = \"toa_outgoing_longwave_flux\"\n", "short_name = \"TOA OLR\"\n", "tex_units = \"$W$ $m^{-2}$\"\n", "plt_kw = dict(cmap=\"Greys\", vmin=60, vmax=270)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Load data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Change file mask to load only the files with TOA radiation data." ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "NS_MODEL_TYPES[\"global\"][\"path\"] = (\n", " NS_MODEL_TYPES[\"global\"][\"path\"].parent / f\"{GLM_RUNID}_pd*\"\n", ")\n", "NS_MODEL_TYPES[\"lam\"][\"path\"] = NS_MODEL_TYPES[\"lam\"][\"path\"].parent / f\"{NS_RUNID}_pa*\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Create a dictionary of `Run` objects with UM data." ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "