-
Notifications
You must be signed in to change notification settings - Fork 303
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 satellite altitude being in kilometers in ABI L2 reader #1631
Conversation
The attribute data assumes the satellite altitude is stored in meters, while the ABI L2 data stores thisvalue in km; we simply need to insert factor of 1000 to convert the units. This matches what happens in the ABI L1b reader.
👉 View analysis in DeepCode’s Dashboard | Configure the bot |
Thanks for the PR. Just to be clear @aronnem, this is a difference between the L1b and L2 files or is this a change that is done in the L1b reader but wasn't being done in the L2 reader? |
I have checked the GOES-R PUG, the satellite height is in km.
@djhoese I have checked the code, @sfinkens has corrected the unit error in the abi l1b reader two years ago. @aronnem. Thanks for the PR, could you please also update the unit tests. |
@yufeizhu600 I can update the tests, but need a little more direction (sorry, I am new at this.) I see a couple spots in reader_tests, for the data mockup and the test, for example: https://github.com/pytroll/satpy/blob/master/satpy/tests/reader_tests/test_abi_l2_nc.py#L70 Is that all I need to update? |
Yes @aronnem that will update the fake data that goes into the tests so the test will also need to be updated.
|
Codecov Report
@@ Coverage Diff @@
## master #1631 +/- ##
==========================================
+ Coverage 92.61% 92.62% +0.01%
==========================================
Files 258 258
Lines 37761 37810 +49
==========================================
+ Hits 34972 35022 +50
+ Misses 2789 2788 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@yufeizhu600 @djhoese yes, I only needed to make one change. The mockup dataset needs to match the real netCDF (which has the altitude in km). |
@aronnem, thanks for updating, it looks goods to me. Congrats for the first PR, don't forget to add your name to the authors document. |
If the tests weren't failing before and they aren't failing now, then the change made to the reader isn't being tested. The test needs to be updated. |
The tests were failing before 115d4f2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right you are. Looks good then. Thanks.
Oh but as @yufeizhu600 said, could you add yourself to the AUTHORS.md? |
The attribute data assumes the satellite altitude is stored
in meters, while the ABI L2 data stores this value in km;
we simply need to insert factor of 1000 to convert the units.
This matches what happens in the ABI L1b reader.