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

Fix fill value removal for non-integer FCI data #3060

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gerritholl
Copy link
Member

Fix removing the _FillValue attribute for non-integer FCI data. Satpy was removing the non-existing FillValue attribute instead. Retaining the _FillValue was causing problems as described in #3058.

Drop _FillValue attribute when we don't have counts.  We were dropping
the FillValue attribute instead, which I think does not exist.
Copy link
Member

@ameraner ameraner left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix! I wouldn't be surprised if FillValue was used in an old test file format version available when that part of code was written, and it got fixed in the meanwhile.

@gerritholl
Copy link
Member Author

There are two more occurrences of FillValue in this file and 8 more in the readers for AGRI, FY4B, GHI, MERSI, and MWS...

@ameraner
Copy link
Member

ameraner commented Feb 12, 2025

Yes, I also noticed. Those could also be fixed to _FillValue (or the according checks could be removed alltogether since the format now is populated and should never trigger them anymore...). Up to you of course if you want to include it in this PR.

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.11%. Comparing base (f7d5dba) to head (bbbcb2f).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3060   +/-   ##
=======================================
  Coverage   96.11%   96.11%           
=======================================
  Files         383      383           
  Lines       55685    55694    +9     
=======================================
+ Hits        53523    53532    +9     
  Misses       2162     2162           
Flag Coverage Δ
behaviourtests 3.88% <0.00%> (-0.01%) ⬇️
unittests 96.21% <100.00%> (+<0.01%) ⬆️

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.

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

Successfully merging this pull request may close these issues.

Writing and reading NetCDF file for FCI does not retain fill value
2 participants