podaac / l2ss-py

Level 2 subsetter with Harmony integration
https://podaac.github.io/l2ss-py/
Apache License 2.0
11 stars 12 forks source link

Tests that open data files more than once fail on certain dataset #168

Closed danielfromearth closed 1 year ago

danielfromearth commented 1 year ago

At least two subsetting tests, test_subset_empty_bbox and test_specified_variables, fail when running against example TEMPO ozone profile data files. I believe this is due to the fact that the tests open the data files multiple times: once when retrieving the expected results and once when performing the subset operations. Each time the file is opened using subset.open_as_nc_dataset(), the function dimension_cleanup.remove_duplicate_dims() is also called — and during the second run through of remove_duplicate_dims() an error is raised when the nc.Dataset.createVariable() method is called.