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

Add assembled_lat_bounds, assembled_lon_bounds and time variables #1091

Merged
merged 16 commits into from Mar 25, 2020

Conversation

zxdawn
Copy link
Member

@zxdawn zxdawn commented Feb 28, 2020

Add assembled_lat_bounds and assembled_lon_bounds to support "pcolormesh"

@coveralls
Copy link

coveralls commented Feb 28, 2020

Coverage Status

Coverage decreased (-0.02%) to 89.323% when pulling 0ea1dbe on zxdawn:tropomi into bbfb44f on pytroll:master.

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.

Thanks for adding the bounds and a way to assemble them.
Some tests are still missing, but it looks good otherwise!

satpy/readers/tropomi_l2.py Show resolved Hide resolved
satpy/etc/readers/tropomi_l2.yaml Outdated Show resolved Hide resolved
satpy/readers/tropomi_l2.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 2, 2020

Codecov Report

Merging #1091 into master will decrease coverage by 0.01%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1091      +/-   ##
==========================================
- Coverage   89.34%   89.32%   -0.02%     
==========================================
  Files         195      197       +2     
  Lines       28785    29045     +260     
==========================================
+ Hits        25717    25944     +227     
- Misses       3068     3101      +33
Impacted Files Coverage Δ
satpy/tests/reader_tests/test_tropomi_l2.py 98.31% <100%> (+0.59%) ⬆️
satpy/readers/tropomi_l2.py 90% <58.82%> (-4.12%) ⬇️
satpy/readers/seviri_base.py 90.9% <0%> (-7.96%) ⬇️
satpy/composites/__init__.py 78.73% <0%> (-0.24%) ⬇️
satpy/scene.py 90% <0%> (-0.18%) ⬇️
satpy/tests/reader_tests/test_nwcsaf_nc.py 100% <0%> (ø) ⬆️
satpy/readers/seviri_l2_grib.py 86.45% <0%> (ø)
satpy/tests/reader_tests/test_seviri_l2_grib.py 100% <0%> (ø)
satpy/readers/nwcsaf_nc.py 54.83% <0%> (+1.08%) ⬆️

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 bbfb44f...c628e27. Read the comment docs.

@mraspaud
Copy link
Member

mraspaud commented Mar 3, 2020

@zxdawn could you add a test for prepare_geo ?

@mraspaud mraspaud added component:readers enhancement code enhancements, features, improvements labels Mar 4, 2020
@zxdawn
Copy link
Member Author

zxdawn commented Mar 4, 2020

@mraspaud I've added the test of bounds and assembled bounds.

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.

Nice addition. Thanks for adding this. I had one question and one request to add a docstring for the new method you created.

satpy/readers/tropomi_l2.py Outdated Show resolved Hide resolved
satpy/readers/tropomi_l2.py Outdated Show resolved Hide resolved
@zxdawn
Copy link
Member Author

zxdawn commented Mar 23, 2020

@djhoese Could you test the docstring in html when you're free? It's still not updated on my PC ...

@ghost
Copy link

ghost commented Mar 23, 2020

DeepCode's analysis on #c628e2 found:

  • 0 critical issues. ⚠️ 0 warnings and 1 minor issue. ✔️ 0 issues were fixed.

💬 This comment has been generated by the DeepCode bot, installed by the owner of the repository. The DeepCode bot protects your repository by detecting and commenting on security vulnerabilities or other critical issues.


☺️ If you want to provide feedback on our bot, here is how to contact us.

@zxdawn zxdawn changed the title Add assembled_lat_bounds and assembled_lon_bounds Add assembled_lat_bounds, assembled_lon_bounds and time variables Mar 23, 2020
@zxdawn
Copy link
Member Author

zxdawn commented Mar 23, 2020

Wait ... There's a bug in bounds.
Here's an example:
lon:

[[ 98.84363   98.93424   99.02373  ... 129.76398  129.87517  129.98782 ]
 [108.4323   108.511734 108.5901   ... 132.91273  132.99805  133.08452 ]
 [108.41396  108.493416 108.57179  ... 132.90236  132.9877   133.0742  ]
 ...
 [ 98.943634  99.03412   99.12347  ... 129.78008  129.89093  130.00325 ]
 [ 98.91031   99.00084   99.09023  ... 129.77466  129.88562  129.99805 ]
 [ 98.87702   98.9676    99.05704  ... 129.76933  129.8804   129.99295 ]]

