{ "cells": [ { "cell_type": "markdown", "id": "512def2e-ec76-47d5-92d0-1ace1d51414c", "metadata": {}, "source": [ "## Accessing Sentinel-3 SLSTR data with the Planetary Computer STAC API\n", "\n", "The [Sentinel 3 SLSTR instrument](https://sentinel.esa.int/web/sentinel/technical-guides/sentinel-3-slstr) is a Along-Track Scanning Radiometer (ATSR) designed to provide reference land surface and sea surface temperatures.\n", "There are three SLSTR collections in the Plantery Computer:\n", "\n", "- Fire radiative power: `sentinel-3-slstr-frp-l2-netcdf`\n", "- Land surface temperature: `sentinel-3-slstr-lst-l2-netcdf`\n", "- Water surface temperature: `sentinel-3-slstr-wst-l2-netcdf`\n", "\n", "This notebook demonstrates accessing and visualizing data from all three collections.\n", "\n", "### Data Access\n", "\n", "This notebook works with or without an API key, but you will be given more permissive access to the data with an API key. If you are using the [Planetary Computer Hub](https://planetarycomputer.microsoft.com/compute) to run this notebook, then your API key is automatically set to the environment variable `PC_SDK_SUBSCRIPTION_KEY` for you when your server is started. Otherwise, you can view your keys by signing in to the [developer portal](https://planetarycomputer.developer.azure-api.net/). The API key may be manually set via the environment variable `PC_SDK_SUBSCRIPTION_KEY` or the following code:\n", "\n", "```python\n", "import planetary_computer\n", "planetary_computer.settings.set_subscription_key()\n", "```\n", "\n", "The datasets hosted by the Planetary Computer are available in [Azure Blob Storage](https://docs.microsoft.com/en-us/azure/storage/blobs/). We'll use [pystac-client](https://pystac-client.readthedocs.io/) to search the Planetary Computer's [STAC API](https://planetarycomputer.microsoft.com/api/stac/v1/docs) for the subset of the data that we care about, and then we'll load the data directly from Azure Blob Storage. We'll specify a `modifier` so that we can access the data stored in the Planetary Computer's private Blob Storage Containers. See [Reading from the STAC API](https://planetarycomputer.microsoft.com/docs/quickstarts/reading-stac/) and [Using tokens for data access](https://planetarycomputer.microsoft.com/docs/concepts/sas/) for more.\n", "\n" ] }, { "cell_type": "markdown", "id": "e11587aa", "metadata": {}, "source": [ "### Land surface temperature\n", "\n", "The collection's description provides more information about the LST product." ] }, { "cell_type": "code", "execution_count": 1, "id": "8b9c7b88", "metadata": { "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/markdown": [ "### sentinel-3-slstr-lst-l2-netcdf\n", "\n", "This Collection provides Sentinel-3 [SLSTR Level-2 Land Surface Temperature](https://sentinel.esa.int/web/sentinel/user-guides/sentinel-3-slstr/product-types/level-2-lst) products containing data on land surface temperature measurements on a 1km grid. Radiance is measured in two channels to determine the temperature of the Earth's surface skin in the instrument field of view, where the term \"skin\" refers to the top surface of bare soil or the effective emitting temperature of vegetation canopies as viewed from above.\n", "\n", "## Data files\n", "\n", "The dataset includes data on the primary measurement variable, land surface temperature, in a single NetCDF file, `LST_in.nc`. A second file, `LST_ancillary.nc`, contains several ancillary variables:\n", "\n", "- Normalized Difference Vegetation Index\n", "- Surface biome classification\n", "- Fractional vegetation cover\n", "- Total water vapor column\n", "\n", "In addition to the primary and ancillary data files, a standard set of annotation data files provide meteorological information, geolocation and time coordinates, geometry information, and quality flags. More information about the product and data processing can be found in the [User Guide](https://sentinels.copernicus.eu/web/sentinel/user-guides/sentinel-3-slstr/product-types/level-2-lst) and [Technical Guide](https://sentinel.esa.int/web/sentinel/technical-guides/sentinel-3-slstr/level-2/lst-processing).\n", "\n", "This Collection contains Level-2 data in NetCDF files from April 2016 to present.\n", "\n", "## STAC Item geometries\n", "\n", "The Collection contains small \"chips\" and long \"stripes\" of data collected along the satellite direction of travel. Approximately five percent of the STAC Items describing long stripes of data contain geometries that encompass a larger area than an exact concave hull of the data extents. This may require additional filtering when searching the Collection for Items that spatially intersect an area of interest.\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import planetary_computer\n", "import pystac_client\n", "from IPython.display import display, Markdown\n", "\n", "catalog = pystac_client.Client.open(\n", " \"https://planetarycomputer.microsoft.com/api/stac/v1\",\n", " modifier=planetary_computer.sign_inplace,\n", ")\n", "collection = catalog.get_collection(\"sentinel-3-slstr-lst-l2-netcdf\")\n", "\n", "display(Markdown(f\"### {collection.id}\\n\\n{collection.description}\"))" ] }, { "cell_type": "markdown", "id": "dfe7f4ae-d5fd-494c-87e4-fc8010f524c7", "metadata": {}, "source": [ "### Define the area of interest and search the land surface temperature collection\n", "\n", "We'll search for items over the coordinates `[-105, 40]`." ] }, { "cell_type": "code", "execution_count": 2, "id": "3b7ff72d-9d8c-4505-b0dd-65ab5e4fd182", "metadata": { "tags": [], "vscode": { "languageId": "python" } }, "outputs": [], "source": [ "import xarray as xr\n", "import fsspec\n", "\n", "search = catalog.search(\n", " collections=[\"sentinel-3-slstr-lst-l2-netcdf\"],\n", " intersects={\"type\": \"Point\", \"coordinates\": [-105, 40]},\n", ")\n", "item = next(search.items())" ] }, { "cell_type": "markdown", "id": "46ff6ec3-ae8f-4e2e-96fc-c7b3726c8bd8", "metadata": {}, "source": [ "### Available Assets and Metadata\n", "\n", "Each item includes a handful of assets linking to NetCDF files with the data or additional metadata files." ] }, { "cell_type": "code", "execution_count": 3, "id": "4a9b22f3-3b64-4642-8416-52f0edeeabb6", "metadata": { "tags": [], "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/html": [ "
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n",
       "┃ Key                 Value                                                                         ┃\n",
       "┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n",
       "│ lst-in             │ Land Surface Temperature (LST) values                                         │\n",
       "│ slstr-met-tx       │ Meteorological parameters regridded onto the 16km tie points                  │\n",
       "│ safe-manifest      │ SAFE product manifest                                                         │\n",
       "│ slstr-time-in      │ Time annotations for the 1km grid                                             │\n",
       "│ slstr-flags-in     │ Global flags for the 1km TIR grid, nadir view                                 │\n",
       "│ lst-ancillary-ds   │ LST ancillary measurement dataset                                             │\n",
       "│ slstr-indices-in   │ Scan, pixel and detector indices annotations for the 1km TIR grid, nadir view │\n",
       "│ slstr-geodetic-in  │ Full resolution geodetic coordinates for the 1km TIR grid, nadir view         │\n",
       "│ slstr-geodetic-tx  │ 16km geodetic coordinates                                                     │\n",
       "│ slstr-geometry-tn  │ 16km solar and satellite geometry annotations, nadir view                     │\n",
       "│ slstr-cartesian-in │ Full resolution cartesian coordinates for the 1km TIR grid, nadir view        │\n",
       "│ slstr-cartesian-tx │ 16km cartesian coordinates                                                    │\n",
       "└────────────────────┴───────────────────────────────────────────────────────────────────────────────┘\n",
       "
\n" ], "text/plain": [ "┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n", "┃\u001b[1m \u001b[0m\u001b[1mKey \u001b[0m\u001b[1m \u001b[0m┃\u001b[1m \u001b[0m\u001b[1mValue \u001b[0m\u001b[1m \u001b[0m┃\n", "┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n", "│ lst-in │ Land Surface Temperature (LST) values │\n", "│ slstr-met-tx │ Meteorological parameters regridded onto the 16km tie points │\n", "│ safe-manifest │ SAFE product manifest │\n", "│ slstr-time-in │ Time annotations for the 1km grid │\n", "│ slstr-flags-in │ Global flags for the 1km TIR grid, nadir view │\n", "│ lst-ancillary-ds │ LST ancillary measurement dataset │\n", "│ slstr-indices-in │ Scan, pixel and detector indices annotations for the 1km TIR grid, nadir view │\n", "│ slstr-geodetic-in │ Full resolution geodetic coordinates for the 1km TIR grid, nadir view │\n", "│ slstr-geodetic-tx │ 16km geodetic coordinates │\n", "│ slstr-geometry-tn │ 16km solar and satellite geometry annotations, nadir view │\n", "│ slstr-cartesian-in │ Full resolution cartesian coordinates for the 1km TIR grid, nadir view │\n", "│ slstr-cartesian-tx │ 16km cartesian coordinates │\n", "└────────────────────┴───────────────────────────────────────────────────────────────────────────────┘\n" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import rich.table\n", "\n", "t = rich.table.Table(\"Key\", \"Value\")\n", "for key, asset in item.assets.items():\n", " t.add_row(key, asset.description)\n", "\n", "t" ] }, { "cell_type": "markdown", "id": "599fa91b-d2d9-428f-adf2-f79d9a3821e6", "metadata": {}, "source": [ "### Reading data\n", "\n", "We can use xarray to read each NetCDF file directly from Blob Storage." ] }, { "cell_type": "code", "execution_count": 4, "id": "503bbecb-12f2-4910-834f-d58d29694cb4", "metadata": { "tags": [], "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<xarray.Dataset>\n",
       "Dimensions:                 (rows: 1200, columns: 1500, orphan_pixels: 187)\n",
       "Dimensions without coordinates: rows, columns, orphan_pixels\n",
       "Data variables:\n",
       "    LST                     (rows, columns) float32 ...\n",
       "    LST_orphan              (rows, orphan_pixels) float32 ...\n",
       "    LST_uncertainty         (rows, columns) float32 ...\n",
       "    LST_uncertainty_orphan  (rows, orphan_pixels) float32 ...\n",
       "    exception               (rows, columns) int16 ...\n",
       "    exception_orphan        (rows, orphan_pixels) int16 ...\n",
       "Attributes: (12/17)\n",
       "    absolute_orbit_number:  37494\n",
       "    comment:                 \n",
       "    contact:                eosupport@copernicus.esa.int\n",
       "    creation_time:          20230501T144125Z\n",
       "    history:                  2023-05-01T14:41:25Z: PUGCoreProcessor joborder...\n",
       "    institution:            PS1\n",
       "    ...                     ...\n",
       "    source:                 IPF-SL-2 06.21\n",
       "    start_offset:           44020\n",
       "    start_time:             2023-04-30T04:39:31.438126Z\n",
       "    stop_time:              2023-04-30T04:42:31.129854Z\n",
       "    title:                  SLSTR Level 2 Product, Land Surface Temperature m...\n",
       "    track_offset:           998
" ], "text/plain": [ "\n", "Dimensions: (rows: 1200, columns: 1500, orphan_pixels: 187)\n", "Dimensions without coordinates: rows, columns, orphan_pixels\n", "Data variables:\n", " LST (rows, columns) float32 ...\n", " LST_orphan (rows, orphan_pixels) float32 ...\n", " LST_uncertainty (rows, columns) float32 ...\n", " LST_uncertainty_orphan (rows, orphan_pixels) float32 ...\n", " exception (rows, columns) int16 ...\n", " exception_orphan (rows, orphan_pixels) int16 ...\n", "Attributes: (12/17)\n", " absolute_orbit_number: 37494\n", " comment: \n", " contact: eosupport@copernicus.esa.int\n", " creation_time: 20230501T144125Z\n", " history: 2023-05-01T14:41:25Z: PUGCoreProcessor joborder...\n", " institution: PS1\n", " ... ...\n", " source: IPF-SL-2 06.21\n", " start_offset: 44020\n", " start_time: 2023-04-30T04:39:31.438126Z\n", " stop_time: 2023-04-30T04:42:31.129854Z\n", " title: SLSTR Level 2 Product, Land Surface Temperature m...\n", " track_offset: 998" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset = xr.open_dataset(fsspec.open(item.assets[\"lst-in\"].href).open())\n", "dataset" ] }, { "cell_type": "markdown", "id": "edb37542-993a-4f85-b80c-3f0c3f1f6fb4", "metadata": {}, "source": [ "### Geolocating and subsetting the data\n", "\n", "To plot the land surface temperature data, we will use the georeferencing information contained in the `slstr-geodetic-in` asset.\n", "There's so many points, and the data have such a large spatial extent, that we only need a random sample of the data rather than every point." ] }, { "cell_type": "code", "execution_count": 5, "id": "e499052b-d269-4747-b333-ebb56459ba99", "metadata": { "tags": [], "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<xarray.Dataset>\n",
       "Dimensions:              (rows: 1200, columns: 1500, orphan_pixels: 187)\n",
       "Dimensions without coordinates: rows, columns, orphan_pixels\n",
       "Data variables:\n",
       "    elevation_in         (rows, columns) float32 nan nan nan nan ... nan nan nan\n",
       "    elevation_orphan_in  (rows, orphan_pixels) float32 326.0 330.0 ... nan nan\n",
       "    latitude_in          (rows, columns) float64 33.52 33.52 33.52 ... 41.1 41.1\n",
       "    latitude_orphan_in   (rows, orphan_pixels) float64 33.0 32.97 ... nan nan\n",
       "    longitude_in         (rows, columns) float64 -94.72 -94.73 ... -114.2 -114.2\n",
       "    longitude_orphan_in  (rows, orphan_pixels) float64 -98.74 -98.9 ... nan nan\n",
       "Attributes: (12/17)\n",
       "    absolute_orbit_number:  37494\n",
       "    comment:                 \n",
       "    contact:                eosupport@copernicus.esa.int\n",
       "    creation_time:          20230501T144125Z\n",
       "    history:                  2023-05-01T14:41:25Z: PUGCoreProcessor joborder...\n",
       "    institution:            PS1\n",
       "    ...                     ...\n",
       "    source:                 IPF-SL-2 06.21\n",
       "    start_offset:           44020\n",
       "    start_time:             2023-04-30T04:39:31.438126Z\n",
       "    stop_time:              2023-04-30T04:42:31.129854Z\n",
       "    title:                  S3 SLSTR L1 Radiance and Brightness Temperatures ...\n",
       "    track_offset:           998
" ], "text/plain": [ "\n", "Dimensions: (rows: 1200, columns: 1500, orphan_pixels: 187)\n", "Dimensions without coordinates: rows, columns, orphan_pixels\n", "Data variables:\n", " elevation_in (rows, columns) float32 nan nan nan nan ... nan nan nan\n", " elevation_orphan_in (rows, orphan_pixels) float32 326.0 330.0 ... nan nan\n", " latitude_in (rows, columns) float64 33.52 33.52 33.52 ... 41.1 41.1\n", " latitude_orphan_in (rows, orphan_pixels) float64 33.0 32.97 ... nan nan\n", " longitude_in (rows, columns) float64 -94.72 -94.73 ... -114.2 -114.2\n", " longitude_orphan_in (rows, orphan_pixels) float64 -98.74 -98.9 ... nan nan\n", "Attributes: (12/17)\n", " absolute_orbit_number: 37494\n", " comment: \n", " contact: eosupport@copernicus.esa.int\n", " creation_time: 20230501T144125Z\n", " history: 2023-05-01T14:41:25Z: PUGCoreProcessor joborder...\n", " institution: PS1\n", " ... ...\n", " source: IPF-SL-2 06.21\n", " start_offset: 44020\n", " start_time: 2023-04-30T04:39:31.438126Z\n", " stop_time: 2023-04-30T04:42:31.129854Z\n", " title: S3 SLSTR L1 Radiance and Brightness Temperatures ...\n", " track_offset: 998" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "geo = xr.open_dataset(fsspec.open(item.assets[\"slstr-geodetic-in\"].href).open()).load()\n", "geo" ] }, { "cell_type": "code", "execution_count": 6, "id": "6d8b5d8e", "metadata": { "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
longitudelatitudelst
1020954-106.47721437.928197274.365997
1210376-111.48702438.031391272.294006
1078016-107.25955338.127250274.444000
861178-97.54940838.335761276.816010
1055490-106.92907238.053571267.406006
............
424405-110.15325633.394046287.675995
371951-110.52305432.971659292.160004
1170842-105.48569139.043829245.289993
255360-98.85143634.515057283.153992
1175948-112.19352337.647869278.306000
\n", "

10000 rows × 3 columns

\n", "
" ], "text/plain": [ " longitude latitude lst\n", "1020954 -106.477214 37.928197 274.365997\n", "1210376 -111.487024 38.031391 272.294006\n", "1078016 -107.259553 38.127250 274.444000\n", "861178 -97.549408 38.335761 276.816010\n", "1055490 -106.929072 38.053571 267.406006\n", "... ... ... ...\n", "424405 -110.153256 33.394046 287.675995\n", "371951 -110.523054 32.971659 292.160004\n", "1170842 -105.485691 39.043829 245.289993\n", "255360 -98.851436 34.515057 283.153992\n", "1175948 -112.193523 37.647869 278.306000\n", "\n", "[10000 rows x 3 columns]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas\n", "\n", "data = (\n", " pandas.DataFrame(\n", " {\n", " \"longitude\": geo.longitude_in.data.ravel(),\n", " \"latitude\": geo.latitude_in.data.ravel(),\n", " \"lst\": dataset.LST.load().data.ravel(),\n", " }\n", " )\n", " .dropna()\n", " .sample(10000)\n", ")\n", "data" ] }, { "cell_type": "markdown", "id": "ef263e15", "metadata": {}, "source": [ "### Plotting land surface temperature data\n", "\n", "We use a scatter plot to visualize the land surface temperature points over the globe.\n", "We also plot the item geometry, to give us a sense of the satellite's field of view and where that field of view crosses the land." ] }, { "cell_type": "code", "execution_count": 7, "id": "f926dacd", "metadata": { "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import shapely.geometry\n", "from cartopy.crs import PlateCarree\n", "from cartopy.feature import BORDERS\n", "import matplotlib.pyplot as plt\n", "\n", "fig, ax = plt.subplots(figsize=(12, 12), subplot_kw=dict(projection=PlateCarree()))\n", "\n", "ax.add_geometries(\n", " shapely.geometry.shape(item.geometry), crs=PlateCarree(), color=\"coral\", alpha=0.1\n", ")\n", "\n", "data.plot.scatter(\n", " x=\"longitude\",\n", " y=\"latitude\",\n", " c=\"lst\",\n", " ax=ax,\n", " colormap=\"viridis\",\n", " marker=\".\",\n", " alpha=0.2,\n", ")\n", "ax.set(ybound=(20, 50), xbound=(-120, -90))\n", "ax.coastlines()\n", "ax.add_feature(BORDERS, linestyle=\"-\")\n", "ax.gridlines(draw_labels=True, dms=True, x_inline=False, y_inline=False);" ] }, { "cell_type": "markdown", "id": "8557d45b", "metadata": {}, "source": [ "### Water surface temperature data\n", "\n", "Let's do the same process, but for the water surface temperature product.\n", "The data structure is a little different." ] }, { "cell_type": "code", "execution_count": 8, "id": "5c09ff0d", "metadata": { "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/markdown": [ "### sentinel-3-slstr-wst-l2-netcdf\n", "\n", "This Collection provides Sentinel-3 [SLSTR Level-2 Water Surface Temperature](https://sentinel.esa.int/web/sentinel/user-guides/sentinel-3-slstr/product-types/level-2-wst) products containing data on sea surface temperature measurements on a 1km grid. Each product consists of a single NetCDF file containing all data variables:\n", "\n", "- Sea Surface Temperature (SST) value\n", "- SST total uncertainty\n", "- Latitude and longitude coordinates\n", "- SST time deviation\n", "- Single Sensor Error Statistic (SSES) bias and standard deviation estimate\n", "- Contextual parameters such as wind speed at 10 m and fractional sea-ice contamination\n", "- Quality flag\n", "- Satellite zenith angle\n", "- Top Of Atmosphere (TOA) Brightness Temperature (BT)\n", "- TOA noise equivalent BT\n", "\n", "More information about the product and data processing can be found in the [User Guide](https://sentinels.copernicus.eu/web/sentinel/user-guides/sentinel-3-slstr/product-types/level-2-wst) and [Technical Guide](https://sentinel.esa.int/web/sentinel/technical-guides/sentinel-3-slstr/level-2/sst-processing).\n", "\n", "This Collection contains Level-2 data in NetCDF files from October 2017 to present.\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "collection = catalog.get_collection(\"sentinel-3-slstr-wst-l2-netcdf\")\n", "\n", "display(Markdown(f\"### {collection.id}\\n\\n{collection.description}\"))" ] }, { "cell_type": "code", "execution_count": 9, "id": "dffcec76", "metadata": { "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/html": [ "
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n",
       "┃ Key            Value                                                                                           ┃\n",
       "┡━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n",
       "│ l2p           │ Skin Sea Surface Temperature (SST) values                                                       │\n",
       "│ browse-jpg    │ Preview image produced by the European Organisation for the Exploitation of Meteorological      │\n",
       "│               │ Satellites (EUMETSAT)                                                                           │\n",
       "│ eop-metadata  │ Metadata produced by the European Organisation for the Exploitation of Meteorological           │\n",
       "│               │ Satellites (EUMETSAT)                                                                           │\n",
       "│ safe-manifest │ SAFE product manifest                                                                           │\n",
       "└───────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────┘\n",
       "
\n" ], "text/plain": [ "┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n", "┃\u001b[1m \u001b[0m\u001b[1mKey \u001b[0m\u001b[1m \u001b[0m┃\u001b[1m \u001b[0m\u001b[1mValue \u001b[0m\u001b[1m \u001b[0m┃\n", "┡━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n", "│ l2p │ Skin Sea Surface Temperature (SST) values │\n", "│ browse-jpg │ Preview image produced by the European Organisation for the Exploitation of Meteorological │\n", "│ │ Satellites (EUMETSAT) │\n", "│ eop-metadata │ Metadata produced by the European Organisation for the Exploitation of Meteorological │\n", "│ │ Satellites (EUMETSAT) │\n", "│ safe-manifest │ SAFE product manifest │\n", "└───────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────┘\n" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "search = catalog.search(\n", " collections=[\"sentinel-3-slstr-wst-l2-netcdf\"],\n", " intersects={\"type\": \"Point\", \"coordinates\": [-105, 40]},\n", ")\n", "item = next(search.items())\n", "t = rich.table.Table(\"Key\", \"Value\")\n", "for key, asset in item.assets.items():\n", " t.add_row(key, asset.description)\n", "\n", "t" ] }, { "cell_type": "code", "execution_count": 10, "id": "0dc20f6b", "metadata": { "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<xarray.Dataset>\n",
       "Dimensions:                            (time: 1, nj: 40394, ni: 1500, channel: 3)\n",
       "Coordinates:\n",
       "    lat                                (nj, ni) float32 ...\n",
       "    lon                                (nj, ni) float32 ...\n",
       "  * time                               (time) datetime64[ns] 2023-04-26T04:08:58\n",
       "Dimensions without coordinates: nj, ni, channel\n",
       "Data variables: (12/22)\n",
       "    adi_dtime_from_sst                 (time, nj, ni) float32 ...\n",
       "    aerosol_dynamic_indicator          (time, nj, ni) float32 ...\n",
       "    brightness_temperature             (channel, time, nj, ni) float32 ...\n",
       "    dt_analysis                        (time, nj, ni) float32 ...\n",
       "    dual_nadir_sst_difference          (time, nj, ni) float32 ...\n",
       "    l2p_flags                          (time, nj, ni) int16 ...\n",
       "    ...                                 ...\n",
       "    sses_standard_deviation            (time, nj, ni) float32 ...\n",
       "    sst_algorithm_type                 (time, nj, ni) int8 ...\n",
       "    sst_dtime                          (time, nj, ni) timedelta64[ns] ...\n",
       "    sst_theoretical_uncertainty        (time, nj, ni) float32 ...\n",
       "    wind_speed                         (time, nj, ni) float32 ...\n",
       "    wind_speed_dtime_from_sst          (time, nj, ni) float32 ...\n",
       "Attributes: (12/48)\n",
       "    Conventions:                CF-1.6, Unidata Observation Dataset v1.0\n",
       "    Metadata_Conventions:       Unidata Dataset Discovery v1.0\n",
       "    acknowledgment:             European Commission Copernicus Programme\n",
       "    cdm_data_type:              swath\n",
       "    comment:                    GHRSST SST L2P\n",
       "    creator_email:              ops@eumetsat.int\n",
       "    ...                         ...\n",
       "    summary:                    Sentinel-3A SLSTR skin sea surface temperature\n",
       "    time_coverage_end:          20230426T054956Z\n",
       "    time_coverage_start:        20230426T040858Z\n",
       "    title:                      Sentinel-3A SLSTR L2P SST dataset\n",
       "    uuid:                       TBC\n",
       "    westernmost_longitude:      -178.58172607421875
" ], "text/plain": [ "\n", "Dimensions: (time: 1, nj: 40394, ni: 1500, channel: 3)\n", "Coordinates:\n", " lat (nj, ni) float32 ...\n", " lon (nj, ni) float32 ...\n", " * time (time) datetime64[ns] 2023-04-26T04:08:58\n", "Dimensions without coordinates: nj, ni, channel\n", "Data variables: (12/22)\n", " adi_dtime_from_sst (time, nj, ni) float32 ...\n", " aerosol_dynamic_indicator (time, nj, ni) float32 ...\n", " brightness_temperature (channel, time, nj, ni) float32 ...\n", " dt_analysis (time, nj, ni) float32 ...\n", " dual_nadir_sst_difference (time, nj, ni) float32 ...\n", " l2p_flags (time, nj, ni) int16 ...\n", " ... ...\n", " sses_standard_deviation (time, nj, ni) float32 ...\n", " sst_algorithm_type (time, nj, ni) int8 ...\n", " sst_dtime (time, nj, ni) timedelta64[ns] ...\n", " sst_theoretical_uncertainty (time, nj, ni) float32 ...\n", " wind_speed (time, nj, ni) float32 ...\n", " wind_speed_dtime_from_sst (time, nj, ni) float32 ...\n", "Attributes: (12/48)\n", " Conventions: CF-1.6, Unidata Observation Dataset v1.0\n", " Metadata_Conventions: Unidata Dataset Discovery v1.0\n", " acknowledgment: European Commission Copernicus Programme\n", " cdm_data_type: swath\n", " comment: GHRSST SST L2P\n", " creator_email: ops@eumetsat.int\n", " ... ...\n", " summary: Sentinel-3A SLSTR skin sea surface temperature\n", " time_coverage_end: 20230426T054956Z\n", " time_coverage_start: 20230426T040858Z\n", " title: Sentinel-3A SLSTR L2P SST dataset\n", " uuid: TBC\n", " westernmost_longitude: -178.58172607421875" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset = xr.open_dataset(fsspec.open(item.assets[\"l2p\"].href).open())\n", "dataset" ] }, { "cell_type": "code", "execution_count": 11, "id": "f8235acd", "metadata": { "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
longitudelatitudesea_surface_temperature
14291493-97.294258-5.197991300.820007
4286758568.54457115.891827303.279999
5517750-77.549706-55.720612279.479980
5486910746.689182-54.085552272.519989
8737663-80.118530-35.690479286.100006
............
17576687-103.38062313.824631302.320007
4711241461.504601-8.788809302.169983
17712804-100.10387415.390665301.239990
5239043-81.084801-58.172470281.130005
5327867346.693626-43.741562280.130005
\n", "

10000 rows × 3 columns

\n", "
" ], "text/plain": [ " longitude latitude sea_surface_temperature\n", "14291493 -97.294258 -5.197991 300.820007\n", "42867585 68.544571 15.891827 303.279999\n", "5517750 -77.549706 -55.720612 279.479980\n", "54869107 46.689182 -54.085552 272.519989\n", "8737663 -80.118530 -35.690479 286.100006\n", "... ... ... ...\n", "17576687 -103.380623 13.824631 302.320007\n", "47112414 61.504601 -8.788809 302.169983\n", "17712804 -100.103874 15.390665 301.239990\n", "5239043 -81.084801 -58.172470 281.130005\n", "53278673 46.693626 -43.741562 280.130005\n", "\n", "[10000 rows x 3 columns]" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas\n", "\n", "data = (\n", " pandas.DataFrame(\n", " {\n", " \"longitude\": dataset.lon.data.ravel(),\n", " \"latitude\": dataset.lat.data.ravel(),\n", " \"sea_surface_temperature\": dataset.sea_surface_temperature.load().data.ravel(),\n", " }\n", " )\n", " .dropna()\n", " .sample(10000)\n", ")\n", "data" ] }, { "cell_type": "code", "execution_count": 12, "id": "1cd6b497", "metadata": { "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "figure, axes = plt.subplots(figsize=(12, 8), subplot_kw=dict(projection=PlateCarree()))\n", "\n", "axes.add_geometries(\n", " shapely.geometry.shape(item.geometry), crs=PlateCarree(), color=\"coral\", alpha=0.1\n", ")\n", "\n", "data.plot.scatter(\n", " x=\"longitude\",\n", " y=\"latitude\",\n", " c=\"sea_surface_temperature\",\n", " ax=axes,\n", " colormap=\"viridis\",\n", " marker=\".\",\n", " alpha=0.8,\n", ")\n", "axes.coastlines();" ] }, { "cell_type": "markdown", "id": "d84d1bf8", "metadata": {}, "source": [ "### Fire radiative power\n", "\n", "We'll do the same for fire radiative power.\n", "This product's items are smaller chips.\n", "Let's use an item that crosses over California to give ourselves the best chance of catching data of interest." ] }, { "cell_type": "code", "execution_count": 13, "id": "8e2330ba", "metadata": { "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/markdown": [ "### sentinel-3-slstr-frp-l2-netcdf\n", "\n", "This Collection provides Sentinel-3 [SLSTR Level-2 Fire Radiative Power](https://sentinel.esa.int/web/sentinel/user-guides/sentinel-3-slstr/product-types/level-2-frp) (FRP) products containing data on fires detected over land and ocean.\n", "\n", "## Data files\n", "\n", "The primary measurement data is contained in the `FRP_in.nc` file and provides FRP and uncertainties, projected onto a 1km grid, for fires detected in the thermal infrared (TIR) spectrum over land. Since February 2022, FRP and uncertainties are also provided for fires detected in the short wave infrared (SWIR) spectrum over both land and ocean, with the delivered data projected onto a 500m grid. The latter SWIR-detected fire data is only available for night-time measurements and is contained in the `FRP_an.nc` or `FRP_bn.nc` files.\n", "\n", "In addition to the measurement data files, a standard set of annotation data files provide meteorological information, geolocation and time coordinates, geometry information, and quality flags.\n", "\n", "## Processing\n", "\n", "The TIR fire detection is based on measurements from the S7 and F1 bands of the [SLSTR instrument](https://sentinels.copernicus.eu/web/sentinel/technical-guides/sentinel-3-slstr/instrument); SWIR fire detection is based on the S5 and S6 bands. More information about the product and data processing can be found in the [User Guide](https://sentinel.esa.int/web/sentinel/user-guides/sentinel-3-slstr/product-types/level-2-frp) and [Technical Guide](https://sentinel.esa.int/web/sentinel/technical-guides/sentinel-3-slstr/level-2/frp-processing).\n", "\n", "This Collection contains Level-2 data in NetCDF files from August 2020 to present.\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "collection = catalog.get_collection(\"sentinel-3-slstr-frp-l2-netcdf\")\n", "\n", "display(Markdown(f\"### {collection.id}\\n\\n{collection.description}\"))" ] }, { "cell_type": "code", "execution_count": 14, "id": "1b1a71fe", "metadata": { "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/html": [ "
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n",
       "┃ Key                 Value                                                                  ┃\n",
       "┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n",
       "│ frp-in             │ Fire Radiative Power (FRP) dataset                                     │\n",
       "│ slstr-met-tx       │ Meteorological parameters regridded onto the 16km tie points           │\n",
       "│ safe-manifest      │ SAFE product manifest                                                  │\n",
       "│ slstr-time-in      │ Time annotations for the 1 KM grid                                     │\n",
       "│ slstr-flags-fn     │ Global flags for the 1km F1 grid, nadir view                           │\n",
       "│ slstr-flags-in     │ Global flags for the 1km TIR grid, nadir view                          │\n",
       "│ slstr-indices-fn   │ Scan, pixel and detector annotations for the 1km F1 grid, nadir view   │\n",
       "│ slstr-indices-in   │ Scan, pixel and detector annotations for the 1km TIR grid, nadir view  │\n",
       "│ slstr-geodetic-fn  │ Full resolution geodetic coordinates for the 1km F1 grid, nadir view   │\n",
       "│ slstr-geodetic-in  │ Full resolution geodetic coordinates for the 1km TIR grid, nadir view  │\n",
       "│ slstr-geodetic-tx  │ 16km geodetic coordinates                                              │\n",
       "│ slstr-geometry-tn  │ 16km solar and satellite geometry annotations, nadir view              │\n",
       "│ slstr-cartesian-fn │ Full resolution cartesian coordinates for the 1km F1 grid, nadir view  │\n",
       "│ slstr-cartesian-in │ Full resolution cartesian coordinates for the 1km TIR grid, nadir view │\n",
       "│ slstr-cartesian-tx │ 16km cartesian coordinates                                             │\n",
       "└────────────────────┴────────────────────────────────────────────────────────────────────────┘\n",
       "
\n" ], "text/plain": [ "┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n", "┃\u001b[1m \u001b[0m\u001b[1mKey \u001b[0m\u001b[1m \u001b[0m┃\u001b[1m \u001b[0m\u001b[1mValue \u001b[0m\u001b[1m \u001b[0m┃\n", "┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n", "│ frp-in │ Fire Radiative Power (FRP) dataset │\n", "│ slstr-met-tx │ Meteorological parameters regridded onto the 16km tie points │\n", "│ safe-manifest │ SAFE product manifest │\n", "│ slstr-time-in │ Time annotations for the 1 KM grid │\n", "│ slstr-flags-fn │ Global flags for the 1km F1 grid, nadir view │\n", "│ slstr-flags-in │ Global flags for the 1km TIR grid, nadir view │\n", "│ slstr-indices-fn │ Scan, pixel and detector annotations for the 1km F1 grid, nadir view │\n", "│ slstr-indices-in │ Scan, pixel and detector annotations for the 1km TIR grid, nadir view │\n", "│ slstr-geodetic-fn │ Full resolution geodetic coordinates for the 1km F1 grid, nadir view │\n", "│ slstr-geodetic-in │ Full resolution geodetic coordinates for the 1km TIR grid, nadir view │\n", "│ slstr-geodetic-tx │ 16km geodetic coordinates │\n", "│ slstr-geometry-tn │ 16km solar and satellite geometry annotations, nadir view │\n", "│ slstr-cartesian-fn │ Full resolution cartesian coordinates for the 1km F1 grid, nadir view │\n", "│ slstr-cartesian-in │ Full resolution cartesian coordinates for the 1km TIR grid, nadir view │\n", "│ slstr-cartesian-tx │ 16km cartesian coordinates │\n", "└────────────────────┴────────────────────────────────────────────────────────────────────────┘\n" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "search = catalog.search(\n", " collections=[\"sentinel-3-slstr-frp-l2-netcdf\"],\n", " intersects={\"type\": \"Point\", \"coordinates\": [-121, 40]},\n", ")\n", "item = next(search.items())\n", "t = rich.table.Table(\"Key\", \"Value\")\n", "for key, asset in item.assets.items():\n", " t.add_row(key, asset.description)\n", "\n", "t" ] }, { "cell_type": "code", "execution_count": 15, "id": "663e977b", "metadata": { "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<xarray.Dataset>\n",
       "Dimensions:                 (fires: 88, rows: 1200, columns: 1500)\n",
       "Dimensions without coordinates: fires, rows, columns\n",
       "Data variables: (12/25)\n",
       "    BT_MIR                  (fires) float64 ...\n",
       "    BT_window               (fires) float64 ...\n",
       "    Day_night               (fires) int8 ...\n",
       "    F1_Fire_pixel_radiance  (fires) float64 ...\n",
       "    FRP_MWIR                (fires) float64 ...\n",
       "    FRP_uncertainty_MWIR    (fires) float64 ...\n",
       "    ...                      ...\n",
       "    n_cloud                 (fires) int16 ...\n",
       "    n_water                 (fires) int16 ...\n",
       "    n_window                (fires) int16 ...\n",
       "    time                    (fires) datetime64[ns] ...\n",
       "    transmittance_MWIR      (fires) float64 ...\n",
       "    used_channel            (fires) uint8 ...\n",
       "Attributes: (12/17)\n",
       "    absolute_orbit_number:  26107\n",
       "    comment:                 \n",
       "    contact:                eosupport@copernicus.esa.int\n",
       "    creation_time:          20230501T123812Z\n",
       "    history:                  2023-05-01T12:38:12Z: PUGCoreProcessor JobOrder...\n",
       "    institution:            PS2\n",
       "    ...                     ...\n",
       "    source:                 IPF-SL-2-FRP 01.08\n",
       "    start_offset:           56043\n",
       "    start_time:             2023-04-30T17:58:15.260256Z\n",
       "    stop_time:              2023-04-30T18:01:14.953810Z\n",
       "    title:                  SLSTR Level 2 Product, Fire Radiative Power measu...\n",
       "    track_offset:           998
" ], "text/plain": [ "\n", "Dimensions: (fires: 88, rows: 1200, columns: 1500)\n", "Dimensions without coordinates: fires, rows, columns\n", "Data variables: (12/25)\n", " BT_MIR (fires) float64 ...\n", " BT_window (fires) float64 ...\n", " Day_night (fires) int8 ...\n", " F1_Fire_pixel_radiance (fires) float64 ...\n", " FRP_MWIR (fires) float64 ...\n", " FRP_uncertainty_MWIR (fires) float64 ...\n", " ... ...\n", " n_cloud (fires) int16 ...\n", " n_water (fires) int16 ...\n", " n_window (fires) int16 ...\n", " time (fires) datetime64[ns] ...\n", " transmittance_MWIR (fires) float64 ...\n", " used_channel (fires) uint8 ...\n", "Attributes: (12/17)\n", " absolute_orbit_number: 26107\n", " comment: \n", " contact: eosupport@copernicus.esa.int\n", " creation_time: 20230501T123812Z\n", " history: 2023-05-01T12:38:12Z: PUGCoreProcessor JobOrder...\n", " institution: PS2\n", " ... ...\n", " source: IPF-SL-2-FRP 01.08\n", " start_offset: 56043\n", " start_time: 2023-04-30T17:58:15.260256Z\n", " stop_time: 2023-04-30T18:01:14.953810Z\n", " title: SLSTR Level 2 Product, Fire Radiative Power measu...\n", " track_offset: 998" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset = xr.open_dataset(fsspec.open(item.assets[\"frp-in\"].href).open())\n", "dataset" ] }, { "cell_type": "code", "execution_count": 16, "id": "6a8dfd44", "metadata": { "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
longitudelatituderadiance
0-113.65980939.6880160.918481
1-111.47633038.80127011.352760
2-111.46470538.7999322.332020
3-118.06422639.2643681.464294
4-121.64164139.0838071.075822
............
83-114.84357133.9286731.640789
84-114.84541833.9198611.625753
85-114.83500033.9171161.606819
86-110.98344729.5552282.122387
87-110.98877129.5460352.029452
\n", "

88 rows × 3 columns

\n", "
" ], "text/plain": [ " longitude latitude radiance\n", "0 -113.659809 39.688016 0.918481\n", "1 -111.476330 38.801270 11.352760\n", "2 -111.464705 38.799932 2.332020\n", "3 -118.064226 39.264368 1.464294\n", "4 -121.641641 39.083807 1.075822\n", ".. ... ... ...\n", "83 -114.843571 33.928673 1.640789\n", "84 -114.845418 33.919861 1.625753\n", "85 -114.835000 33.917116 1.606819\n", "86 -110.983447 29.555228 2.122387\n", "87 -110.988771 29.546035 2.029452\n", "\n", "[88 rows x 3 columns]" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas\n", "\n", "data = pandas.DataFrame(\n", " {\n", " \"longitude\": dataset.longitude.data.ravel(),\n", " \"latitude\": dataset.latitude.data.ravel(),\n", " \"radiance\": dataset.F1_Fire_pixel_radiance.load().data.ravel(),\n", " }\n", ").dropna()\n", "data" ] }, { "cell_type": "code", "execution_count": 17, "id": "fe342e86", "metadata": { "tags": [], "vscode": { "languageId": "python" } }, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from cartopy.feature import RIVERS, COASTLINE\n", "\n", "figure, axes = plt.subplots(figsize=(12, 8), subplot_kw=dict(projection=PlateCarree()))\n", "\n", "axes.add_feature(RIVERS)\n", "axes.add_feature(COASTLINE)\n", "data.plot.scatter(\n", " x=\"longitude\", y=\"latitude\", c=\"radiance\", ax=axes, colormap=\"viridis\", marker=\".\"\n", ")\n", "axes.set_extent((-125, -120, 37, 42));" ] } ], "metadata": { "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.9" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": {}, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 5 }