Fix AMI L1b reader incorrectly grouping files #1048
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
satpy.readers.group_files
function is using thesector_info
filename metadata as one piece of information to sort files by. However, with names likegk2a_ami_le1b_nr013_fd020ge_201909300300.nc
wheresector_info
isfd020ge
, 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?
flake8 satpy