Skip to content

Conversation

flamingbear
Copy link
Member

Description

A short description of the changes in this PR.

Update Xarray and adds h5netcdf dependency to prevent dimensions from being written into
child nodes during writing of the output metadata file.

Jira Issue ID

DAS-2411

Local Test Steps

Pull this branch. Build and verify all tests pass. Deploy the image to your local Harmony-In-A-Box.

Run this curl command against uat and localhost to generate the file against the current implementation (uat) and the updated (localhost)

curl -Ln -bj 'http://localhost:3000/C1263085200-NSIDC_CUAT/ogc-api-coverages/1.0.0/collections/parameter_vars/coverage/rangeset?granuleId=G1263085428-NSIDC_CUAT&subset=lat(25.0%3A49.8)&subset=lon(-127.0%3A-65.0)&variable=EASE2_global_projection&variable=GEO%2Flatitude&variable=GEO%2Flongitude&variable=NEE%2Fnee_mean&variable=RH%2Frh_mean&variable=x&variable=y&serviceId=S1273752002-EEDTEST' -o spl4cmdl-localhost.nc4

and

curl -Ln -bj 'http://harmony.uat.earthdata.nasa.gov/C1263085200-NSIDC_CUAT/ogc-api-coverages/1.0.0/collections/parameter_vars/coverage/rangeset?granuleId=G1263085428-NSIDC_CUAT&subset=lat(25.0%3A49.8)&subset=lon(-127.0%3A-65.0)&variable=EASE2_global_projection&variable=GEO%2Flatitude&variable=GEO%2Flongitude&variable=NEE%2Fnee_mean&variable=RH%2Frh_mean&variable=x&variable=y&serviceId=S1273752002-EEDTEST' -o spl4cmdl-uat.nc4

Open the files and verify that the localhost variables are plotable in panoply but the uat's are not.

PR Acceptance Checklist

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

netCDF4 ~= 1.6.5
xarray ~= 2025.1.2
xarray == 2025.8.0
h5netcdf == 1.6.4

Choose a reason for hiding this comment

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

By adding h5netcdf == 1.6.4 is the below PR for DAS-2411 write_inherited_coords=True still valid/needed?

datatree.to_netcdf(output_file_name, write_inherited_coords=True)

Copy link
Member Author

@flamingbear flamingbear Sep 2, 2025

Choose a reason for hiding this comment

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

Nope. That's the beauty, the bug was fixed in xarray 2025.8.0, but a regression requires us to use h5netcdf to write the output. You can examine the output file, not only does it work with panoply, there are no extra dimensions on the group.

@vutrannasa
Copy link

Test: PASS
Env: localhost

Test Steps:

  • Pull DAS-2411 branch
  • Ran command against localhost:
curl` -Ln -bj 'http://localhost:3000/C1263085200-NSIDC_CUAT/ogc-api-coverages/1.0.0/collections/parameter_vars/coverage/rangeset?granuleId=G1263085428-NSIDC_CUAT&subset=lat(25.0%3A49.8)&subset=lon(-127.0%3A-65.0)&variable=EASE2_global_projection&variable=GEO%2Flatitude&variable=GEO%2Flongitude&variable=NEE%2Fnee_mean&variable=RH%2Frh_mean&variable=x&variable=y&serviceId=S1273752002-EEDTEST' -o spl4cmdl-localhost.nc4
  • Verify Panaploy able to view localhost (DAS-2411)
Screenshot 2025-09-02 at 1 15 26 PM
  • Ran curl command against UAT:
curl -Ln -bj 'http://harmony.uat.earthdata.nasa.gov/C1263085200-NSIDC_CUAT/ogc-api-coverages/1.0.0/collections/parameter_vars/coverage/rangeset?granuleId=G1263085428-NSIDC_CUAT&subset=lat(25.0%3A49.8)&subset=lon(-127.0%3A-65.0)&variable=EASE2_global_projection&variable=GEO%2Flatitude&variable=GEO%2Flongitude&variable=NEE%2Fnee_mean&variable=RH%2Frh_mean&variable=x&variable=y&serviceId=S1273752002-EEDTEST' -o spl4cmdl-uat.nc4
  • Verify Panaploy NOT able to view UAT request
Screenshot 2025-09-02 at 1 16 03 PM

@flamingbear flamingbear merged commit f716452 into main Sep 2, 2025
4 checks passed
@flamingbear flamingbear deleted the mhs/DAS-2411/update-xarray-and-deps branch September 2, 2025 21:01
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.

2 participants