tutorial01-1.ipynb 20.3 KB
Newer Older
sp2668's avatar
sp2668 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Energy System Modelling - Tutorial I\n",
    "\n",
    "SS 2018, Karlsruhe Institute of Technology, Institute for Automation and Applied Informatics\n",
    "***"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "# Imports"
   ]
  },
  {
   "cell_type": "code",
Fabian Neumann's avatar
Fabian Neumann committed
23
   "execution_count": 1,
sp2668's avatar
sp2668 committed
24 25 26 27 28 29
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
Fabian Neumann's avatar
Fabian Neumann committed
30
    "plt.style.use('bmh')\n",
sp2668's avatar
sp2668 committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "***\n",
    "# Introductory Comments"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Getting Help\n",
    "\n",
    "Executing cells with Shift-Enter and with `h` there is help.\n",
    "\n",
    "Help is available with `.<TAB>` or load.sort_values() <- cursor between brackets, `Shift-<TAB>`"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Using one-dimensional arrays (Numpy and Pandas)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Numpy**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a = np.arange(10)\n",
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2])"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a[1:3]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Pandas**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "foo    0.748951\n",
       "bar    0.286110\n",
       "baz    0.274185\n",
       "dtype: float64"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s = pd.Series(np.random.random(3), index=['foo', 'bar', 'baz'])\n",
    "s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "foo    0.748951\n",
       "bar    0.286110\n",
       "dtype: float64"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s[\"foo\":\"bar\"]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Using two-dimensional arrays (Numpy and Pandas)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Numpy** "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0.28941884, 0.4004386 , 0.67028241, 0.40211146, 0.87918444],\n",
       "       [0.42221308, 0.13808648, 0.08780219, 0.96793469, 0.62714239],\n",
       "       [0.97390844, 0.83849364, 0.65386425, 0.15093854, 0.29176614]])"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.random((3,5))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Pandas**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>foo</th>\n",
       "      <td>0.390126</td>\n",
       "      <td>0.502056</td>\n",
       "      <td>0.958872</td>\n",
       "      <td>0.186866</td>\n",
       "      <td>0.860330</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>bar</th>\n",
       "      <td>0.042661</td>\n",
       "      <td>0.636768</td>\n",
       "      <td>0.233535</td>\n",
       "      <td>0.577435</td>\n",
       "      <td>0.909700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>baz</th>\n",
       "      <td>0.957205</td>\n",
       "      <td>0.313162</td>\n",
       "      <td>0.348274</td>\n",
       "      <td>0.542685</td>\n",
       "      <td>0.698854</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            0         1         2         3         4\n",
       "foo  0.390126  0.502056  0.958872  0.186866  0.860330\n",
       "bar  0.042661  0.636768  0.233535  0.577435  0.909700\n",
       "baz  0.957205  0.313162  0.348274  0.542685  0.698854"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s = pd.DataFrame(np.random.random((3,5)), index=['foo', 'bar', 'baz'])\n",
    "s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    0.463331\n",
       "1    0.483995\n",
       "2    0.513560\n",
       "3    0.435662\n",
       "4    0.822961\n",
       "dtype: float64"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s.mean()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "***\n",
    "# Problem I.1\n",
    "\n",
    "The following data are made available to you on the __[coures homepage](https://nworbmot.org/courses/complex_renewable_energy_networks/)__:\n",
    "\n",
    "`de_data.csv`, `gb_data.csv`, `eu_data.csv`\n",
    "and alternatively\n",
    "`wind.csv`, `solar.csv`, `load.csv`\n",
    "\n",
    "They describe (quasi-real) time series for wind power generation $W(t)$, solar power generation $S(t)$ and load $L(t)$ in Great Britain (GB), Germany (DE) and Europe (EU). The time step is 1 h and the time series are several years long.\n",
    "\n",
    "> Remark: In this example notebook, we only look at Germany and the EU, Great Britain works in exactly the same way."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "***\n",
    "**Read Data**"
   ]
  },
  {
   "cell_type": "code",
Fabian Neumann's avatar
Fabian Neumann committed
338
   "execution_count": 2,
sp2668's avatar
sp2668 committed
339 340 341 342 343 344 345 346 347 348
   "metadata": {},
   "outputs": [],
   "source": [
    "de = pd.read_csv('tutorial_data/de_data.csv', parse_dates=True, index_col=0)\n",
    "eu = pd.read_csv('tutorial_data/eu_data.csv', parse_dates=True, index_col=0)\n",
    "gb = pd.read_csv('tutorial_data/gb_data.csv', parse_dates=True, index_col=0)"
   ]
  },
  {
   "cell_type": "code",
Fabian Neumann's avatar
Fabian Neumann committed
349
   "execution_count": 3,
sp2668's avatar
sp2668 committed
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366
   "metadata": {},
   "outputs": [],
   "source": [
    "wind = pd.read_csv('tutorial_data/wind.csv', parse_dates=True, index_col=0)\n",
    "solar = pd.read_csv('tutorial_data/solar.csv', parse_dates=True, index_col=0)\n",
    "load = pd.read_csv('tutorial_data/load.csv', parse_dates=True, index_col=0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Extra: Show the first 5 lines (header) of the German data:"
   ]
  },
  {
   "cell_type": "code",
Fabian Neumann's avatar
Fabian Neumann committed
367
   "execution_count": 4,
sp2668's avatar
sp2668 committed
368
   "metadata": {},
Fabian Neumann's avatar
Fabian Neumann committed
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>wind</th>\n",
       "      <th>solar</th>\n",
       "      <th>load</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>time</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2011-01-01 00:00:00</th>\n",
       "      <td>0.535144</td>\n",
       "      <td>0.0</td>\n",
       "      <td>46209.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2011-01-01 01:00:00</th>\n",
       "      <td>0.580456</td>\n",
       "      <td>0.0</td>\n",
       "      <td>44236.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2011-01-01 02:00:00</th>\n",
       "      <td>0.603605</td>\n",
       "      <td>0.0</td>\n",
       "      <td>42502.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2011-01-01 03:00:00</th>\n",
       "      <td>0.614114</td>\n",
       "      <td>0.0</td>\n",
       "      <td>41479.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2011-01-01 04:00:00</th>\n",
       "      <td>0.627257</td>\n",
       "      <td>0.0</td>\n",
       "      <td>39923.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                         wind  solar     load\n",
       "time                                         \n",
       "2011-01-01 00:00:00  0.535144    0.0  46209.0\n",
       "2011-01-01 01:00:00  0.580456    0.0  44236.0\n",
       "2011-01-01 02:00:00  0.603605    0.0  42502.0\n",
       "2011-01-01 03:00:00  0.614114    0.0  41479.0\n",
       "2011-01-01 04:00:00  0.627257    0.0  39923.0"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "de.head()"
   ]
