olga / olga_model

Tools required to setup and run OLGA
3 stars 2 forks source link

Fix timeseries plots #44

Closed roeles closed 6 years ago

roeles commented 6 years ago

Traceback (most recent call last): File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap self.run() self.run() File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run self._target(*self._args, **self._kwargs) self._target(*self._args, **self._kwargs) File "/home/baardman/WRFnl/olga_model/src/plotdriver.py", line 62, in plot_driver File "/home/baardman/WRFnl/olga_model/src/plotdriver.py", line 60, in plot_driver create_sounding(olga,wrfout,dom,times) create_timeseries(olga,wrfout,dom,times) File "/home/baardman/WRFnl/olga_model/src/timeseries.py", line 62, in create_timeseries File "/home/baardman/WRFnl/olga_model/src/sounding.py", line 36, in create_sounding d = readwrf_loc(olga,wrfout,lon,lat,times[0],times[-1]) File "/home/baardman/WRFnl/olga_model/src/readwrf.py", line 358, in __init__ d = readwrf_loc(olga,wrfout,lon,lat,times[0],times[-1]) File "/home/baardman/WRFnl/olga_model/src/readwrf.py", line 358, in __init__ self.ccl[2,t] = tmp1[tmp3>0].mean() if tmp3.max() > 0 else 0 IndexError: boolean index did not match indexed array along dimension 0; dimension is 36 but corresponding boolean dimension is 11 self.ccl[2,t] = tmp1[tmp3>0].mean() if tmp3.max() > 0 else 0 IndexError: boolean index did not match indexed array along dimension 0; dimension is 36 but corresponding boolean dimension is 11

roeles commented 6 years ago

@julietbravo I'm trying to understand what is happening here... I wonder if this code assumes that the tmp1/tmp2/tmp3 arrays are square in size?