-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feature/issue-142: duplicated dimension error with TEMPO ozone profile #141
Conversation
…ataset()`" This reverts commit e7b7096.
@nlenssen2013, @frankinspace, I've made some edits to the |
To my knowledge, GESDISC only has two collections with this duplicate dimension issue in SNDR and Tropomi. Both of those files get tested in unit test. |
# return the variables that will need to be renamed: Rename method is still an issue per https://github.com/Unidata/netcdf-c/issues/1672 | ||
return nc_dataset, dup_new_varnames | ||
return nc_dataset, [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the new variable names with duplicate dimensions are the same as the original name (without the '_1' at the end) then a blank list doesn't need to be returned and the function below should be removed. Will need to check with our products.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! I've updated the branch now to remove that return value and the use of the other renaming function.
…_as_nc_dataset()`"" This reverts commit 3fe9c2a.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I think if the pytests all succeeded we are reasonably confident it hasn't broken any of the other datasets. Nice work!
Hey all, just checking back on this... |
Yeah, it checks out with our datasets fine, the second function is still needed for one of our collections so the merged branch into develop is solid |
@nlenssen2013, you mean If it's okay, I'll just go ahead and squash+merge this. If not, we might need to make a few more tweaks to use that |
I'm not getting all the pytest tests/ to pass without it currently, not sure if you are. Not a problem for me if it gets merged though - was able to run an individual subset on that collection and it looks good. |
@nlenssen2013. hmmm, I just reran using Perhaps we merge this into the podaac:feature branch, and then let the automated test suite — run via GitHub actions — serve as the more authoritative check before merging it into |
Yep, I'm fine with that |
2bf1a2d
into
podaac:feature/issue-142-duplicated-dimensions-in-tempo-ozone-profile
#148) * Feature/issue-142: duplicated dimension error with TEMPO ozone profile (#141) * add test for ozone profile proxy data * rework duplicate dimension removal to work with TEMPO ozone profile data * pylint update * simplify return of `remove_duplicate_dims() and `open_as_nc_dataset()` * remove unused import per pylint * add test data files for TEMPO NO2 and O3PROF (contains duplicate dimension) * clean up comments * Revert "simplify return of `remove_duplicate_dims() and `open_as_nc_dataset()`" This reverts commit e7b7096. * include Tuple import * update CHANGELOG.md * Revert "Revert "simplify return of `remove_duplicate_dims() and `open_as_nc_dataset()`"" This reverts commit 3fe9c2a. * remove unused import for flake8 * remove now-unused `rename_dup_vars()` function
Github Issue: #142
Description
Modified the
remove_duplicate_dims()
function so that the subsetter pipeline does not fail when encountering the duplicated "layer" dimension in TEMPO ozone profile data (variables:support_data/ozone_averaging_kernel
andsupport_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.
Overview of integration done
Explain how this change was integration tested. Provide screenshots or logs if appropriate. An example of this would be a local Harmony deployment.
PR checklist:
See Pull Request Review Checklist for pointers on reviewing this pull request