{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Comparison of 2 fields through a scatter-plot" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:31:51.227971Z", "iopub.status.busy": "2025-01-13T11:31:51.227386Z", "iopub.status.idle": "2025-01-13T11:31:51.757933Z", "shell.execute_reply": "2025-01-13T11:31:51.757516Z" } }, "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:31:51.760103Z", "iopub.status.busy": "2025-01-13T11:31:51.759883Z", "iopub.status.idle": "2025-01-13T11:31:51.906828Z", "shell.execute_reply": "2025-01-13T11:31:51.906406Z" } }, "outputs": [], "source": [ "# open resource in read mode\n", "r = epygram.open(os.path.join(INPUTS_DIR, 'ICMSHAROM+0022'), 'r')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:31:51.909012Z", "iopub.status.busy": "2025-01-13T11:31:51.908833Z", "iopub.status.idle": "2025-01-13T11:31:53.960948Z", "shell.execute_reply": "2025-01-13T11:31:53.960331Z" } }, "outputs": [], "source": [ "t90 = r.readfield('S090TEMPERATURE')\n", "t90.sp2gp()\n", "t2m = r.readfield('CLSTEMPERATURE')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:31:53.963133Z", "iopub.status.busy": "2025-01-13T11:31:53.962983Z", "iopub.status.idle": "2025-01-13T11:31:54.199408Z", "shell.execute_reply": "2025-01-13T11:31:54.199007Z" } }, "outputs": [], "source": [ "fig, ax = t2m.scatter_with(t90, figsize=(8,8), subzone='CI', fidkey='FA')" ] }, { "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 }