|
47 | 47 | }
|
48 | 48 | ],
|
49 | 49 | "source": [
|
50 |
| - "import datetime\n", |
51 | 50 | "import sys\n",
|
52 | 51 | "from pathlib import Path\n",
|
53 | 52 | "\n",
|
54 | 53 | "import cartopy.crs as ccrs\n",
|
55 | 54 | "import cftime\n",
|
56 |
| - "import icclim\n", |
57 | 55 | "import matplotlib.pyplot as plt\n",
|
58 | 56 | "import numpy as np\n",
|
59 | 57 | "import pandas as pd\n",
|
60 | 58 | "import xarray as xr\n",
|
61 | 59 | "import xclim\n",
|
62 |
| - "from xclim.core.calendar import select_time \n", |
| 60 | + "from xclim.core.calendar import select_time\n", |
| 61 | + "\n", |
| 62 | + "import icclim\n", |
63 | 63 | "from icclim.frequency import FrequencyRegistry\n",
|
64 | 64 | "\n",
|
65 | 65 | "print(\"python: \", sys.version)\n",
|
|
68 | 68 | "print(\"pandas: \", pd.__version__)\n",
|
69 | 69 | "print(\"icclim: \", icclim.__version__)\n",
|
70 | 70 | "print(\"cftime: \", cftime.__version__)\n",
|
71 |
| - "print(\"xclim: \", xclim.__version__)\n" |
| 71 | + "print(\"xclim: \", xclim.__version__)" |
72 | 72 | ]
|
73 | 73 | },
|
74 | 74 | {
|
|
664 | 664 | ],
|
665 | 665 | "source": [
|
666 | 666 | "historical_tas = xr.open_mfdataset(historical_files).tas\n",
|
667 |
| - "filtered_tas = select_time(historical_tas, month=FrequencyRegistry.AMJJAS.indexer[\"month\"], drop=True)\n", |
| 667 | + "filtered_tas = select_time(\n", |
| 668 | + " historical_tas, month=FrequencyRegistry.AMJJAS.indexer[\"month\"], drop=True\n", |
| 669 | + ")\n", |
668 | 670 | "normal = filtered_tas.mean(dim=\"time\", keep_attrs=True)\n",
|
669 | 671 | "normal"
|
670 | 672 | ]
|
|
1291 | 1293 | "source": [
|
1292 | 1294 | "icclim.dcsc.txnd(\n",
|
1293 | 1295 | " in_files=studied_files[0:1],\n",
|
1294 |
| - " normal = normal,\n", |
| 1296 | + " normal=normal,\n", |
1295 | 1297 | " var_name=\"tas\",\n",
|
1296 | 1298 | " slice_mode=FrequencyRegistry.AMJJAS,\n",
|
1297 | 1299 | " out_file=out_f,\n",
|
|
0 commit comments