cryotools / cosipy

Coupled snowpack and ice surface energy and mass balance model in Python
GNU General Public License v3.0
51 stars 29 forks source link

aws2cosipy point model failure #27

Closed atraxoo closed 3 years ago

atraxoo commented 3 years ago

Dear developers,

as I would like to run your model in a point wise approach, I tried to set point_model = True in the aws2cosipyConfig.py file when running the example for the Zhadang glacier.

The aws2cosipy.py fails to execute in this way with the full log and error-traceback:

ERROR: Unable to locate a modulefile for 'intel64' ERROR: Unable to locate a modulefile for 'netcdf'

Create input

Read input file ../../data/input/Zhadang/Zhadang_ERA5_2009_2018_small.csv Empty DataFrame Columns: [T2, PRES, N, U2, RH2, RRR, SNOWFALL, G, LWin] Index: [] Empty DataFrame Columns: [T2, PRES, N, U2, RH2, RRR, SNOWFALL, G, LWin] Index: [] T2 RH2 U2 ... RRR N SNOWFALL TIMESTAMP ...
2000-01-01 06:00:00 251.091015 60.239344 1.362225 ... 0.000954 0.855011 5.028486e-06 2000-01-01 07:00:00 249.608837 66.086411 1.254843 ... 0.000954 0.688080 3.279448e-06 2000-01-01 08:00:00 250.118542 64.491801 1.196519 ... 0.000477 0.532532 1.749039e-06 2000-01-01 09:00:00 252.241070 61.477761 1.065327 ... 0.000000 0.332764 1.093149e-06 2000-01-01 10:00:00 256.592175 70.192980 0.997920 ... 0.000000 0.093475 2.186298e-07

[5 rows x 8 columns] Read static file ../../data/static/Zhadang_static.nc

Traceback (most recent call last): File "aws2cosipy.py", line 626, in create_1D_input(args.csv_file, args.cosipy_file, args.static_file, args.start_date, args.end_date) File "aws2cosipy.py", line 85, in create_1D_input ds = ds.isel(lat=plat,lon=plon,method='nearest', missing_dims="raise") File "/home/atraxoo/.local/lib/python3.6/site-packages/xarray/core/dataset.py", line 1955, in isel return self._isel_fancy(indexers, drop=drop, missing_dims=missing_dims) File "/home/atraxoo/.local/lib/python3.6/site-packages/xarray/core/dataset.py", line 2002, in _isel_fancy indexers_list = list(self._validate_indexers(indexers, missing_dims)) File "/home/atraxoo/.local/lib/python3.6/site-packages/xarray/core/dataset.py", line 1810, in _validate_indexers indexers = drop_dims_from_indexers(indexers, self.dims, missing_dims) File "/home/atraxoo/.local/lib/python3.6/site-packages/xarray/core/utils.py", line 768, in drop_dims_from_indexers f"dimensions {invalid} do not exist. Expected one or more of {dims}" ValueError: dimensions {'method'} do not exist. Expected one or more of Frozen(SortedKeysDict({'lon': 13, 'lat': 7}))

I am running the script on Ubuntu with Python 3.6.9.

Does anyone have an idea how to fix this?

All the best, Manuel Theurl

AnsArn commented 3 years ago

Hey Manuel,

did you try to run the 'run.sh' script? The run.sh script is an example on a HPCC, not for usages on your local computer. We will update the source code also because of a bug in the 1D-point example in the next week.

Does the 2D example for the Zhadang work? Like described here: https://cosipy.readthedocs.io/en/latest/Documentation.html#quick-tutorial

atraxoo commented 3 years ago

Thanks I will wait for the next update then!

With point_model = False the script runs with executing the run.sh as well as with executing the python file directly like you recommend in the docu:

python3 aws2cosipy.py -c ../../data/input/Zhadang/Zhadang_ERA5_2009_2018.csv -o ../../data/input/Zhadang/Zhadang_ERA5_2009.nc -s ../../data/static/Zhadang_static.nc -b 20090101 -e 20091231

AnsArn commented 3 years ago

Hey Manuel,

can you try the new release on the master and check if it works?

Cheers,

Anselm

atraxoo commented 3 years ago

Hey Anselm,

looks good now!

All the best, Manuel