-
Notifications
You must be signed in to change notification settings - Fork 300
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
New reader for Himawari L2 NOAA enterprise cloud products. #2558
Conversation
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## main #2558 +/- ##
==========================================
+ Coverage 94.92% 94.93% +0.01%
==========================================
Files 352 354 +2
Lines 51225 51401 +176
==========================================
+ Hits 48624 48800 +176
Misses 2601 2601
Flags with carried forward coverage won't be shown. Click here to find out more.
|
How do these differ from ABI L2? Should we share the python code? |
I think the ABI ones contain enough metadata to create an area Def while the AHI ones do not (just lat lon values). Aside from that, they're broadly similar. |
Pull Request Test Coverage Report for Build 5977747983
💛 - Coveralls |
Instead of defining every possible L2 product in the YAML, could we dynamically load these and use the variable name from the file? |
|
||
aex = get_area_extent(pdict) | ||
|
||
pdict['a_name'] = 'Himawari_Area' |
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.
In the HSD reader we use self.basic_info["observation_area"]
for the name of the area. Is there anything like that in these files? Or if not in these files, what does observation area equal in the HSD files?
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.
No, not really. The self.nc.attrs['cdm_data_type']
attrs stores an area name but it's always Full Disk
, which isn't very meaningful. I can set pdict['a_name']
to that if you prefer though.
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.
If there's not an in-file attribute for this, then can we guess a decent abbreviation/region name based on the filename?
We could but I quite like having them explicitly defined as it makes it easier to browse what products can be loaded before you even download the files. If you have strong feelings about it then I can change though. |
With other L2/EDR readers we (I) have moved to dynamic loading. I agree it is nice to be able to look at the YAML and say "yep, it's called that and it's supported", but I would argue that you can do the same with dynamic variables by looking at the YAML file patterns "yep, this file pattern is listed and the variable I want is 2D, so it must be supported". I'd rather not have to maintain a potentially long list of variables in the YAML and update every time a new L2 product comes out. Additionally, for polar-orbiters the Longitude/Latitude handling gets really sketchy (not that that's an issue for this reader). I can be convinced otherwise...but not as easily as I have been on other issues since I'd likely be the person to add new products. |
Can you point me at an example of a dynamically loaded YAML? Happy to change, but am unfamiliar with the syntax for this... |
The YAML isn't dynamic, the python code is. Any reader that defines the satpy/satpy/readers/file_handlers.py Line 204 in c2ed74b
That includes my recently merged (and updated version of your) VIIRS EDR reader. That one got a little complicated due to the different versions of lon/lat variables in each file. |
Regardless of your feelings about the dynamic dataset definitions, the tests are failing and will need to be fixed before merging. |
Looks like the only remaining failing test is for the CF writer code rather than anything this PR has touched. |
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.
Thanks for the reader! Just a few comments inline, but looks good otherwise.
Have adopted all your suggestions, @mraspaud! There was previously a test to ensure that the warning was raised about the full disk area. As this is now an info message I'm not testing it but can add a test if it really needs one.. |
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.
LGTM!
This PR adds a reader for the L2 cloud products products by NOAA for the Himawari satellites. These products are distributed via NOAA's big data programme in netCDF4 format and can be found at, for example: AHI-L2-FLDK-Clouds.