-
Notifications
You must be signed in to change notification settings - Fork 13
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
Unable to subset grouped dataset with coordinate variables in MMT #127
Comments
@frankinspace, do you know which version of the l2ss subsetter was run in this case? |
At the time reported, https://harmony.uat.earthdata.nasa.gov/versions shows which images are currently deployed (drop the .uat for ops) |
I've started a branch for this bug (https://github.com/podaac/l2ss-py/tree/issues/127) which at the moment just includes the TEMPO data in the list of test data unit tests get run against. Right now |
@frankinspace, I haven't yet had a chance to look directly at the broader issue of variable names passed from harmony. But, regarding the failed test function, Consider these lines in subset.subset(
file_to_subset=join(data_dir, test_file),
bbox=bbox,
output_file=join(subset_output_dir, output_file)
)
out_ds = xr.open_dataset(join(subset_output_dir, output_file),
decode_times=False,
decode_coords=False,
mask_and_scale=False)
lat_var_name, lon_var_name = subset.compute_coordinate_variable_names(out_ds) It seems to me that although the variables are being flattened within the call to Some options are:
Thoughts? Does this sound reasonable to you? |
@danielfromearth yes I agree the I'm a bit torn on how to handle this one; the test is trying to just use At the same time, it would be nice if |
The more I look at this, the more I think refactoring might not be the way to go. The
Either way, if A 3rd option would be to avoid ever using Thoughts? For instance, do you like the idea of checking for a group structure inside the |
Yes perhaps |
Okay, I've figured out a kind of workaround. Instead of refactoring ..you'll see that change in PR #130. Thoughts? |
(please pardon the quick off-topic question: is there a plan to add type hints throughout the code base? Is that something that would be worthwhile for another issue and PR?) |
Yes I'm all for adding type hints |
Okay, there's now a new issue (#136) for following up on type hints. |
Trying to invoke l2ss-py in UAT with TEMPO_NO2-PROXY_L2_V01 collection results in an error from Harmony. Looking at the logs reveals:
Then a stacktrace follows:
It appears that because this is a grouped dataset, it is first getting "flattened" so that all variables are at the top level. However, because latitude and longitude variable names are being passed in from Harmony; l2ss-py is trying to use those variable names to index into the dataset. The variable names passed in from harmony still contain paths with
/
to signify the group but because the dataset has been flattened already, there are no groups and indexing fails.The text was updated successfully, but these errors were encountered: