Skip to content

Commit

Permalink
feat: identity obs
Browse files Browse the repository at this point in the history
Note this I think is wrf hydro specific where the number of 'obs_types'
in the file is 0

issue #18
  • Loading branch information
hkershaw-brown committed Sep 10, 2024
1 parent b1eceed commit 41e8ad0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pydartdiags/obs_sequence/obs_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 41e8ad0

Please sign in to comment.