{ "cells": [ { "cell_type": "markdown", "id": "d8992de4-0b85-4df3-8835-d9dd3e7a3901", "metadata": {}, "source": [ "# Potential Evapotranspiration from CMIP6 climate projections (NetCDF)\n", "\n", "*M. Vremec, December 2022, University of Graz*\n", "\n", "\n", "What is done:\n", "\n", "- load the data from Copernicus\n", "- estimate potential evapotranspiration\n", "- plot\n", "\n", "Data source: \n", "* Copernicus - https://cds.climate.copernicus.eu/ (SSP1-1.9, EC-Earth3 (Europe))\n", "* [CMIP6 GMD special issue articles](https://gmd.copernicus.org/articles/special_issue590.html)\n", "* [Terms of using CMIP6 data](https://pcmdi.llnl.gov/CMIP6/TermsOfUse/TermsOfUse6-2.html)" ] }, { "cell_type": "code", "execution_count": null, "id": "768010e4-9e5d-4136-80ab-b8eea806dc69", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import pandas as pd\n", "import xarray as xr\n", "import pyet" ] }, { "cell_type": "code", "execution_count": null, "id": "69ade8af-753a-4b8d-8680-9531ea24a070", "metadata": {}, "outputs": [], "source": [ "# Import data\n", "xr_ds = xr.open_dataset(\"data/example_9/tas_day_EC-Earth3_ssp119_r4i1p1f1_gr_21000601-21000630_v20200425.nc\", \n", " engine=\"netcdf4\")" ] }, { "cell_type": "code", "execution_count": null, "id": "88f411a2-13b5-41c5-859c-b7d661ea5959", "metadata": {}, "outputs": [], "source": [ "# Define mean temperature and latitude\n", "tmean = xr_ds[\"tas\"] - 273\n", "lat = xr_ds.lat * np.pi/180" ] }, { "cell_type": "code", "execution_count": null, "id": "3acf61a9-de98-4048-bcf1-70ef84e871bd", "metadata": {}, "outputs": [], "source": [ "# Compute PET with Oudin\n", "pet_oudin = pyet.oudin(tmean, lat=lat)" ] }, { "cell_type": "code", "execution_count": null, "id": "8523231e-c618-4ad9-bb0d-204d2103ddb1", "metadata": {}, "outputs": [], "source": [ "pet_oudin.sel(time=\"2100-6-2\").plot()" ] }, { "cell_type": "markdown", "id": "9abfc543-b01e-4f76-bc36-81094d5d842f", "metadata": {}, "source": [ "## Acknowledgement\n", "\n", "We acknowledge the World Climate Research Programme, which, through its Working Group on Coupled Modelling, coordinated and promoted CMIP6. We thank the climate modeling groups for producing and making available their model output, the Earth System Grid Federation (ESGF) for archiving the data and providing access, and the multiple funding agencies who support CMIP6 and ESGF." ] } ], "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.11.5" } }, "nbformat": 4, "nbformat_minor": 5 }