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 AMI L1b reader incorrectly grouping files #1048

Merged
merged 1 commit into from Jan 24, 2020

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Jan 23, 2020

The satpy.readers.group_files function is using the sector_info filename metadata as one piece of information to sort files by. However, with names like gk2a_ami_le1b_nr013_fd020ge_201909300300.nc where sector_info is fd020ge, you end up with incorrect sorting because it contains resolution information. Compare this to ABI where sector_info might be "F" or "C" or "M1" or "M2" but does not container resolution information.

This PR modifies the filename pattern to limit the "sector_info" to the first two characters of this portion of the filename. This is a guess as currently (as far as I know) there are no other sectors of AMI data available to the public.

@simonrp84 Have you seen other sectors or other types of files?

  • Tests added and test suite added to parent suite
  • Tests passed
  • Passes flake8 satpy

@coveralls
Copy link

coveralls commented Jan 23, 2020

Coverage Status

Coverage increased (+0.02%) to 87.511% when pulling 9d26fb5 on djhoese:bugfix-ami-grouping into fa997a0 on pytroll:master.

@codecov
Copy link

codecov bot commented Jan 23, 2020

Codecov Report

Merging #1048 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1048      +/-   ##
==========================================
+ Coverage   87.49%   87.52%   +0.02%     
==========================================
  Files         188      188              
  Lines       29238    29250      +12     
==========================================
+ Hits        25582    25601      +19     
+ Misses       3656     3649       -7
Impacted Files Coverage Δ
satpy/tests/test_yaml_reader.py 99.15% <100%> (+0.01%) ⬆️
satpy/tests/reader_tests/test_ami_l1b.py 96.61% <100%> (+1.82%) ⬆️
satpy/readers/yaml_reader.py 94.4% <100%> (ø) ⬆️
satpy/scene.py 89.91% <0%> (+0.17%) ⬆️
satpy/readers/__init__.py 94.56% <0%> (+1.2%) ⬆️

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 fa997a0...9d26fb5. Read the comment docs.

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

@djhoese djhoese merged commit e2f7d19 into pytroll:master Jan 24, 2020
@djhoese djhoese deleted the bugfix-ami-grouping branch January 24, 2020 16:44
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