lat:

[[37.420124 37.466026 37.511227 ... 43.466366 43.4597   43.45283 ]
 [13.883977 13.919363 13.954235 ... 19.29496  19.295883 19.296774]
 [13.945641 13.981048 14.01594  ... 19.35718  19.358086 19.358957]
 ...
 [37.24356  37.289356 37.33445  ... 43.28057  43.27397  43.26717 ]
 [37.30243  37.348263 37.39339  ... 43.34251  43.335888 43.329063]
 [37.361336 37.407204 37.452366 ... 43.404434 43.397793 43.390945]]

@mraspaud
Copy link
Member

ah, indeed !

@zxdawn
Copy link
Member Author

zxdawn commented Mar 23, 2020

Fixed the method of stacking:

lon:

[[108.4323   108.511734 108.5901   ... 132.91273  132.99805  133.08452 ]
 [108.41396  108.493416 108.57179  ... 132.90236  132.9877   133.0742  ]
 [108.39558  108.47503  108.55342  ... 132.89192  132.97731  133.06384 ]
 ...
 [ 98.91031   99.00084   99.09023  ... 129.77466  129.88562  129.99805 ]
 [ 98.87702   98.9676    99.05704  ... 129.76933  129.8804   129.99295 ]
 [ 98.84363   98.93424   99.02373  ... 129.76398  129.87517  129.98782 ]]

lat:

[[13.883977 13.919363 13.954235 ... 19.29496  19.295883 19.296774]
 [13.945641 13.981048 14.01594  ... 19.35718  19.358086 19.358957]
 [14.007241 14.042669 14.077581 ... 19.4195   19.420387 19.421242]
 ...
 [37.30243  37.348263 37.39339  ... 43.34251  43.335888 43.329063]
 [37.361336 37.407204 37.452366 ... 43.404434 43.397793 43.390945]
 [37.420124 37.466026 37.511227 ... 43.466366 43.4597   43.45283 ]]

Here's the result of original method without stack:
lon:

[[108.43229675 108.51173401 108.59010315 ... 132.91273499 132.99804688
  133.08451843]
 [108.41396332 108.49341583 108.5717926  ... 132.90235901 132.98770142
  133.07420349]
 [108.39557648 108.47502899 108.55342102 ... 132.891922   132.97731018
  133.06384277]
 ...
 [ 98.91030884  99.00083923  99.09023285 ... 129.7746582  129.88562012
  129.99804688]
 [ 98.87702179  98.96759796  99.05703735 ... 129.76933289 129.88040161
  129.99295044]
 [ 98.84362793  98.93424225  99.02372742 ... 129.76397705 129.87516785
  129.98782349]]

lat:

[[13.88397694 13.91936302 13.95423508 ... 19.29496002 19.29588318
  19.29677391]
 [13.94564056 13.98104763 14.01593971 ... 19.35717964 19.35808563
  19.35895729]
 [14.00724125 14.0426693  14.07758141 ... 19.41950035 19.42038727
  19.42124176]
 ...
 [37.3024292  37.34826279 37.39339066 ... 43.34251022 43.33588791
  43.32906342]
 [37.36133575 37.40720367 37.45236588 ... 43.4044342  43.39779282
  43.39094543]
 [37.42012405 37.46602631 37.51122665 ... 43.46636581 43.45970154
  43.45283127]]

@djhoese
Copy link
Member

djhoese commented Mar 23, 2020

With my latest updates it now looks like this:

image

@zxdawn
Copy link
Member Author

zxdawn commented Mar 23, 2020

@djhoese Thanks, Looks nice!

@mraspaud mraspaud added this to the v0.21.0 milestone Mar 25, 2020
@mraspaud mraspaud merged commit 2e77f71 into pytroll:master Mar 25, 2020
@zxdawn zxdawn deleted the tropomi branch March 25, 2020 11:54
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.

None yet

5 participants