Open gerritholl opened 2 years ago
Oh very interesting. So the problem is that the ABI L2 reader has a C10 that it can load:
If you asked for the "calibration='radiance'" version of that channel I would suspect it to work. I'm not sure there is an easy way to fix this. It would require the portion of the Scene/DependencyTree that is asking the reader for a dataset to check all readers that know about a dataset and attempt to load the dataset from each one until it is successful (or fails).
I vote for renaming the ABI L2 C10
product...
The only issue with that is then they can't be used when making composites as most of the composites use the specific product name.
Possibly related? https://github.com/pytroll/satpy/issues/2331
Wow, can't believe this issue already exists. @simonrp84 brought this up on slack which I'm guessing is why you commented here. In his case he was able to get a L1b + L2 composite to work when he updated the composites using L1b channels to specify a resolution: X
since the L2 reader's DataID doesn't include resolution, but the L1b reader does. This is a workaround, but only lucky in this particular case since logically the L2 reader should be able (allowed) to be specify the resolution. Also important to note, he was not provided the L2 files that provided the equivalent of the L1b channels so the dependency tree wanted to use DataIDs that weren't available/loadable.
The main issue(s) I discovered after last diving into the dependency tree code is that the dependency tree looks at all known DataIDs and doesn't consider whether or not the DataIDs are available. Also the dep tree says "here are all the DataIDs from all the readers that match the request, which one matches most closely". In the L1b/L2 case, just by chance of the way it was coded, when a resolution isn't specified in the request, the resolution
in the DataID
is ignored and the L2 (no resolution) DataID
is considered a "better match". If the L2 DataID
did define a resolution
I have a feeling we'd get a TooManyResults
exception meaning that the dependency tree found two or more DataID
s that matched equally well to the requested DataQuery
.
Regardless of the above, even if L2 specified resolution for its DataID
s and even if the user provided the necessary L2 data files, the dependency tree should probably be able to resolve/choose these conflicts based on:
filenames={"reader": [...], "reader2": [...]}
dictionary where the dict has some order associated with it depending on how it was created. Or the readers could have some relationship/understanding that the L2 reader is reading "descendant" datasets of the L1b data. I'm not sure if in that case the dependency tree should prefer L2 (the descendant/child) or L1b (the ancestor/parent).On your second point, I think that if both L1 and L2 dataset files are provided by the user them the higher level dataset should be used by default.
Describe the bug
When I load ABI L1 and L2 data into the same Scene, I can't load L1 datasets.
To Reproduce
Expected behavior
I expect the loading to work just as it would (and does) when I pass only L1 files upon Scene initiation.
Actual results
It fails to load channel 10 because it says the file types
abi_l2_cmip_c10
andabi_l2_cmip
are missing. That's wrong. I shouldn't and don't need L2 CMIP data to load L1 channel 10.Resampling does not generate C10 either.
Environment Info: