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 ABI L2 reader to produce reflectances as percentages #2607

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Oct 23, 2023

As discussed on slack, this data handling has been broken for a long time (since creation?). Basically the CMIP Level 2 files are solar zenith correction versions of the L1b bands. Satpy expects reflectances to be 0 to ~100 (%), but in ABI files they are 0 to ~1. This PR fixes this.

CC @yufeizhu600

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

@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Merging #2607 (7495e06) into main (3876475) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2607   +/-   ##
=======================================
  Coverage   94.94%   94.94%           
=======================================
  Files         354      354           
  Lines       51474    51487   +13     
=======================================
+ Hits        48873    48886   +13     
  Misses       2601     2601           
Flag Coverage Δ
behaviourtests 4.26% <0.00%> (-0.01%) ⬇️
unittests 95.56% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
satpy/readers/abi_l2_nc.py 96.22% <100.00%> (+0.22%) ⬆️
satpy/tests/reader_tests/test_abi_l2_nc.py 100.00% <100.00%> (ø)

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6607378876

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

Totals Coverage Status
Change from base Build 6594974423: 0.001%
Covered Lines: 49009
Relevant Lines: 51310

💛 - Coveralls

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.

LGTM!

@mraspaud mraspaud merged commit d762d1c into pytroll:main Oct 23, 2023
19 of 20 checks passed
@mraspaud mraspaud added this to the v0.45.0 milestone Oct 23, 2023
@djhoese djhoese deleted the bugfix-abil2-refl branch October 23, 2023 09:39
@djhoese
Copy link
Member Author

djhoese commented Oct 23, 2023

I'm really not sure my "if" was the right thing here now. I'm only checking the units really, but plenty of L2 products have units of 1. I'll have to make another PR with something smarter.

@mraspaud
Copy link
Member

Sorry I didn't spot it. I'm not familiar with the product...

@djhoese
Copy link
Member Author

djhoese commented Oct 23, 2023

No. No problem. Just pointing out that I realized this after I went to bed last night. I'll clean it up shortly (hopefully).

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.

None yet

3 participants