Commit 3756f002 authored by sp2668's avatar sp2668
Browse files

minor renaming

parent 21058521
......@@ -4,5 +4,6 @@
*.synctex.gz
**/dconf/
**/.ipynb_checkpoints/
**/__pycache__/
*.lp
*.slides.html
......@@ -9,5 +9,6 @@ dependencies:
- numpy
- pandas
- python
- scikit-learn
- pip:
- pypsa
......@@ -31,12 +31,11 @@
from sklearn.cluster import KMeans
#
%matplotlib inline
import time
 
import tutorial
import tutorial6utilities
```
 
%% Cell type:markdown id: tags:
 
## Introduction – the European grid
......@@ -51,10 +50,61 @@
 
``` python
network_base = pypsa.Network("./networks/base.nc")
```
 
%%%% Output: error
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-3-0a9bcb0e3368> in <module>()
----> 1 network_base = pypsa.Network("./networks/base.nc")
~/software/anaconda3/lib/python3.6/site-packages/pypsa/components.py in __init__(self, import_name, name, ignore_standard_types, override_components, override_component_attrs, **kwargs)
295 self.import_from_hdf5(import_name)
296 elif import_name[-3:] == ".nc":
--> 297 self.import_from_netcdf(import_name)
298 else:
299 self.import_from_csv_folder(import_name)
~/software/anaconda3/lib/python3.6/site-packages/pypsa/io.py in import_from_netcdf(network, path, skip_time)
487
488 basename = os.path.basename(path) if isinstance(path, string_types) else None
--> 489 with ImporterNetCDF(path=path) as importer:
490 _import_from_importer(network, importer, basename=basename,
491 skip_time=skip_time)
~/software/anaconda3/lib/python3.6/site-packages/pypsa/io.py in __init__(self, path)
200 self.path = path
201 if isinstance(path, string_types):
--> 202 self.ds = xr.open_dataset(path)
203 else:
204 self.ds = path
~/software/anaconda3/lib/python3.6/site-packages/xarray/backends/api.py in open_dataset(filename_or_obj, group, decode_cf, mask_and_scale, decode_times, autoclose, concat_characters, decode_coords, engine, chunks, lock, cache, drop_variables, backend_kwargs)
322 store = backends.ScipyDataStore(filename_or_obj,
323 autoclose=autoclose,
--> 324 **backend_kwargs)
325 elif engine == 'pydap':
326 store = backends.PydapDataStore.open(filename_or_obj,
~/software/anaconda3/lib/python3.6/site-packages/xarray/backends/scipy_.py in __init__(self, filename_or_obj, mode, format, group, writer, mmap, autoclose, lock)
144 filename=filename_or_obj,
145 mode=mode, mmap=mmap, version=version)
--> 146 self._ds = opener()
147 self._autoclose = autoclose
148 self._isopen = True
~/software/anaconda3/lib/python3.6/site-packages/xarray/backends/scipy_.py in _open_scipy_netcdf(filename, mode, mmap, version)
91 try:
92 return scipy.io.netcdf_file(filename, mode=mode, mmap=mmap,
---> 93 version=version)
94 except TypeError as e: # netcdf3 message is obscure in this case
95 errmsg = e.args[0]
~/software/anaconda3/lib/python3.6/site-packages/scipy/io/netcdf.py in __init__(self, filename, mode, mmap, version, maskandscale)
250 self.filename = filename
251 omode = 'r+' if mode == 'a' else mode
--> 252 self.fp = open(self.filename, '%sb' % omode)
253 if mmap is None:
254 # Mmapped files on PyPy cannot be usually closed
FileNotFoundError: [Errno 2] No such file or directory: '/home/ws/sp2668/bwSyncAndShare/lectures/esm_tutorials/tutorial-6/networks/base.nc'
%% Cell type:code id: tags:
 
``` python
tutorial.plot_network(network_base,option="kV",basemap="no")
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment