Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing variable attributes when reading multiple files #11

Open
deeplycloudy opened this issue May 25, 2020 · 0 comments
Open

Missing variable attributes when reading multiple files #11

deeplycloudy opened this issue May 25, 2020 · 0 comments

Comments

@deeplycloudy
Copy link
Owner

When reading multiple LMA datasets with lma_dataset, t = pyxlma.lmalib.io.read.dataset(list_of_files), they are concatenated but in the process the attributes of some variables are dropped.

from pyxlma.lmalib.io.cf_netcdf import compare_attributes
compare_attributes(lma_dataset)

gives

network_center_latitude -- Template: {'long_name': 'Latitude of network center used in event processing', 'units': 'degrees_north', 'standard_name': 'latitude'}  -- Actual: {}
network_center_longitude -- Template: {'long_name': 'Longitude of network center used in event processing', 'units': 'degrees_east', 'standard_name': 'longitude'}  -- Actual: {}
network_center_altitude -- Template: {'long_name': 'Altitude of network center used in event processing', 'units': 'meter', 'standard_name': 'altitude'}  -- Actual: {}
station_latitude -- Template: {'_FillValue': nan, 'valid_range': [-90.0, 90.0], 'units': 'degrees_north', 'standard_name': 'latitude'}  -- Actual: {}
station_longitude -- Template: {'_FillValue': nan, 'valid_range': [-180.0, 180.0], 'units': 'degrees_east', 'standard_name': 'longitude'}  -- Actual: {}
station_altitude -- Template: {'_FillValue': nan, 'valid_range': [-100.0, 40000.0], 'units': 'meters', 'standard_name': 'altitude', 'positive': 'up'}  -- Actual: {}
station_event_fraction -- Template: {'_FillValue': nan, 'long_name': 'Fraction of events to which this station contributed', 'valid_range': [0.0, 100.0], 'units': 'percent'}  -- Actual: {}
station_power_ratio -- Template: {'_FillValue': nan, 'long_name': '<P/P_m>'}  -- Actual: {}
event_time -- Template: {'_FillValue': nan, 'standard_name': 'time', 'long_name': 'Time of event', 'units': 'seconds since 2018-09-13 00:00:00 +00:00'}  -- Actual: {'_FillValue': nan, 'standard_name': 'time', 'long_name': 'Time of event'}
event_stations -- Template: {'_FillValue': 0, 'long_name': 'Number of contributing stations ', 'coordinates': 'event_id event_time event_latitude event_longitude', 'valid_range': [5, 255]}  -- Actual: {'_FillValue': 0, 'long_name': 'Number of contributing stations ', 'coordinates': 'event_id event_time event_latitude event_longitude', 'valid_range': [6, 255]}
event_id -- Template: {'_FillValue': 18446744073709551615, 'parent_id': 'event_parent_flash_id', 'parent': 'flash_id', 'cf_role': 'tree_id'}  -- Actual: {}
station_code -- Template: {'_FillValue': ' ', 'long_name': 'LMA station identifier and event station mask order'}  -- Actual: {}

Note the empty "Actual" dictionaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant