Skip to content

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

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

Open
wants to merge 4 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.22%. Comparing base (dc6987c) to head (f4da8b6).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3060   +/-   ##
=======================================
  Coverage   96.22%   96.22%           
=======================================
  Files         398      398           
  Lines       57330    57339    +9     
=======================================
+ Hits        55165    55174    +9     
  Misses       2165     2165           
Flag Coverage Δ
behaviourtests 3.88% <0.00%> (-0.01%) ⬇️
unittests 96.31% <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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@djhoese
Copy link
Member

djhoese commented Mar 4, 2025

I suppose the other instances should be changed too, right?

@mraspaud
Copy link
Member

@gerritholl should we merge this or fix the other cases too first?

@gerritholl gerritholl moved this to In Progress in PCW Spring 2025 May 7, 2025
@gerritholl
Copy link
Member Author

@gerritholl should we merge this or fix the other cases too first?

@mraspaud I fixed the other FCI case. There's also FillValue in GHI, FY4B, and MWS. I'm not familiar with those instruments/satellites, so I'm not comfortable changing those, although I would expect that the first two are similar to AGRI. Maybe someone with access to MWS (test) data can check the latter.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 15020393963

Details

  • 10 of 10 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 96.327%

Totals Coverage Status
Change from base Build 15005538775: 0.001%
Covered Lines: 55434
Relevant Lines: 57548

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

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