sp2668's avatar
sp2668 committed
455 456 457 458 459 460 461 462 463 464
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Extra: Check that wind, solar and load files are just differently organized datasets and it's the same data:"
   ]
  },
  {
   "cell_type": "code",
Fabian Neumann's avatar
Fabian Neumann committed
465
   "execution_count": 7,
sp2668's avatar
sp2668 committed
466
   "metadata": {},
Fabian Neumann's avatar
Fabian Neumann committed
467 468 469 470 471 472 473 474 475 476 477 478 479 480 481
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(wind['DE'] == de['wind']).all()"
   ]
sp2668's avatar
sp2668 committed
482 483 484 485 486 487 488 489 490 491 492 493
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "***\n",
    "**(a) Check that the wind and solar time series are normalized to ’per-unit of installed capacity’,\n",
    "and that the load time series is normalized to MW.**"
   ]
  },
  {
   "cell_type": "code",
Fabian Neumann's avatar
Fabian Neumann committed
494
   "execution_count": 8,
sp2668's avatar
sp2668 committed
495
   "metadata": {},
Fabian Neumann's avatar
Fabian Neumann committed
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DE    0.994588\n",
       "GB    0.999998\n",
       "EU    0.719222\n",
       "dtype: float64"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "wind.max()"
   ]
sp2668's avatar
sp2668 committed
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "***\n",
    "**(b) Calculate the maximum, mean, and variance of the time series. **"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "***\n",
    "** (c) For all three regions, plot the time series $W (t)$, $S(t)$, $L(t)$ for a winter month (January) and a summer month (July). **"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Extra: Also compare the wind between the different regions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "***\n",
sp2668's avatar
sp2668 committed
564 565 566 567
    "**(d) For all three regions, plot the duration curve for $W(t)$, $S(t)$, $L(t)$.** \n",
    "> **Hint:** You might want to make use of the functions [`.sort_values`](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.sort_values.html) and [`.reset_index`](https://pandas.pydata.org/pandas-docs/version/0.23/generated/pandas.DataFrame.reset_index.html)\n",
    "\n",
    "> **Tip:** Go through the line `de['wind'].sort_values(ascending=False).reset_index(drop=True).plot()` dot by dot and note what happens to the output."
