xanthos
xanthos copied to clipboard
Xanthos raises error when attempting to write outputs in .netcdf format
Hello developers, I am new to Xanthos.
I have installed the package with no issues following the instructions provided. When I ran the example the first time, I kept the default assumptions then I got all outputs in .csv files. However, when I chose outputs to be in .netcdf format I had the following error (I had also some warnings prior to this error):
INFO: PET processed in 328.2244460582733 seconds---
INFO: Processing Runoff...
INFO: Processing spin-up and simulation for basins 1...235
INFO: Runoff processed in 13.122142791748047 seconds---
INFO: Processing Routing...
INFO: Routing processed in 447.40205478668213 seconds---
INFO: ---Simulation has finished successfully: 788.7534136772156 seconds ---
INFO: ---Start Accessible Water:
INFO: ---Accessible Water has finished successfully: 5.011179447174072 seconds ------
INFO: ---Start Drought Statistics:
INFO: Calculating drought thresholds
INFO: ---Drought Statistics has finished successfully: 0.6707887649536133 seconds ------
INFO: ---Start Hydropower Potential:
C:\Users\atmos\Anaconda3\envs\earth-analytics-python\lib\site-packages\xanthos\hydropower\potential.py:36: FutureWarning: Support for multi-dimensional indexing (e.g. obj[:, None]
) is deprecated and will be removed in a future version. Convert to a numpy array before indexing instead.
e_grids = q_ex_h * hyd_grid_data["elevD"][:, np.newaxis]
INFO: ---Hydropower Potential has finished successfully: 8.252254486083984 seconds ------
INFO: ---Start Hydropower Actual:
INFO: ---Hydropower Actual has finished successfully: 62.43630385398865 seconds ------
INFO: ---Start Diagnostics:
INFO: ---Diagnostics has finished successfully: 0.17566919326782227 seconds ------
INFO: ---Output simulation results:
DEBUG: Outputting data annually
DEBUG: Unit is km3peryear
C:\Users\atmos\Anaconda3\envs\earth-analytics-python\lib\site-packages\pandas\core\indexing.py:719: FutureWarning: Slicing a positional slice with .loc is not supported, and will raise TypeError in a future version. Use .loc with labels or .iloc with positions instead.
indexer = self._get_setitem_indexer(key)
DEBUG: pet output dimension is (67420, 31)
Traceback (most recent call last):
File "C:\Users\atmos\Documents\xanthos\install_examples.py", line 25, in
Thanks for any advice.
Got the same issue. Would you able to solved it?
Thanks.
@rubcalvo we will get someone to check this out ASAP and get back to you. Thanks!