Skip to content

Commit 2ae87fd

Browse files
committed
more fixes and linter stuff
1 parent 332362e commit 2ae87fd

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

book/tutorials_examples/1_HBV_Caravan_ERA5/example_model_run_HBV.ipynb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
"# end_time=experiment_end_date,\n",
222222
"# directory=forcing_path_caravan,\n",
223223
"# basin_id=camelsgb_id,\n",
224-
"# )"
224+
"# )"
225225
]
226226
},
227227
{
@@ -412,7 +412,17 @@
412412
"'''Load calibration constants'''\n",
413413
"par_0 = np.loadtxt(\"/data/eurocsdms-data/calibration/calibration_\" + camelsgb_id + \".csv\", delimiter = \",\")\n",
414414
"\n",
415-
"param_names = [\"Imax\", \"Ce\", \"Sumax\", \"Beta\", \"Pmax\", \"Tlag\", \"Kf\", \"Ks\", \"FM\"]\n",
415+
"param_names = [\"Imax\",\n",
416+
" \"Ce\",\n",
417+
" \"Sumax\",\n",
418+
" \"Beta\",\n",
419+
" \"Pmax\",\n",
420+
" \"Tlag\",\n",
421+
" \"Kf\",\n",
422+
" \"Ks\",\n",
423+
" \"FM\"\n",
424+
" ]\n",
425+
"\n",
416426
"print(list(zip(param_names, np.round(par_0, decimals=3))))"
417427
]
418428
},

book/tutorials_examples/2_HBV_PCRGlobWB_ERA5/example_model_run_pcrglobwb.ipynb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@
3939
"import matplotlib.pyplot as plt\n",
4040
"from cartopy import crs\n",
4141
"from cartopy import feature as cfeature\n",
42-
"import fiona\n",
43-
"import shapely.geometry\n",
44-
"from pyproj import Geod\n",
45-
"#from rich import print\n",
42+
"from rich import print\n",
4643
"import pandas as pd\n",
4744
"import xarray as xr\n",
4845
"\n",
@@ -58,7 +55,7 @@
5855
"metadata": {},
5956
"outputs": [],
6057
"source": [
61-
"station_latitude = 54.26935849558577 #Newby Bridge location from Google Maps\n",
58+
"station_latitude = 54.26935849558577 # Newby Bridge location from Google Maps\n",
6259
"station_longitude = -2.9710855713537745 "
6360
]
6461
},
@@ -152,6 +149,7 @@
152149
"forcing = ewatercycle.forcing.sources[\"PCRGlobWBForcing\"].load(\n",
153150
" directory=\"/home/rhut/forcing/UK/work/diagnostic/script\",\n",
154151
")\n",
152+
"\n",
155153
"print(forcing)"
156154
]
157155
},
@@ -184,6 +182,7 @@
184182
" parameter_set=parameter_set,\n",
185183
" forcing=forcing\n",
186184
")\n",
185+
"\n",
187186
"print(pcrglob)"
188187
]
189188
},
@@ -265,6 +264,7 @@
265264
" end_time=\"1997-08-31T00:00:00Z\",\n",
266265
" max_spinups_in_years=0\n",
267266
")\n",
267+
"\n",
268268
"cfg_file, cfg_dir"
269269
]
270270
},
@@ -391,6 +391,7 @@
391391
"timeseries = pd.DataFrame(\n",
392392
" index=pd.Index(time, name=\"time\"), columns=[\"PCRGlobWB: Leven\"]\n",
393393
")\n",
394+
"\n",
394395
"timeseries.head()"
395396
]
396397
},
@@ -1125,7 +1126,7 @@
11251126
}
11261127
],
11271128
"source": [
1128-
"#extra\n",
1129+
"# Extra\n",
11291130
"timeseries.plot()"
11301131
]
11311132
},

book/tutorials_examples/2_HBV_PCRGlobWB_ERA5/generate_forcing.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"source": [
1818
"import logging\n",
1919
"import warnings\n",
20-
"from pathlib import Path\n",
2120
"warnings.filterwarnings(\"ignore\", category=UserWarning)\n",
2221
"\n",
2322
"logger = logging.getLogger(\"esmvalcore\")\n",

0 commit comments

Comments
 (0)