sp2668's avatar
sp2668 committed
568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "***\n",
    "**(e) For all three regions, plot the probability density function of $W(t)$, $S(t)$, $L(t)$.**"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "There are two different methods:\n",
    "1. [Histograms](https://en.wikipedia.org/wiki/Histogram) and \n",
    "2. [Kernel density estimation (KDE)](https://en.wikipedia.org/wiki/Kernel_density_estimation).\n",
    "\n",
    "This [image](https://en.wikipedia.org/wiki/Kernel_density_estimation#/media/File:Comparison_of_1D_histogram_and_KDE.png) on the KDE page provides a good summary of the differences. You can do both with Panda!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "First, let's look at the wind data:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
Fabian Neumann's avatar
Fabian Neumann committed
614
   "metadata": {},
sp2668's avatar
sp2668 committed
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643
   "source": [
    "Now, let's look at the solar data:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The solar data might be hard to see. Look at this in detail by limiting the y-axis to (0,2):"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
Fabian Neumann's avatar
Fabian Neumann committed
644
   "metadata": {},
sp2668's avatar
sp2668 committed
645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666
   "source": [
    "Finally, let's look at the load profile:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "***\n",
    "**(f) Apply a [(Fast) Fourier Transform](https://en.wikipedia.org/wiki/Fast_Fourier_transform) to the the three time series $X \\in W(t), S(t), L(t)$:**\n",
    "\n",
    "$$\\tilde{X}(\\omega) = \\int_0^T X(t) \\;e^{i\\omega t} \\;\\mathrm{d}t.$$\n",
    "\n",
sp2668's avatar
sp2668 committed
667
    "**For all three regions, plot the energy spectrum $\\|\\tilde{X}(\\omega)\\|^2$ as a function of $\\omega$. Discuss the relationship of these results with the findings obtained in (b)-(f).**"
sp2668's avatar
sp2668 committed
668 669 670 671 672 673
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
sp2668's avatar
sp2668 committed
674 675 676
    "> **Remark:** Use the function [`numpy.fft.rfft`](https://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfft.html) and make sure you subtract the mean.\n",
    "\n",
    "> **Remark:** To determine the frequencies [`numpy.fft.rfffreq`](https://docs.scipy.org/doc/numpy-1.12.0/reference/generated/numpy.fft.rfftfreq.html) is used, the argument `d` indicates the distance between two data points, `1h` hour, which we specify as $\\frac{1}{8760} a$, so that the frequencies come out in the unit $\\frac{1}{a}$."
sp2668's avatar
sp2668 committed
677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "***\n",
    "**(g) Normalize the time series to one, so that $\\langle{W}\\rangle = \\langle{S}\\rangle = \\langle{L}\\rangle = 1$.**\n",
    "\n",
    "**Now, for all three regions, plot the mismatch time series**\n",
    "  \n",
    "  $$\\Delta(t) = \\gamma \\alpha W(t) + \\gamma (1 - \\alpha) S(t) - L(t) $$\n",
    "  \n",
    "**for the same winter and summer months as in (c). Choose** \n",
    "1. $\\alpha \\in \\{0.0, 0.5, 0.75, 1.0\\}$ with $\\gamma = 1$, and \n",
    "2. $\\gamma \\in \\{0.5, 0.75, 1.0, 1.25, 1.5\\}$ with $\\alpha = 0.75$.\n",
    "\n",
    "**What is the interpretation of $\\gamma$ and $\\alpha$?**"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Choose the country and alpha, gamma values and re-run:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {},
   "outputs": [],
   "source": [
    "d = de\n",
    "gamma = 1.0\n",
    "alpha = 0"
   ]
  },
  {
   "cell_type": "markdown",
Fabian Neumann's avatar
Fabian Neumann committed
724
   "metadata": {},
sp2668's avatar
sp2668 committed
725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751
   "source": [
    "Normalize the time series and calculate mismatch time series:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Plot the mismatch time series for the winter and summer months:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
Fabian Neumann's avatar
Fabian Neumann committed
752
   "metadata": {},
sp2668's avatar
sp2668 committed
753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889
   "source": [
    "***\n",
    "**(h) For all three regions, repeat (b)-(f) for the mismatch time series. What changed?**"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Data check**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Time series plot**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Duration curve**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Probability density function**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Fast Fourier Transform**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "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.6.4"
  },
  "nav_menu": {},
  "toc": {
   "navigate_menu": true,
   "number_sections": true,
   "sideBar": false,
   "threshold": 6,
   "toc_cell": false,
   "toc_section_display": "block",
   "toc_window_display": true
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
Fabian Neumann's avatar
Fabian Neumann committed
890
 "nbformat_minor": 2
sp2668's avatar
sp2668 committed
891
}