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 CSPP Geo (geocat) AHI reading support #239

Merged
merged 7 commits into from
Mar 27, 2018
Merged

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Mar 26, 2018

This PR adds AHI dataset identifiers to the geocat reader which will allow full support for CSPP Geo AHI products. Without this added to the reader config the datasets would not have an associated wavelength.

This PR also includes a large-ish change to the base readers and file handlers with a sensor_names property. Previously this was just an instance attribute. The default behavior is the same as before. The difference happens for any file handler that redefines sensor_names which will be used to determine what sensor's files have been loaded. This was needed for the geocat reader which supports multiple sensors including ABI and AHI. Some of the composite entries for these sensors conflict and in the previous implementation it was loading both ABI and AHI configs and which one took priority was unspecified.

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

djhoese added 2 commits March 26, 2018 08:12
If a reader supports multiple sensors and there are composite configs
for each sensor that conflict then there is no telling which one will
get loaded first. This allows file handlers to tell the reader what
sensor these files belong to.
@djhoese djhoese added enhancement code enhancements, features, improvements component:readers labels Mar 26, 2018
@djhoese djhoese added this to the v0.9 milestone Mar 26, 2018
@djhoese djhoese self-assigned this Mar 26, 2018
@djhoese djhoese requested a review from mraspaud March 26, 2018 13:23
@coveralls
Copy link

coveralls commented Mar 26, 2018

Coverage Status

Coverage increased (+0.3%) to 60.674% when pulling c0be224 on feature-geocat-ahi-xarray into 422c02f on develop.

@codecov-io
Copy link

codecov-io commented Mar 26, 2018

Codecov Report

Merging #239 into develop will increase coverage by 19.6%.
The diff coverage is 72.28%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #239      +/-   ##
===========================================
+ Coverage    41.06%   60.67%   +19.6%     
===========================================
  Files          212      111     -101     
  Lines        26842    13673   -13169     
===========================================
- Hits         11023     8296    -2727     
+ Misses       15819     5377   -10442
Impacted Files Coverage Δ
satpy/tests/compositor_tests/test_abi.py 96.77% <ø> (ø) ⬆️
satpy/tests/compositor_tests/__init__.py 98.46% <100%> (+0.02%) ⬆️
satpy/composites/ahi.py 100% <100%> (+100%) ⬆️
satpy/tests/reader_tests/test_geocat.py 98.11% <100%> (ø) ⬆️
satpy/readers/yaml_reader.py 87.23% <13.33%> (-2.2%) ⬇️
satpy/readers/file_handlers.py 91.48% <50%> (-1.85%) ⬇️
satpy/readers/geocat.py 88.88% <66.66%> (-3.71%) ⬇️
satpy/resample.py 37.33% <80%> (+0.29%) ⬆️
satpy/tests/compositor_tests/test_ahi.py 96.66% <96.66%> (ø)
old/ahi_l1b/src/satpy/satpy/readers/acspo.py
... and 103 more

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 422c02f...c0be224. 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

@@ -96,7 +96,7 @@ def get_test_content(self, filename, filename_info, filetype_info):
if key + '/attr/' + a in file_content:
attrs[a] = file_content[key + '/attr/' + a]
if val.ndim > 1:
file_content[key] = DataArray(val, dims=('y', 'x'), attrs=attrs)
file_content[key] = DataArray(val, dims=('lines', 'elements'), attrs=attrs)
Copy link
Member

Choose a reason for hiding this comment

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

why not x and y ?

Copy link
Member Author

Choose a reason for hiding this comment

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

The test is meant to represent what is in the file. The NetCDF4 utility wrapper does not rename any dimensions so in the geocat files the dimensions are actually lines and elements.

@djhoese djhoese merged commit a56ef28 into develop Mar 27, 2018
@djhoese djhoese deleted the feature-geocat-ahi-xarray branch March 27, 2018 12:04
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