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 instrument name reading from attributes for VIIRS L2 data #2760

Closed
wants to merge 2 commits into from

Conversation

pnuu
Copy link
Member

@pnuu pnuu commented Mar 13, 2024

The some of the attributes in the CSPP/ASCI files have been renamed between v3r0 and v3r2. The only on I've seen that affects Satpy is the instrument name. The original reader version was based on older data and works at least until v3r0 files, but the current one seems to handle only the newer files. With this PR both can be read.

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

@pnuu
Copy link
Member Author

pnuu commented Mar 13, 2024

Any ideas what would be the best way to adapt the tests to check for both attribute versions? Dupplicating the fake filehandler class and the test class doesn't seem very attractive...

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.92%. Comparing base (85d9117) to head (2fff0d4).
Report is 34 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2760      +/-   ##
==========================================
- Coverage   95.94%   95.92%   -0.02%     
==========================================
  Files         375      377       +2     
  Lines       53293    53502     +209     
==========================================
+ Hits        51130    51321     +191     
- Misses       2163     2181      +18     
Flag Coverage Δ
behaviourtests 4.10% <0.00%> (-0.02%) ⬇️
unittests 96.02% <100.00%> (-0.02%) ⬇️

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.

@pnuu
Copy link
Member Author

pnuu commented Mar 13, 2024

Ok, duplicated the minimal amount of test code I thought was necessary.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 8264934533

Details

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

Totals Coverage Status
Change from base Build 8205996229: 0.003%
Covered Lines: 51193
Relevant Lines: 53325

💛 - Coveralls

@djhoese
Copy link
Member

djhoese commented Mar 13, 2024

CC @wjsharpe, Does this look good to you?

@djhoese
Copy link
Member

djhoese commented Mar 13, 2024

Posting the realization from slack here for the record: @pnuu was using the old "viirs_l2.py" reader that he had created a while ago. A couple months ago I reworked all the VIIRS EDR (note EDR, not L2) to be one viirs_edr reader. The new VIIRS L2 reader being modified here is from #2740 by @wjsharpe and is for the NASA VIIRS L2 products not the NOAA EDR products.

@wjsharpe
Copy link
Contributor

Looks good to me

@pnuu
Copy link
Member Author

pnuu commented Mar 13, 2024

I should've remembered that viirs_l2 -> viirs_edr change. I'll test the v3r2 and v3r0 files tomorrow with the current Satpy and close this if both already work.

@pnuu
Copy link
Member Author

pnuu commented Mar 14, 2024

Yeah, this PR was a mixup with the old viirs_l2.py and the current viirs_edr.py for the ASCI files. Closing, viirs_edr already works with both of the versions I have.

@pnuu pnuu closed this Mar 14, 2024
@pnuu pnuu deleted the bugfix-viirs-l2-instrument-name branch March 14, 2024 07:01
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

5 participants