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

prevent xarray from changing variable types on open_dataset #254

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

ank1m
Copy link
Collaborator

@ank1m ank1m commented Nov 27, 2024

GitHub Issue: 253

Description

Stitchee is inadvertently changing the data type for the main_data_quality_flag variable in TEMPO data, from int16 to float32. This impacts the SAMBAH service chain for certain edge cases (multi-file scans combining with single-file scans), because CONCISE raises an error when it encounters differing data types for the same variable.

Local test steps

Checked product/main_data_quality_flag in the output using standalone stitchee and in local Harmony environment before and after adding mask_and_scale parameter in the xarray.open_dataset function:

Type in the original granule Type in the stitched file Harmony request status
Before mask_and_scale int16 float Failure on CONCISE step
After mask_and_scale int16 int16 Success

Overview of integration done

  • Deployed stitchee in local Harmony environment
  • Performed previous egde-case requests without failures

PR Acceptance Checklist

  • Unit tests added/updated and passing.
  • Integration testing
  • CHANGELOG.md updated
  • Documentation updated (if needed).

📚 Documentation preview 📚: https://stitchee--254.org.readthedocs.build/en/254/

@ank1m ank1m mentioned this pull request Nov 27, 2024
@danielfromearth
Copy link
Collaborator

pre-commit.ci autofix

@danielfromearth danielfromearth linked an issue Nov 27, 2024 that may be closed by this pull request
@danielfromearth danielfromearth added the bug Something isn't working label Nov 27, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.42%. Comparing base (fab4ad8) to head (1f52006).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #254      +/-   ##
===========================================
+ Coverage    88.11%   88.42%   +0.30%     
===========================================
  Files           11       11              
  Lines          648      648              
===========================================
+ Hits           571      573       +2     
+ Misses          77       75       -2     
Flag Coverage Δ
integration 44.90% <ø> (ø)
unittests 85.95% <ø> (+0.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danielfromearth danielfromearth merged commit 81c3bcc into develop Nov 27, 2024
6 checks passed
@danielfromearth danielfromearth deleted the feature/issue-253-type-casting branch November 29, 2024 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inadvertent type change
3 participants