Skip to content

Fix the handling of AMVs unit to units by applying suggestion in #2898 #3031

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

Merged
merged 12 commits into from
Jan 21, 2025

Conversation

YouvaEUMex
Copy link
Contributor

@YouvaEUMex YouvaEUMex commented Jan 14, 2025

As describved in #2898, the AMV datasets returned by the fci_l2_nc reader contain the attribute unit, rather than units, which is the CF naming convention. This is an inherited issues since the FCI L2 NetCDF files use the unit attribute, which is then read and used by the reader.

This PR apply the work around developed for other FCI L2 product file handler to the AMVs.

To that extend it slightly refactor FciL2CommonFunctions._set_attributes to handle the AMVs product (not pixels nor segmented) and change slightly the interface to the segmented( that is also changed in the dedicated get_dataset)

The changes are already described in #2898

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.10%. Comparing base (3765a5e) to head (38d106d).
Report is 20 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3031   +/-   ##
=======================================
  Coverage   96.10%   96.10%           
=======================================
  Files         381      381           
  Lines       55544    55544           
=======================================
  Hits        53383    53383           
  Misses       2161     2161           
Flag Coverage Δ
behaviourtests 3.89% <0.00%> (ø)
unittests 96.20% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coveralls
Copy link

coveralls commented Jan 14, 2025

Pull Request Test Coverage Report for Build 12793012035

Details

  • 15 of 15 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 96.217%

Totals Coverage Status
Change from base Build 12766191418: 0.0%
Covered Lines: 53664
Relevant Lines: 55774

💛 - Coveralls

Copy link
Collaborator

@strandgren strandgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @YouvaEUMex. I've left one comment in line. I would also suggest removing the _get_global_attributes method in FciL2NCAMVFileHandler and instead add a check in the corresponding method in FciL2CommonFunctions to add the channel information in case of reading AMV data.

I

Copy link
Collaborator

@strandgren strandgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest three minor changes on the updated code.

@strandgren
Copy link
Collaborator

Thanks, looks good to me now! Please mark the PR as ready for further review :)

@YouvaEUMex YouvaEUMex marked this pull request as ready for review January 16, 2025 08:35
Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, just a question and typo inline

@mraspaud mraspaud merged commit 8082f99 into pytroll:main Jan 21, 2025
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

units attribute is not CF conform for the for AMV datasets in the fci_l2_nc reader
4 participants