fmihpc / analysator

Python based package for analyzing vlsv files produced by Vlasiator
GNU General Public License v2.0
5 stars 32 forks source link

times = f.read_variable('time') IndexError: list index out of range #154

Closed 44444444444444441ffff closed 2 years ago

44444444444444441ffff commented 2 years ago

In [1]: import pytools as pt
Using LaTeX formatting /home/jing_yi/software/analysator-master/pyCalculations/fieldtracer.py:61: SyntaxWarning: "is not" with a literal. Did you mean "!="? if(bvar is not 'B'): ^[[ANote: Unable to switch to TkAgg backend Using matplotlib version 3.1.2

In [2]: f=pt.vlsvfile.VlsvReader('/home/jing_yi/software/corsair1/state00002000.vlsv')

In [3]: f.list()
tag = PARAMETER time timestep tag = VARIABLE CellID cellB cellUe nodeE cellBAverage n_H+sw_ave v_H+sw_ave n_He++sw_ave v_He++sw_ave n_O+_ave v_O+_ave n_O2+_ave v_O2+_ave n_H+planet_ave v_H+planet_ave T_H+sw T_He++sw T_O+ T_O2+ T_H+planet n_tot T_tot v_tot

In [4]: times = f.read_variable('time')

IndexError Traceback (most recent call last)

in ----> 1 times = f.read_variable('time') ~/software/analysator-master/pyVlsv/vlsvreader.py in read_variable(self, name, cellids, operator) 1094 1095 # Passes the list of cell id's onwards - optimization for reading is done in the lower level read() method -> 1096 return self.read(mesh="SpatialGrid", name=name, tag="VARIABLE", operator=operator, cellids=cellids) 1097 1098 def read_variable_info(self, name, cellids=-1, operator="pass"): ~/software/analysator-master/pyVlsv/vlsvreader.py in read(self, name, tag, mesh, operator, cellids) 672 673 # If this is a variable that can be summed over the populations (Ex. rho, PTensorDiagonal, ...) --> 674 if self.check_variable(self.active_populations[0]+'/'+name): 675 tmp_vars = [] 676 for pname in self.active_populations: IndexError: list index out of range