diff --git a/src/pydartdiags/obs_sequence/obs_sequence.py b/src/pydartdiags/obs_sequence/obs_sequence.py index 654c9e1..84989cb 100644 --- a/src/pydartdiags/obs_sequence/obs_sequence.py +++ b/src/pydartdiags/obs_sequence/obs_sequence.py @@ -128,7 +128,11 @@ def obs_to_list(self, obs): raise ValueError("Neither 'loc3d' nor 'loc1d' could be found in the observation sequence.") typeI = obs.index('kind') # type of observation type_value = obs[typeI + 1] - data.append(self.types[type_value]) # observation type + if not self.types: + data.append('Identity') + else: + data.append(self.types[type_value]) # observation type + # any observation specific obs def info is between here and the end of the list time = obs[-2].split() data.append(int(time[0])) # seconds