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 the avhrr_l1b_gaclac to support angles, units and avhrr variants #759

Merged
merged 6 commits into from
May 13, 2019

Conversation

mraspaud
Copy link
Member

@mraspaud mraspaud commented May 10, 2019

This small PR makes angles available, and sets the units and avhrr channels properly

  • Tests added
  • Tests passed
  • Passes git diff origin/master -- "*py" | flake8 --diff

@mraspaud mraspaud added enhancement code enhancements, features, improvements component:readers labels May 10, 2019
@mraspaud mraspaud requested a review from sfinkens as a code owner May 10, 2019 12:38
@mraspaud mraspaud self-assigned this May 10, 2019
@coveralls
Copy link

coveralls commented May 10, 2019

Coverage Status

Coverage increased (+0.2%) to 81.847% when pulling e970731 on mraspaud:feature-better-gac-reader into fd357db on pytroll:master.

@codecov
Copy link

codecov bot commented May 10, 2019

Codecov Report

Merging #759 into master will decrease coverage by 0.05%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #759      +/-   ##
==========================================
- Coverage   81.61%   81.56%   -0.06%     
==========================================
  Files         157      157              
  Lines       22636    22652      +16     
==========================================
  Hits        18475    18475              
- Misses       4161     4177      +16
Impacted Files Coverage Δ
satpy/readers/avhrr_l1b_gaclac.py 6.25% <0%> (-2.09%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98a76a9...147add2. Read the comment docs.

@codecov
Copy link

codecov bot commented May 10, 2019

Codecov Report

Merging #759 into master will increase coverage by 0.23%.
The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #759      +/-   ##
==========================================
+ Coverage   81.61%   81.85%   +0.23%     
==========================================
  Files         157      158       +1     
  Lines       22636    22734      +98     
==========================================
+ Hits        18475    18608     +133     
+ Misses       4161     4126      -35
Impacted Files Coverage Δ
satpy/tests/reader_tests/test_viirs_sdr.py 92.33% <ø> (ø) ⬆️
satpy/tests/reader_tests/__init__.py 97.91% <100%> (+0.04%) ⬆️
satpy/readers/avhrr_l1b_gaclac.py 90% <84.61%> (+81.66%) ⬆️
satpy/tests/reader_tests/test_avhrr_l1b_gaclac.py 97.33% <97.33%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd357db...e970731. Read the comment docs.

Copy link
Member

@sfinkens sfinkens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return xr.DataArray(da.from_array(data, chunks=(chunk_lines, chunk_cols)),
dims=['y', 'x'], attrs=info)
res = xr.DataArray(da.from_array(data, chunks=(chunk_lines, chunk_cols)),
dims=['y', 'x'], attrs=info)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the scanline timestamps as additional y-coordinate would be nice here. But since this PR seems urgent and the CF writer does not completely support timestamps (yet), we can do that later. Added it to my TODO List.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can try to add it tonight. Is the cf writer crashing if we add the times atm ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@mraspaud mraspaud requested a review from djhoese as a code owner May 11, 2019 18:25
Copy link
Member

@djhoese djhoese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple things I noticed that weren't necessarily something you did. A few typos otherwise.

@@ -25,6 +26,7 @@ datasets:
calibration:
reflectance:
standard_name: reflectance
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe standard_names should be toa_bidirectional_reflectance and toa_brightness_temperature. @adybbroe could maybe verify that I'm not making things up. I don't remember what the radiance is supposed to be.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good point.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I checked a few other readers, we have reflectance and brightness_temperature there. So it might need another PR to fix all of these

# Author(s):

# Martin Raspaud <martin.raspaud@smhi.se>
# Copyright (c) 2009-2019 Pytroll developpers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo developers

@@ -0,0 +1,136 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2019 Pytroll developpers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same typo

@mraspaud mraspaud requested a review from djhoese May 12, 2019 13:22
@mraspaud mraspaud merged commit 36fe00a into pytroll:master May 13, 2019
@mraspaud mraspaud deleted the feature-better-gac-reader branch May 13, 2019 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:readers enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants