-
Notifications
You must be signed in to change notification settings - Fork 3
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
DAS-2300 - provides spatial subsetting support for 3d variables in SPL3SMP #30
Conversation
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.
The main change is the update to hoss_config.json to add configuration entries for SPL3SMP 3d variables and the corresponding updates to the code to support the changes
We still have an issue where if a request only has coordinate variables, it will fail since the coordinates do not have coordinate attributes. This will be addressed in a future ticket including the need to have independent dimension names instead of restricting it to 'ydim' or 'xdim'
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.
hoss/coordinate_utilities.py
Outdated
@@ -86,16 +86,17 @@ def any_absent_dimension_variables(varinfo: VarInfoFromDmr, variable: str) -> bo | |||
def get_dimension_array_names( | |||
varinfo: VarInfoFromDmr, | |||
variable_name: str, | |||
) -> list[str]: | |||
) -> dict[str:str]: | |||
""" | |||
Returns the dimensions names from coordinate variables or from | |||
configuration |
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.
Returns the dimension names from coordinate variables or from configuration. VarInfo implements pulling dimension names from configuration, which is used for some collections with anonymous dimensions
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.
updated - e838e46
Description
SMAP L3 has a few 3d variables that have a dimension order (y,x,z) which is different from the nominal (z,y,x) order.
The hoss_config.json has been updated to provide this information. Functions added and updated to read this
information and use that to identify the dimension names and order and do the right index ranges for spatial subsetting
through HOSS
Jira Issue ID
DAS-2300
Local Test Steps
http://localhost:3000/C1268452378-EEDTEST/ogc-api-coverages/1.0.0/collections/parameter_vars/coverage/rangeset?forceAsync=true&granuleId=G1268452388-EEDTEST&subset=lat(54%3A72)&subset=lon(2%3A42)&format=application%2Fx-netcdf4&variable=Soil_Moisture_Retrieval_Data_AM%2Flandcover_class&skipPreview=true
The workflow-ui log should show the right index ranges
variables_with_ranges: /Soil_Moisture_Retrieval_Data_AM/longitude[9:38][487:594], /Soil_Moisture_Retrieval_Data_AM/latitude[9:38][487:594],
/Soil_Moisture_Retrieval_Data_AM/landcover_class[9:38][487:594][]
http://localhost:3000/C1268452378-EEDTEST/ogc-api-coverages/1.0.0/collections/parameter_vars/coverage/rangeset?forceAsync=true&granuleId=G1268452388-EEDTEST&subset=lat(54%3A72)&subset=lon(2%3A42)&format=application%2Fx-netcdf4&variable=Soil_Moisture_Retrieval_Data_PM%2Flandcover_class_pm&skipPreview=true
variables_with_ranges: /Soil_Moisture_Retrieval_Data_PM/latitude_pm[9:38][487:594], /Soil_Moisture_Retrieval_Data_PM/longitude_pm[9:38][487:594],
/Soil_Moisture_Retrieval_Data_PM/landcover_class_pm[9:38][487:594][]
variables_with_ranges: /Soil_Moisture_Retrieval_Data_PM/longitude_pm[9:38][487:594], /Soil_Moisture_Retrieval_Data_PM/latitude_pm[9:38][487:594], /Soil_Moisture_Retrieval_Data_PM/landcover_class_pm[9:38][487:594][], /Soil_Moisture_Retrieval_Data_AM/albedo[9:38][487:594], /Soil_Moisture_Retrieval_Data_AM/latitude[9:38][487:594], /Soil_Moisture_Retrieval_Data_AM/longitude[9:38][487:594]
PR Acceptance Checklist
CHANGELOG.md
updated to include high level summary of PR changes.docker/service_version.txt
updated if publishing a release.