-
Notifications
You must be signed in to change notification settings - Fork 298
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 MOD06 support to 'modis_l2' reader #812
Conversation
…" case Fixes the bug where the get dataset function does not respect the file_key tag in the yaml file of the reader when no byte manipulation is required. Adds mod06 dataset to the yaml file.
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.
I wonder if this could benefit from the available_datasets
method being defined. Complicated, yes, but you'd be able to add any field in the file.
satpy/etc/readers/modis_l2.yaml
Outdated
coordinates: [longitude, latitude] | ||
|
||
cloud_effective_radius_1km: | ||
name: cloud_effective_radius_1km |
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.
Why does this name have the resolution in it when the others don't?
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.
I am not sure right now if this is true for that specific dataset but some of them have 5km and 1km datasets in the file and are named that way then too. I will check up on that. Eventually if only 1km is present the 1km can be removed from the name.
Regarding the available_datasets
: hadn't thought about that but I guess that would be nice since the reader then probably would support most, if not all, level 2 files without the need of updating the yaml file.
Due to preparations for a talk I have to give next week I am a little short on time so I don't have capacity to have a look at it right away. I wonder if for the time being it would be possible to merge the mod06 addition since we want to use those files in a course we are giving right now and it would be nice if the students could just use the module installed from the master instead of my branch (all of them are python beginners and they are struggling enough already with the topics covered)? I would then do another PR when I come up with a general solution using the available_datasets
method.
I'm ok with not requiring
@BENR0 Had also mentioned needing to check on the files and what variables are available for different resolutions. |
I totally forgot about this. Regarding the refactoring @djhoese mentions above I probably have time later today and update the PR accordingly then. I haven't come around to think about the I would also be fine if this is merged after the reworks mentioned but note that not all datasets that are available in the mod_06 file are implemented in this PR. But I guess for someone needing one of the implemented ones there would be added value. |
Codecov Report
@@ Coverage Diff @@
## master #812 +/- ##
==========================================
+ Coverage 83.06% 89.63% +6.57%
==========================================
Files 163 200 +37
Lines 23592 29601 +6009
==========================================
+ Hits 19596 26532 +6936
+ Misses 3996 3069 -927
Continue to review full report at Codecov.
|
I updated the yaml file with some more datasets contained in the mod06 files and combined the datasets which are available in multiple resolutions as suggested by @djhoese . There are still some datasets missing (for example cloud_mask which is a subset of the cloud mask in the mod35_l2 files). I lower cased all variables names (in the file most of them are indeed capitalized but some are lower case. Personally I like the lower case version but I would also be fine if it is decided to capitalize. |
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. If @djhoese is ok with the last changes, we can merge this.
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 except the tests are failing. As I mentioned before this would really benefit from available_datasets
but refactoring the code to do that isn't necessary for this to be merged.
Looks like #913 is tackling the |
Fixes the bug where the file_key tag of a dataset in the yaml file was not used when a dataset where no bit manipulation is required is loaded.
Additionally some datasets of the mod06_l2 files where added to the yaml file.
Closes #1200