Skip to content

Commit

Permalink
Don't add extra dims
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcvey3 committed Mar 7, 2024
1 parent e5c00ff commit c5bc8c5
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions dolfyn/io/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,10 @@ def _create_dataset(data):

ds_dict['beam'] = {"dims": ('beam'), "data": beams}
ds_dict['dir'] = {"dims": ('dir'), "data": beams}
ds_dict['earth'] = {"dims": ('earth'), "data": ['E', 'N', 'U']}
ds_dict['inst'] = {"dims": ('inst'), "data": ['X', 'Y', 'Z']}

data['units'].update({'beam': '1',
'dir': '1',
'earth': '1',
'inst': '1'})
'dir': '1'})
data['long_name'].update({'beam': 'Beam Reference Frame',
'dir': 'Reference Frame',
'earth': 'Earth Reference Frame',
'inst': 'Instrument Reference Frame'})
'dir': 'Reference Frame'})

# Iterate through data variables and add them to new dictionary
for key in data['data_vars']:
Expand All @@ -161,6 +154,12 @@ def _create_dataset(data):
tg = '_' + key.rsplit('_')[-1]
else:
tg = ''
ds_dict['earth'] = {"dims": ('earth'), "data": ['E', 'N', 'U']}
ds_dict['inst'] = {"dims": ('inst'), "data": ['X', 'Y', 'Z']}
data['units'].update({'earth': '1',
'inst': '1'})
data['long_name'].update({'earth': 'Earth Reference Frame',
'inst': 'Instrument Reference Frame'})

ds_dict[key] = {"dims": ('earth', 'inst', 'time' + tg), "data": data['data_vars'][key]}
data['units'].update({key: data['units']['orientmat']})
Expand Down

0 comments on commit c5bc8c5

Please sign in to comment.