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

Workaround AWIPS bug not handling integers properly in "awips_tiled" writer #2671

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Dec 8, 2023

Discovered by @spruceboy and the rest of the GINA team in Alaska. It seems AWIPS is fine displaying data that is unsigned 16-bit integers stored in a 16-bit signed integer with the _Unsigned: true attribute. However, AWIPS does like this data when using special "derivedParameters" functionality where it treats the data as signed data before passing it to additional processing. In an attempt workaround this issue @spruceboy tried saving the data as signed integers (no _Unsigned attribute) and that fixed the addition processing, but broke the visualization. The simplest fix for now (seeing as AWIPS development will take 6-12 months minimum once the fix is implemented) is in this PR which is to only use the positive side of the signed variable.

Note: I had to update one of the tests because the precision of the saved NetCDF data compared to the original input data was reduced, BUT this PR is not fixing a Satpy bug. This PR is working around an AWIPS bug.

CC @kathys

  • Closes #xxxx
  • Tests added
  • Fully documented
  • Add your name to AUTHORS.md if not there already

Copy link

codecov bot commented Dec 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fbe017c) 95.31% compared to head (91b59ca) 95.32%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2671   +/-   ##
=======================================
  Coverage   95.31%   95.32%           
=======================================
  Files         371      371           
  Lines       52435    52435           
=======================================
+ Hits        49980    49982    +2     
+ Misses       2455     2453    -2     
Flag Coverage Δ
behaviourtests 4.16% <0.00%> (ø)
unittests 95.93% <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.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 7143636183

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.886%

Totals Coverage Status
Change from base Build 7106990647: 0.0%
Covered Lines: 50108
Relevant Lines: 52258

💛 - Coveralls

@spruceboy
Copy link

Thanks for your help with this @djhoese! Just to be clear, this appears to be a bug in edex, the part of AWIPS the pre-processes data for display in the AWIPS visualization tool CAVE. There are probibly ways to work around this issue inside EDEX, but we can't seem to find anyone who can explain what is going on. Thanks again!

@djhoese djhoese merged commit ad6af05 into pytroll:main Dec 11, 2023
18 of 19 checks passed
@djhoese djhoese deleted the bugfix-awips-integers branch December 11, 2023 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants