{ "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Extras: load netCDF files directly from HTTPS\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, "outputs": [], "source": [ "from netCDF4 import Dataset\n", "\n", "try:\n", " url = (\n", " \"https://noaa-goes16.s3.amazonaws.com/\"\n", " \"ABI-L2-CMIPC/2019/027/00/\"\n", " \"OR_ABI-L2-CMIPC-M3C01_G16_\"\n", " \"s20190270002156_e20190270004529_c20190270004598.nc\"\n", " )\n", " nc = Dataset(url)\n", "except OSError as e:\n", " print(e)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, "outputs": [], "source": [ "with Dataset(f\"{url}#mode=bytes\") as nc:\n", " print(nc.summary)" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "![](https://media.giphy.com/media/12NUbkX6p4xOO4/giphy.gif)\n" ] } ], "metadata": { "celltoolbar": "Slideshow", "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.5" }, "livereveal": { "auto_select": "none", "footer": " ", "header": "", "start_slideshow_at": "selected" } }, "nbformat": 4, "nbformat_minor": 4 }