Skip to content
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

Merged
merged 5 commits into from
Feb 18, 2025

Conversation

sudha-murthy
Copy link
Contributor

@sudha-murthy sudha-murthy commented Feb 13, 2025

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

  • Fetch the branch and run Harmony in a box for local build and testing.
  • for harmony-opendap-subsetter bin/build-image, bin/build-test, bin/run-test
  • Unit tests should pass
  • The following urls should work successfully and provide the right spatial subset output
  1. 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][]

  2. 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][]

  1. 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&variable=Soil_Moisture_Retrieval_Data_AM%2Falbedo&skipPreview=true
    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

  • Jira ticket acceptance criteria met.
  • [ X] CHANGELOG.md updated to include high level summary of PR changes.
  • [ X] docker/service_version.txt updated if publishing a release.
  • [X ] Tests added/updated and passing.
  • Documentation updated (if needed).

Copy link
Contributor Author

@sudha-murthy sudha-murthy left a 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'

@sudha-murthy sudha-murthy requested review from D-Auty and a team February 13, 2025 15:31
Copy link
Contributor

@vutrannasa vutrannasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test: PASS

Followed instructions in PR and HOSS portion PASS

Found issue with Maskfill failing (See attachment), Sudha created DAS-2316 to address Maskfill

Screenshot 2025-02-14 at 6 02 17 AM

@@ -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
Copy link

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated - e838e46

@sudha-murthy sudha-murthy merged commit c327bf6 into main Feb 18, 2025
4 checks passed
@sudha-murthy sudha-murthy deleted the DAS-2300 branch February 18, 2025 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants