{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Gauss grid resolution" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:34:54.188218Z", "iopub.status.busy": "2025-01-13T11:34:54.187705Z", "iopub.status.idle": "2025-01-13T11:34:54.711386Z", "shell.execute_reply": "2025-01-13T11:34:54.710879Z" } }, "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:34:54.713579Z", "iopub.status.busy": "2025-01-13T11:34:54.713338Z", "iopub.status.idle": "2025-01-13T11:34:54.915433Z", "shell.execute_reply": "2025-01-13T11:34:54.914933Z" } }, "outputs": [], "source": [ "# open resource in read mode\n", "g = epygram.open(os.path.join(INPUTS_DIR, 'analysis.full-arpege.tl149-c24.fa'), 'r')\n", "f = g.readfield('SURFTEMPERATURE')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:34:54.917457Z", "iopub.status.busy": "2025-01-13T11:34:54.917326Z", "iopub.status.idle": "2025-01-13T11:34:54.921011Z", "shell.execute_reply": "2025-01-13T11:34:54.920644Z" } }, "outputs": [], "source": [ "print(f.geometry.resolution_ll(2,45))" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:34:54.922893Z", "iopub.status.busy": "2025-01-13T11:34:54.922702Z", "iopub.status.idle": "2025-01-13T11:34:55.864291Z", "shell.execute_reply": "2025-01-13T11:34:55.863884Z" } }, "outputs": [], "source": [ "r = f.geometry.resolution_field_from_stretching()\n", "fig, ax = r.cartoplot(colorsnumber=10)" ] }, { "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 }