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 satpy cf-reader and eumetsat gac reader #1394
Add satpy cf-reader and eumetsat gac reader #1394
Conversation
Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>
For files from pygac wavelenghts are a list with four items with the last one 'µm' which makes all elements strings.
For example if they where created by the area2lonlat in cf_writer
# Conflicts: # satpy/readers/yaml_reader.py
Do not assume resolution to be 742.
This is already done in available_datasets()
Note that latitude can't be loaded as dataset (yet?).
Codecov Report
@@ Coverage Diff @@
## master #1394 +/- ##
==========================================
+ Coverage 90.60% 90.64% +0.03%
==========================================
Files 236 238 +2
Lines 33814 33932 +118
==========================================
+ Hits 30638 30756 +118
Misses 3176 3176
Continue to review full report at Codecov.
|
I know this is still a draft, but I'm curious, could this be made a generic "cf" reader? It could include extra code where it looks for special attributes that the satpy |
We discussed this and decided that the first step was to read the pygac fdr datasets, as its what @ninahakansson needs. After that we make it generic, but by then we will have a set of test that ensures we don't break the fdr reading. |
Congratulations 🎉. DeepCode analyzed your code in 4.608 seconds and we found no issues. Enjoy a moment of no bugs ☀️. 👉 View analysis in DeepCode’s Dashboard | Configure the bot |
Trying to fix problem "Assignment Branch Condition too high", by creating a function for handeleing the modifier attribute.
The Travis job fails because of a error in Windows build: |
That usually happens because of a namedtemporaryfile in the tests. I think we have a workaround for this in some of the reader tests. |
I think we normally just skip the test on Windows...sadly. |
self.assertTrue(np.all(scn_['image0'].data == self.scene['image0'].data)) | ||
self.assertTrue(np.all(scn_['lat'].data == self.scene['lat'].data)) # lat loaded as dataset | ||
self.assertTrue(np.all(scn_['image0'].coords['lon'] == self.scene['lon'].data)) # lon loded as coord | ||
os.remove(filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is generating a Permission error on windows. I suspect the file isn't closed before removal, either because of the writting or the reading, or both... Could you try except the remove for now?
The PR adds a reader for the EUMETSAT AVHRR GAC L1C FDR (yaml) with uses the satpy cf-reader (py).
It is a continuation of PR #1205 which included a reader for data written with
the satpy cf-writer.
Closes #1205
flake8 satpy