diff --git a/dolfyn/io/base.py b/dolfyn/io/base.py index a9307f71..169f9436 100644 --- a/dolfyn/io/base.py +++ b/dolfyn/io/base.py @@ -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']: @@ -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']})