{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Downloading the data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "All data files used in the lecture are available on [this webserver](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## CERES Data " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For Week 02, we will use climatological data from the [CERES](https://climatedataguide.ucar.edu/climate-data/ceres-ebaf-clouds-and-earths-radiant-energy-systems-ceres-energy-balanced-and-filled) (Clouds and the Earth's Radiant Energy System) mission. We are going to use the EBAF-TOA and the EBAF-Surface data products (both freely available [on this webpage](https://ceres.larc.nasa.gov/data/)) as climatologies (i.e. monthly averages 2005-2015). \n", "\n", "The data quality summary of these data (PDF) can be found [here](https://ceres.larc.nasa.gov/documents/DQ_summaries/CERES_EBAF_Ed4.1_DQS.pdf), and more accessible publications can be found [here for TOA](https://journals.ametsoc.org/doi/pdf/10.1175/JCLI-D-17-0208.1) and [here for Surface](https://journals.ametsoc.org/doi/pdf/10.1175/JCLI-D-17-0523.1).\n", "\n", "**Download:**\n", "- TOA file: [CERES_EBAF-TOA_Ed4.1_Clim-2005-2015.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/CERES_EBAF-TOA_Ed4.1_Clim-2005-2015.nc)\n", "- Surface file: [CERES_EBAF-Surface_Ed4.1_Clim-2005-2015.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/CERES_EBAF-Surface_Ed4.1_Clim-2005-2015.nc)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## ERA5 data " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Ready to use, low resolution NetCDF files " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[ERA5](https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era5) is an atmospheric reanalysis product. We will use it a lot! Note that you can download the data yourself (I provide some sample scripts below), but for a start you can download some files I prepared for you:\n", "\n", "**Invariant:**\n", "- [ERA5_LowRes_Invariant.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_Invariant.nc)\n", "\n", "**Monthly surface (3D) data:**\n", "- [ERA5_LowRes_Monthly_t2m.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_Monthly_t2m.nc): 2m temperature\n", "- [ERA5_LowRes_Monthly_tp.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_Monthly_tp.nc): total precipitation\n", "- [ERA5_LowRes_Monthly_evap.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_Monthly_evap.nc): evaporation\n", "- [ERA5_LowRes_Monthly_seaice.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_Monthly_seaice.nc): sea ice cover\n", "- [ERA5_LowRes_Monthly_clouds.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_Monthly_clouds.nc): cloud coverr (several variables)\n", "- [ERA5_LowRes_Monthly_snow.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_Monthly_snow.nc): snow cover\n", "- [ERA5_LowRes_Monthly_uvslp.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_Monthly_uvslp.nc): `u`, `v`, `slp`\n", "- [ERA5_LowRes_Monthly_sst.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_Monthly_sst.nc): sea surface temperatures\n", "- [ERA5_LowRes_Monthly_eb.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_Monthly_eb.nc): energy balance terms\n", "- [ERA5_LowRes_Monthly_wvtransport.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_Monthly_wvtransport.nc): vertical integral of water vapor transport (`u` and `v`)\n", "- [ERA5_LowRes_Monthly_water_column.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_Monthly_water_column.nc): vertical integral of total water column \n", "- [ERA5_LowRes_Monthly_energyflux.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_Monthly_energyflux.nc): vertical integral of energy fluxes\n", "\n", "**Monthly pressure-level (4D) data:**\n", "- [ERA5_LowRes_Monthly_4D_all.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_Monthly_4D_all.nc) `u`, `v`, `w`, `geop`, `q` at pressure levels (file is **12.4Gb large**!)\n", "\n", "**Monthly averaged (annual cycle) data:**\n", "- [ERA5_LowRes_MonthlyAvg_uvslp.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_MonthlyAvg_uvslp.nc): `u`, `v`, `slp` at surface\n", "- [ERA5_LowRes_MonthlyAvg_4D_zuvw.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_MonthlyAvg_4D_zuvw.nc): `u`, `v`, `w`, `geop` at pressure levels\n", "- [ERA5_LowRes_MonthlyAvg_4D_zuvwq.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_MonthlyAvg_4D_zuvwq.nc): `u`, `v`, `w`, `geop`, `q` at pressure levels\n", "- [ERA5_LowRes_MonthlyAvg_eb.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_MonthlyAvg_eb.nc): energy balance terms \n", "\n", "**Full average (annual) data:**\n", "- [ERA5_LowRes_AnnualAvg_eb.nc](https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_AnnualAvg_eb.nc): energy balance terms\n", "\n", "\n", "**File naming conventions**:\n", "- `LowRes` means that I asked for a lower spatial resolution than available (0.75° instead of the 0.25° default).\n", "- `Monthly` means that I averaged the data to calendar months\n", "- `MonthlyAvg` means that I averaged the data to all months (annual cycle)\n", "- `AnnualAvg` means that I averaged the data to all months and years (simple average)\n", "- `4D` means that the data is also available on pressure levels\n", "- `t2m` or `tp` are variable names\n", "- `Invariant` means that this file contains time invariant fields such as topography or land-sea mask." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Additional ERA5 data from the CDS servers (optional)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You may want to download ERA5 data yourself if:\n", "- you'd like additional variables not listed above\n", "- you'd like to use high resolution data (0.25°) instead of the low resolution (0.75°) that I provided\n", "- you'd like to download hourly data (daily data are not available unfortunately)\n", "\n", "If you want to go this path (**not mandatory at all for the projects**), you'll need an account at the [Copernicus Data Store](https://cds.climate.copernicus.eu)\n", "\n", "You may want to use their online platform to analyze/download the data, or you can use a script. To get you started, [here](https://gist.github.com/fmaussion/16c1119d8658cf4af9d3218dd5b1adf4) is the script I used to download all the data listed above." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## CMIP5 and CMIP6 data " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Temperature and Precipitation projections, for a large number of scenarios and GCMs:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- CMIP5\n", " - root link: [https://cluster.klima.uni-bremen.de/~oggm/cmip5-ng](https://cluster.klima.uni-bremen.de/~oggm/cmip5-ng)\n", " - [GCM list](https://cluster.klima.uni-bremen.de/~oggm/cmip5-ng/all_gcm_table.html)\n", " - [Summary table](https://cluster.klima.uni-bremen.de/~oggm/cmip5-ng/gcm_table.html)\n", "- CMIP6\n", " - root link: [https://cluster.klima.uni-bremen.de/~oggm/cmip6](https://cluster.klima.uni-bremen.de/~oggm/cmip6)\n", " - [GCM list](https://cluster.klima.uni-bremen.de/~oggm/cmip6/all_gcm_table.html)\n", " - [Summary table](https://cluster.klima.uni-bremen.de/~oggm/cmip6/gcm_table.html)\n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Reading data from an url" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can also open files without downloading them locally. This is somehow inefficient (it will download all data in memory each time you run the notebook), but might be useful e.g. on MyBinder where you can't store files. You will need the `h5netcdf` library to be installed for the following to work:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import xarray as xr\n", "import urllib, io\n", "\n", "url = 'https://cluster.klima.uni-bremen.de/~fmaussion/teaching/climate/ERA5_LowRes_Invariant.nc'\n", "\n", "req = urllib.request.Request(url)\n", "with urllib.request.urlopen(req) as resp:\n", " ds = xr.open_dataset(io.BytesIO(resp.read()))\n", "\n", "ds" ] } ], "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.6" } }, "nbformat": 4, "nbformat_minor": 4 }