{ "cells": [ { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "import xarray as xr\n", "import cdsapi" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "2025-03-18 18:00:29,218 INFO [2024-09-26T00:00:00] Watch our [Forum](https://forum.ecmwf.int/) for Announcements, news and other discussed topics.\n", "2025-03-18 18:00:29,220 WARNING [2024-06-16T00:00:00] CDS API syntax is changed and some keys or parameter names may have also changed. To avoid requests failing, please use the \"Show API request code\" tool on the dataset Download Form to check you are using the correct syntax for your API request.\n" ] } ], "source": [ "client = cdsapi.Client()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "grid = [0.25, 0.25]\n", "area = [21, -20, 3, 15] # West Africa \n", "year = ['{}'.format(y) for y in range(1979, 2025)]\n", "month = ['{:02d}'.format(m) for m in range(1, 13)]" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "dl_dir = 'tmp/'\n", "out_dir = '../ERA5_WestAfrica/'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Invariant" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "2025-03-18 18:05:10,368 INFO Request ID is 027b8ab2-0ec0-40bc-8f06-f91f0bbbc90f\n", "2025-03-18 18:05:10,454 INFO status has been updated to accepted\n", "2025-03-18 18:05:15,564 WARNING Structural differences in grib fields detected when opening in xarray. Opening the grib file safely, however this may result in files with non-intuitive filenames.\n", "2025-03-18 18:05:15,565 INFO status has been updated to running\n", "2025-03-18 18:05:19,024 INFO status has been updated to successful\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "2f288ffb224d13a3faf153a7acb4cb94.nc: 0%| | 0.00/74.8k [00:00