{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Projection of the plot: satellite view" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:30:20.062360Z", "iopub.status.busy": "2025-01-13T11:30:20.061855Z", "iopub.status.idle": "2025-01-13T11:30:20.587306Z", "shell.execute_reply": "2025-01-13T11:30:20.586699Z" } }, "outputs": [], "source": [ "%matplotlib inline\n", "# for figures in notebook\n", "\n", "# import & initialize epygram\n", "import epygram\n", "epygram.init_env()\n", "\n", "import os\n", "INPUTS_DIR = os.path.join('..', 'inputs')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:30:20.589542Z", "iopub.status.busy": "2025-01-13T11:30:20.589297Z", "iopub.status.idle": "2025-01-13T11:30:20.706300Z", "shell.execute_reply": "2025-01-13T11:30:20.705819Z" } }, "outputs": [], "source": [ "r = epygram.open(os.path.join(INPUTS_DIR, 'grid.arome-forecast.guyane0025+0012:00.grib'), 'r')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:30:20.708318Z", "iopub.status.busy": "2025-01-13T11:30:20.708151Z", "iopub.status.idle": "2025-01-13T11:30:21.019662Z", "shell.execute_reply": "2025-01-13T11:30:21.019159Z" } }, "outputs": [], "source": [ "f = r.readfield('shortName:2r')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:30:21.021940Z", "iopub.status.busy": "2025-01-13T11:30:21.021713Z", "iopub.status.idle": "2025-01-13T11:30:22.158050Z", "shell.execute_reply": "2025-01-13T11:30:22.157648Z" } }, "outputs": [], "source": [ "from cartopy.crs import NearsidePerspective\n", "proj = NearsidePerspective(central_longitude=-60.,\n", " central_latitude=10.,\n", " satellite_height=1e6)\n", "fig, ax = f.cartoplot(projection=proj, extent='global', colormap='viridis_r')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 2 }