{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 4: Rising Seas\n", "\n", "### Generation of plots based on [the relevant Climate Indicators' report](https://climate.copernicus.eu/climate-indicators/sea-level)." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "The ocean water in our planet covers over 70% of its surface, making it an ocean world. Not only that, but a large part of the global population resides near the coast, as does a lot of infrastructure and economic assets. Thus, although changes in sea level are a slow process, they can have a substantial impact in our future. \n", "\n", "In this tutorial we will:\n", "1. Search, download, and view data freely available in [Climate Data Store](https://cds.climate.copernicus.eu/cdsapp#!/home) and [Copernicus Marine Service](https://marine.copernicus.eu/access-data).\n", "2. Use dask (within `xarray`) for chunking data due to memory limitations.\n", "3. Calculate global timeseries and analyse trends.\n", "4. Create timeseries plots as well as gridded plots." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
Run the tutorial via free cloud platforms: | \n", "\n",
" | \n",
" \n",
" | \n",
" \n",
" | \n",
"
---|
<xarray.Dataset>\n", "Dimensions: (time: 355, nv: 2, latitude: 720, longitude: 1440)\n", "Coordinates:\n", " * time (time) datetime64[ns] 1993-01-15 1993-02-15 ... 2022-07-15\n", " * latitude (latitude) float32 -89.88 -89.62 -89.38 ... 89.62 89.88\n", " * longitude (longitude) float32 0.125 0.375 0.625 ... 359.6 359.9\n", " * nv (nv) int32 0 1\n", "Data variables:\n", " crs (time) int32 -2147483647 -2147483647 ... -2147483647\n", " climatology_bnds (time, nv) datetime64[ns] dask.array<chunksize=(1, 2), meta=np.ndarray>\n", " lat_bnds (time, latitude, nv) float32 dask.array<chunksize=(1, 720, 2), meta=np.ndarray>\n", " lon_bnds (time, longitude, nv) float32 dask.array<chunksize=(1, 1440, 2), meta=np.ndarray>\n", " sla (time, latitude, longitude) float64 dask.array<chunksize=(1, 720, 1440), meta=np.ndarray>\n", " eke (time, latitude, longitude) float64 dask.array<chunksize=(1, 720, 1440), meta=np.ndarray>\n", "Attributes: (12/43)\n", " Conventions: CF-1.6\n", " Metadata_Conventions: Unidata Dataset Discovery v1.0\n", " cdm_data_type: Grid\n", " comment: Monthly Mean of Sea Level Anomalies refe...\n", " contact: http://climate.copernicus.eu/c3s-user-se...\n", " creator_email: http://climate.copernicus.eu/c3s-user-se...\n", " ... ...\n", " summary: Delayed Time Level-4 monthly means of Se...\n", " time_coverage_duration: P1M\n", " time_coverage_end: 1993-01-31T00:00:00Z\n", " time_coverage_resolution: P1M\n", " time_coverage_start: 1993-01-01T00:00:00Z\n", " title: DT merged two-satellite Global Ocean L4 ...
<xarray.DataArray 'sla' (time: 355, latitude: 720, longitude: 1440)>\n", "dask.array<getitem, shape=(355, 720, 1440), dtype=float64, chunksize=(1, 720, 1440), chunktype=numpy.ndarray>\n", "Coordinates:\n", " * time (time) datetime64[ns] 1993-01-15 1993-02-15 ... 2022-07-15\n", " * latitude (latitude) float32 -89.88 -89.62 -89.38 ... 89.38 89.62 89.88\n", " * longitude (longitude) float32 -179.9 -179.6 -179.4 ... 179.4 179.6 179.9\n", "Attributes:\n", " cell_methods: time: mean within years\n", " grid_mapping: crs\n", " long_name: Averaged Sea Level Anomalies 1993/01\n", " standard_name: sea_surface_height_above_sea_level\n", " units: m
<xarray.Dataset>\n", "Dimensions: (year: 30)\n", "Coordinates:\n", " * year (year) float64 1.994e+03 1.994e+03 ... 2.022e+03 2.022e+03\n", "Data variables:\n", " sla (year) float64 0.0002212 0.00159 0.003856 ... 0.08853 0.08751
<xarray.DataArray 'sla' (period: 3)>\n", "array([3.10341283, 3.15749711, 3.63171855])\n", "Coordinates:\n", " * period (period) <U5 'Full' 'Half1' 'Half2'
<xarray.DataArray 'sla' (time: 355, latitude: 720, longitude: 1440)>\n", "dask.array<rechunk-merge, shape=(355, 720, 1440), dtype=float64, chunksize=(355, 72, 144), chunktype=numpy.ndarray>\n", "Coordinates:\n", " * time (time) datetime64[ns] 1993-01-15 1993-02-15 ... 2022-07-15\n", " * latitude (latitude) float32 -89.88 -89.62 -89.38 ... 89.38 89.62 89.88\n", " * longitude (longitude) float32 -179.9 -179.6 -179.4 ... 179.4 179.6 179.9\n", "Attributes:\n", " cell_methods: time: mean within years\n", " grid_mapping: crs\n", " long_name: Averaged Sea Level Anomalies 1993/01\n", " standard_name: sea_surface_height_above_sea_level\n", " units: m
<xarray.Dataset>\n", "Dimensions: (latitude: 720, longitude: 1440, year: 30)\n", "Coordinates:\n", " * latitude (latitude) float32 -89.88 -89.62 -89.38 ... 89.38 89.62 89.88\n", " * longitude (longitude) float32 -179.9 -179.6 -179.4 ... 179.4 179.6 179.9\n", " * year (year) int64 1993 1994 1995 1996 1997 ... 2019 2020 2021 2022\n", "Data variables:\n", " sla (year, latitude, longitude) float64 nan nan nan ... nan nan nan
<xarray.Dataset>\n", "Dimensions: (latitude: 720, longitude: 1440, a: 5)\n", "Coordinates:\n", " * latitude (latitude) float32 -89.88 -89.62 -89.38 ... 89.38 89.62 89.88\n", " * longitude (longitude) float32 -179.9 -179.6 -179.4 ... 179.4 179.6 179.9\n", "Dimensions without coordinates: a\n", "Data variables:\n", " sla (latitude, longitude, a) float64 nan nan nan nan ... nan nan nan
<xarray.Dataset>\n", "Dimensions: (time: 10808)\n", "Coordinates:\n", " * time (time) datetime64[ns] 1993-01-01 ... 2022-08-04\n", "Data variables:\n", " sla (time) float32 ...\n", " sla_filtered (time) float32 ...\n", " sla_tpacorr (time) float32 ...\n", " sla_filtered_tpacorr (time) float32 ...\n", "Attributes:\n", " title: Area Averaged Mean Sea Level from DUACS DT2021\n", " institution: CLS\n", " references: http://marine.copernicus.eu\n", " Conventions: CF-1.7\n", " source: The values are based on the two-satellite merged altimeter ...\n", " licence: http://marine.copernicus.eu/services-portfolio/service-comm...\n", " area: GLOBAL\n", " comment: Period : 1993-01-01 to 2022-08-04.\n", " credit: E.U. Copernicus Marine Service Information\n", " contact: https://marine.copernicus.eu/contact
<xarray.Dataset>\n", "Dimensions: (latitude: 720, longitude: 1440)\n", "Coordinates:\n", " * latitude (latitude) float32 -89.88 -89.62 -89.38 ... 89.38 89.62 89.88\n", " * longitude (longitude) float32 -179.9 -179.6 -179.4 ... 179.4 179.6 179.9\n", "Data variables:\n", " msl_trend (latitude, longitude) float32 ...\n", "Attributes:\n", " title: Merged gridded regional mean sea level tre...\n", " institution: CLS\n", " references: http://marine.copernicus.eu\n", " Conventions: CF-1.7\n", " source: The values are based on the two-satellite ...\n", " licence: http://marine.copernicus.eu/services-portf...\n", " quality_information_document: http://marine.copernicus.eu/documents/QUID...\n", " product_user_manual: http://marine.copernicus.eu/documents/PUM/...\n", " area: GLOBAL\n", " comment: Period : 1993-01-01 to 2022-08-04.\n", " credit: E.U. Copernicus Marine Service Information\n", " contact: https://marine.copernicus.eu/contact
<xarray.Dataset>\n", "Dimensions: (time: 10808, nv: 2)\n", "Coordinates:\n", " * time (time) datetime64[ns] 1993-01-01 1993-01-02 ... 2022-08-04\n", " * nv (nv) int32 0 1\n", "Data variables: (12/14)\n", " crs (time) float64 ...\n", " lat_bnds (time, nv) float32 ...\n", " lon_bnds (time, nv) float32 ...\n", " sla (time) float64 ...\n", " err_sla (time) float64 ...\n", " ugosa (time) float64 ...\n", " ... ...\n", " err_vgosa (time) float64 ...\n", " adt (time) float64 ...\n", " ugos (time) float64 ...\n", " vgos (time) float64 ...\n", " tpa_correction (time) float64 ...\n", " flag_ice (time) float64 ...