diff --git a/Demo_Python_code/Data/Hydrological data.xlsx b/Demo_Python_code/Data/Hydrological data.xlsx new file mode 100644 index 0000000..ff4331f Binary files /dev/null and b/Demo_Python_code/Data/Hydrological data.xlsx differ diff --git a/Demo_Python_code/Data/Meteorological data.xlsx b/Demo_Python_code/Data/Meteorological data.xlsx new file mode 100644 index 0000000..80edff0 Binary files /dev/null and b/Demo_Python_code/Data/Meteorological data.xlsx differ diff --git a/Demo_Python_code/Data/evapotranspiration_yearly.nc b/Demo_Python_code/Data/evapotranspiration_yearly.nc new file mode 100644 index 0000000..688e0ea Binary files /dev/null and b/Demo_Python_code/Data/evapotranspiration_yearly.nc differ diff --git a/Demo_Python_code/Data/hydrological_gauges_WGS84.cpg b/Demo_Python_code/Data/hydrological_gauges_WGS84.cpg new file mode 100644 index 0000000..3ad133c --- /dev/null +++ b/Demo_Python_code/Data/hydrological_gauges_WGS84.cpg @@ -0,0 +1 @@ +UTF-8 \ No newline at end of file diff --git a/Demo_Python_code/Data/hydrological_gauges_WGS84.dbf b/Demo_Python_code/Data/hydrological_gauges_WGS84.dbf new file mode 100644 index 0000000..c07c0b8 Binary files /dev/null and b/Demo_Python_code/Data/hydrological_gauges_WGS84.dbf differ diff --git a/Demo_Python_code/Data/hydrological_gauges_WGS84.prj b/Demo_Python_code/Data/hydrological_gauges_WGS84.prj new file mode 100644 index 0000000..f45cbad --- /dev/null +++ b/Demo_Python_code/Data/hydrological_gauges_WGS84.prj @@ -0,0 +1 @@ +GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] \ No newline at end of file diff --git a/Demo_Python_code/Data/hydrological_gauges_WGS84.shp b/Demo_Python_code/Data/hydrological_gauges_WGS84.shp new file mode 100644 index 0000000..63ede58 Binary files /dev/null and b/Demo_Python_code/Data/hydrological_gauges_WGS84.shp differ diff --git a/Demo_Python_code/Data/hydrological_gauges_WGS84.shx b/Demo_Python_code/Data/hydrological_gauges_WGS84.shx new file mode 100644 index 0000000..c0bf990 Binary files /dev/null and b/Demo_Python_code/Data/hydrological_gauges_WGS84.shx differ diff --git a/Demo_Python_code/Data/meteorological_stats.cpg b/Demo_Python_code/Data/meteorological_stats.cpg new file mode 100644 index 0000000..3ad133c --- /dev/null +++ b/Demo_Python_code/Data/meteorological_stats.cpg @@ -0,0 +1 @@ +UTF-8 \ No newline at end of file diff --git a/Demo_Python_code/Data/meteorological_stats.dbf b/Demo_Python_code/Data/meteorological_stats.dbf new file mode 100644 index 0000000..6ac10be Binary files /dev/null and b/Demo_Python_code/Data/meteorological_stats.dbf differ diff --git a/Demo_Python_code/Data/meteorological_stats.prj b/Demo_Python_code/Data/meteorological_stats.prj new file mode 100644 index 0000000..f45cbad --- /dev/null +++ b/Demo_Python_code/Data/meteorological_stats.prj @@ -0,0 +1 @@ +GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] \ No newline at end of file diff --git a/Demo_Python_code/Data/meteorological_stats.shp b/Demo_Python_code/Data/meteorological_stats.shp new file mode 100644 index 0000000..32d4e6c Binary files /dev/null and b/Demo_Python_code/Data/meteorological_stats.shp differ diff --git a/Demo_Python_code/Data/meteorological_stats.shx b/Demo_Python_code/Data/meteorological_stats.shx new file mode 100644 index 0000000..052b11e Binary files /dev/null and b/Demo_Python_code/Data/meteorological_stats.shx differ diff --git a/Demo_Python_code/Data/p_monthly.nc b/Demo_Python_code/Data/p_monthly.nc new file mode 100644 index 0000000..5a761d5 Binary files /dev/null and b/Demo_Python_code/Data/p_monthly.nc differ diff --git a/Demo_Python_code/Data/precipitation_yearly.nc b/Demo_Python_code/Data/precipitation_yearly.nc new file mode 100644 index 0000000..08da1f3 Binary files /dev/null and b/Demo_Python_code/Data/precipitation_yearly.nc differ diff --git a/Demo_Python_code/In_situ_Hydro_and_Meteo.ipynb b/Demo_Python_code/In_situ_Hydro_and_Meteo.ipynb new file mode 100644 index 0000000..ae8465d --- /dev/null +++ b/Demo_Python_code/In_situ_Hydro_and_Meteo.ipynb @@ -0,0 +1,513 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# This is a demo code that does some fun stuff" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This code is based on the work of Dr. Michailovski and it has been modified by Dr. Salvadore from IHE Delft" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The purpose of this code is to anlayse discharge, and precipitation data from the K2 basin in Karnataka India. The data is provided by ACIWRM." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + " \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In Python you first import useful packages that provide functionalities for your code:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "import datetime\n", + "import numpy as np\n", + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "import shapefile\n", + "import shapely\n", + "import xarray as xr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "With the next lines we load the excel file with the discharge data in two variables dh1 and dh2: " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "hydrofile = r\"Data/Hydrological data.xlsx\"\n", + "df = pd.read_excel(hydrofile, engine='openpyxl')\n", + "dh1t = df.loc[df.Name=='Hydr 1']\n", + "dh2t = df.loc[df.Name=='Hydr 2']\n", + "dh1 = dh1t.set_index('Date (mm-yy)')\n", + "dh2 = dh2t.set_index('Date (mm-yy)')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To visualize the data type in the next cell dh1.head() and dh1.tail() inside the print brackets and then run the cell:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print()\n", + "print()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Then the first thing you would do in excel, would be to plot the data. We can do this with the code below. Before running the cell fill in the right value for the discharge units for the y axis." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "plt.figure(figsize=(12,4))\n", + "plt.plot(dh1.index, dh1['Discharge, Mm3/month'])\n", + "plt.title('Discharge at Sarwad')\n", + "plt.ylabel('')\n", + "plt.show()\n", + "\n", + "plt.figure(figsize=(12,4))\n", + "plt.plot(dh2.index, dh2['Discharge, Mm3/month'])\n", + "plt.title('Discharge at Thintini')\n", + "plt.ylabel('')\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Where are the flow discharge stations located? We can retrieve their coordinates from a shapefile:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "locfile = r\"Data/hydrological_gauges_WGS84.shp\"\n", + "shape = shapefile.Reader(locfile)\n", + "Hcoords = {}\n", + "for feature in shape.shapeRecords():\n", + " first = feature.shape.__geo_interface__ \n", + " Hcoords[feature.record[2]] = first['coordinates']\n", + "del Hcoords['']\n", + "Hcoords" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We are now going to look at remote sensing evapotranspiration in netcdf format for the study area:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "et = xr.open_dataset(r\"Data/evapotranspiration_yearly.nc\")\n", + "etvar = et.ETa\n", + "mean_et = etvar.mean(dim=['latitude','longitude'])\n", + "plt.bar(list(range(2011,2019)),mean_et, color='orange')\n", + "plt.ylabel('ET [mm/year]')\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In the next cell make a new bar plot of ET using a different color:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Meteo Data" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In the next section we analyse precipitation data, both in-situ and from satellite. We have data for six metereological stations. Daily data is provided in excel format from 2000 to 2018." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "meteofile = r\"Data/Meteorological data.xlsx\"\n", + "df = pd.read_excel(meteofile, engine='openpyxl')\n", + "dm1t = df.loc[df.Name=='Meteo 1']\n", + "dm2t = df.loc[df.Name=='Meteo 2']\n", + "dm3t = df.loc[df.Name=='Meteo 3']\n", + "dm4t = df.loc[df.Name=='Meteo 4']\n", + "dm5t = df.loc[df.Name=='Meteo 5']\n", + "dm6t = df.loc[df.Name=='Meteo 6']\n", + "dd1 = dm1t.set_index('Date')\n", + "dd2 = dm2t.set_index('Date')\n", + "dd3 = dm3t.set_index('Date')\n", + "dd4 = dm4t.set_index('Date')\n", + "dd5 = dm5t.set_index('Date')\n", + "dd6 = dm6t.set_index('Date')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We are interested in monthly data (because our remote sensing data is available monthly).\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In the first six lines we are resampling our data from daily to monthly, how should we do it? Choose the correct option:\n", + "\n", + "1) .mean() for the average\n", + "\n", + "2) .max() for the max value\n", + "\n", + "3) .sum() to sum the values\n", + "\n", + "Type one of the three options after the dot." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "dm1 = dd1.resample('M').\n", + "dm2 = dd2.resample('M').\n", + "dm3 = dd3.resample('M').\n", + "dm4 = dd4.resample('M').\n", + "dm5 = dd5.resample('M').\n", + "dm6 = dd6.resample('M').\n", + "\n", + "dm1.index = [datetime.datetime(i.year, i.month, 1) for i in dm1.index]\n", + "dm2.index = [datetime.datetime(i.year, i.month, 1) for i in dm2.index]\n", + "dm3.index = [datetime.datetime(i.year, i.month, 1) for i in dm3.index]\n", + "dm4.index = [datetime.datetime(i.year, i.month, 1) for i in dm4.index]\n", + "dm5.index = [datetime.datetime(i.year, i.month, 1) for i in dm5.index]\n", + "dm6.index = [datetime.datetime(i.year, i.month, 1) for i in dm6.index]\n", + "\n", + "dmdic = {'Meteo 1': dm1,\n", + " 'Meteo 2': dm2,\n", + " 'Meteo 3': dm3,\n", + " 'Meteo 4': dm4,\n", + " 'Meteo 5': dm5,\n", + " 'Meteo 6': dm6,\n", + " }" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "And now some plots..." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "plt.figure(figsize=(12,6))\n", + "for (i,dm) in enumerate([dm1,dm2,dm3,dm4,dm5,dm6]):\n", + " plt.subplot(2,3,i+1)\n", + " plt.plot(dm.index, dm['Precipitation, mm'])\n", + "plt.tight_layout()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We need to know the locations of the meteorological stations for comparing the in-situ data to the satellite data:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "locfile = r\"Data/meteorological_stats.shp\"\n", + "shape = shapefile.Reader(locfile)\n", + "Mcoords = {}\n", + "for feature in shape.shapeRecords():\n", + " first = feature.shape.__geo_interface__ \n", + " Mcoords[feature.record[1]] = first['coordinates']\n", + "del Mcoords['']" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Type print(Mcoords) to visualize the coordinates of the six stations and run the cell. Do not worry if they are not in order." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now we are going to load the netcdf file containing the satellite data for precipitation (CHIRPS data) and we are going to plot the first month and overlay the location of one of the stations:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "p_path = r\"Data/p_monthly.nc\"\n", + "p = xr.open_dataset(p_path, chunks=500)\n", + "extent = extent=(p.longitude[0],p.longitude[-1],p.latitude[-1],p.latitude[0])\n", + "plt.imshow(p.P[0], extent=extent)\n", + "plt.scatter(74.9492, 16.5134, color='r')\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create a new figure that shows the first monthly rainfall together with two station locations" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "With the code below we create graphs (line plots) comparing in-situ and remote sensing preciptiation at the station locations for all six stations." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": false + }, + "outputs": [], + "source": [ + "for i, stat in enumerate(Mcoords):\n", + " plt.figure(figsize=(8,4))\n", + " lon = Mcoords[stat][0]\n", + " lat = Mcoords[stat][1]\n", + " df1 = dmdic[stat][60:]\n", + " psel = p.sel(longitude=lon, latitude=lat, method ='nearest')\n", + " plt.plot(df1.index, df1['Precipitation, mm'], label = 'in situ')\n", + " plt.plot(psel.time, psel.P.values, label = 'CHIRPS')\n", + " plt.title(stat)\n", + " plt.ylabel('mm/month')\n", + " plt.legend()\n", + " plt.show()\n", + " plt.close()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "And now scatterplots:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "for i, stat in enumerate(Mcoords):\n", + " plt.figure(figsize=(4,4))\n", + " lon = Mcoords[stat][0]\n", + " lat = Mcoords[stat][1]\n", + " df1 = dmdic[stat][125:]\n", + " psel = p.sel(longitude=lon, latitude=lat, method ='nearest')\n", + " plt.plot([0,175],[0,175],'--', color='grey')\n", + " plt.scatter(psel.P.values[:-1], df1['Precipitation, mm'], s=2)\n", + " plt.title(stat)\n", + " plt.xlabel('CHIRPS [mm/month]')\n", + " plt.ylabel('in situ [mm/month]')\n", + " plt.tight_layout()\n", + " plt.grid()\n", + " plt.xlim([0,175])\n", + " plt.ylim([0,175])\n", + " plt.show()\n", + " plt.close()" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "scrolled": true + }, + "source": [ + "Finally some statistics. We are going to plot the mean square error and the r2 of each station in the scatter plot. It might take a little bit to run (Python is doing a lot of calculations for you!)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import sklearn\n", + "from sklearn.metrics import r2_score\n", + "from sklearn.metrics import mean_squared_error\n", + "\n", + "plt.figure(figsize=(12,6))\n", + "for i, stat in enumerate(sorted(Mcoords)):\n", + " plt.subplot(2,3,i+1)\n", + " lon = Mcoords[stat][0]\n", + " lat = Mcoords[stat][1]\n", + " df1 = dmdic[stat][125:]\n", + " psel = p.sel(longitude=lon, latitude=lat, method ='nearest')\n", + " plt.plot([0,175],[0,175],'--', color='grey')\n", + " plt.scatter(psel.P.values[:-1], df1['Precipitation, mm'], s=2)\n", + " rmse = mean_squared_error(df1['Precipitation, mm'], psel.P.values[:-1], squared=False)\n", + " r2 = r2_score(df1['Precipitation, mm'], psel.P.values[:-1])\n", + " plt.title('{} \\n rmse={:.2f} mm/month \\n r2={:.2f}'.format(stat, rmse, r2))#stat+'\\n rmse = '+str(rmse)+' r2= '+str(r2))\n", + " plt.xlabel('CHIRPS [mm/month]')\n", + " plt.ylabel('in situ [mm/month]')\n", + " plt.tight_layout()\n", + " plt.grid()\n", + " plt.xlim([0,175])\n", + " plt.ylim([0,175])" + ] + } + ], + "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.7.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/Demo_Python_code/LICENSE b/Demo_Python_code/LICENSE new file mode 100644 index 0000000..0e259d4 --- /dev/null +++ b/Demo_Python_code/LICENSE @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/Demo_Python_code/README.md b/Demo_Python_code/README.md new file mode 100644 index 0000000..3c67c26 --- /dev/null +++ b/Demo_Python_code/README.md @@ -0,0 +1,4 @@ +# Demo code for the intro session +jupyter notebook for the eMWRE course of Environmental Programming + +[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ElgaSalvadore/Environmental-Programming/blob/main/Demo_Python_code/HEAD) diff --git a/Demo_Python_code/requirements.txt b/Demo_Python_code/requirements.txt new file mode 100644 index 0000000..5d27253 --- /dev/null +++ b/Demo_Python_code/requirements.txt @@ -0,0 +1,10 @@ +numpy +pandas +matplotlib +pyshp +shapely +xarray +openpyxl +netcdf4 +dask +scikit-learn