podaac / l2ss-py

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

Feature/issue-142: duplicated dimension error with TEMPO ozone profil… #148

Closed danielfromearth closed 1 year ago

danielfromearth commented 1 year ago

Github Issue: #142

Description

Modified the remove_duplicate_dims() function so that the subsetter pipeline does not fail on TEMPO ozone profile data when encountering the duplicated "layer" dimension, which is present for variables support_data/ozone_averaging_kernel and support_data/ozone_noise_correlation_matrix.

Overview of work done

Added checks in remove_duplicate_dims() for whether the Dimension and Variable corresponding to the duplicated dimension already exist in the NetCDF. The function directly writes the new variable with no duplicated dimensions rather than keeping it with an altered name that needs to be renamed later in the subsetting procedure.

Overview of verification done

Added a new unit test for TEMPO ozone profile data. Checked that all automated tests passed successfully.

Previously merged commits

This reverts commit e7b709665683824a22cc8013d3935a907dfe78dc.

This reverts commit 3fe9c2ad16beb559b7a6de2a8fa5794e388b9c78.

PR checklist:

See Pull Request Review Checklist for pointers on reviewing this pull request

danielfromearth commented 1 year ago

woops, the re-request was just a misclick