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

fix cygnss quality flag #1600

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

BenjaminRuston
Copy link
Collaborator

Description

This corrects the get_normalized_bit function in the CyGNSS ingest

Issue(s) addressed

Resolves #1599

Impact

Correct interpretation of quality bits

Checklist

  • I have performed a self-review of my own code
  • I have run the unit tests before creating the PR

@BenjaminRuston BenjaminRuston added the OBS OBS processing, UFO label Jan 18, 2025
@BenjaminRuston
Copy link
Collaborator Author

think this fixes it... should also check the ascending / descending bit

@BenjaminRuston
Copy link
Collaborator Author

this will also apply to this, and now is a good time to put get_normalized_bit into a utility (https://github.com/JCSDA-internal/ioda-converters/blob/develop/src/pyiodaconv/def_jedi_utils.py):

return (value >> bit_index) & 1

@BenjaminRuston
Copy link
Collaborator Author

and in the tropics converter I tested the ascending descending flag....

believe this PR introduces the correct method and is what should be used... should confirm this method with the tropics converter too

@BenjaminRuston
Copy link
Collaborator Author

here's the new figure with quality flag applied:
image

and it's subtle,,, but the counts, min/max and stdv all show improvements in the figure above here's without or no QC bit applied:
image

@BenjaminRuston
Copy link
Collaborator Author

tested this change with tropics converter too. because it's an array can't wrap the passed in value with int(value) but using it as written and with the == 1 at the end produced the correct land_flag behavior and asc/des behavior:
land flag (mislabeled):
image

and asc/dsc:
image

@BenjaminRuston
Copy link
Collaborator Author

think this whole PR is a nothing burger.... just pulled the CyGNSS data from r2d2 for first 5 days in May and the high wind speeds are already screened here's the figures for data previously converted and newly converted and they are identical:
image

Copy link
Contributor

@fabiolrdiniz fabiolrdiniz left a comment

Choose a reason for hiding this comment

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

Thanks, @BenjaminRuston!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OBS OBS processing, UFO
Projects
None yet
Development

Successfully merging this pull request may close these issues.

correct interpretation of quality flag in CYGNSS data
2 participants