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

Update the offline domain checks to use a concave hull #215

Merged

Conversation

SamuelDegelia-NOAA
Copy link
Contributor

@SamuelDegelia-NOAA SamuelDegelia-NOAA commented Nov 1, 2024

This PR updates the offline domain checks to use a concave hull approach instead of a convex hull. This hull better matches the shape of the MPAS domain and thus can allow more observations through that are inside the domain. I still recommend using a small value of the hull_shrink_factor (0.5% worked for me) to avoid issues with observations located right on the domain boundary.

This updated version of the domain check takes about 15 seconds longer than the original version.

As mentioned by @delippi, the offline domain checks are meant as temporary solutions until the online domain check is fully functional. We are very close on that, but I want to go ahead and commit this update since it will be useful for validation of that online check.

Usage:

./offline_domain_check_satrad.py -g invariant.nc -o gdas.t00z.atms_all_npp.tm00.nc -s 0.005 -f

@SamuelDegelia-NOAA
Copy link
Contributor Author

SamuelDegelia-NOAA commented Nov 1, 2024

Figure of the updated offline domain check for AIRCAR observations:

Capture

ATMS radiances:

Capture

@ShunLiu-NOAA ShunLiu-NOAA self-requested a review November 3, 2024 19:54
@ShunLiu-NOAA
Copy link

The update looks good to me.

Copy link
Collaborator

@guoqing-noaa guoqing-noaa left a comment

Choose a reason for hiding this comment

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

LGTM.

Just one minor comment, we can make all .py scripts executable by adding the follwoing shebang:

#!/usr/bin/env python

@SamuelDegelia-NOAA
Copy link
Contributor Author

Thanks @guoqing-noaa! I think that shebang is already added to the top of these python scripts. But I'll update the usage example in the PR text.

@ShunLiu-NOAA ShunLiu-NOAA merged commit 15d2170 into NOAA-EMC:develop Nov 5, 2024
1 check passed
@HuiLiu-NOAA
Copy link
Collaborator

HuiLiu-NOAA commented Nov 5, 2024

Sorry for the delay. I just did a test, and got 2 problems with my ZTD bufr2ioda file:

  1. It seems need to add the next line after line 225 ( as Donnie commented last week) to use the ZTD input data with longitude range (-180, 180):
    obs_lon = np.where(obs_lon < 0, obs_lon + 360, obs_lon)

  2. The variable "Obs_Error" got missing values in the output file for some reason.

The complete test results are in : /scratch1/NCEPDEV/fv3-cam/Hui.Liu/domain_check. Thanks for help checking these in advance.

@SamuelDegelia-NOAA
Copy link
Contributor Author

SamuelDegelia-NOAA commented Nov 5, 2024

@HuiLiu-NOAA thanks for reviewing the PR and catching the longitude issue. I have that line in offline_domain_check_satrad.py but it is missing from offline_domain_check.py. I'll make a hotfix for that once we also have #⁠2 solved.

Speaking of - do you happen to have the ZTD data saved on any other machine? Hera is down today so I cannot investigate #⁠2 right now.

@HuiLiu-NOAA
Copy link
Collaborator

Thanks @SamuelDegelia-NOAA. We can wait for Hera back.

@HuiLiu-NOAA
Copy link
Collaborator

HuiLiu-NOAA commented Nov 7, 2024

@SamuelDegelia-NOAA :
I figured out the reason for the problem #2. It seems due to the "zenithTotalDelay:valid_range = 0.f, 0.f" in the original file.
I reset the zenithTotalDelay:valid_range = 0.f, 0.01f, and the missing values disappeared. Sorry for the confusion and thanks for your help.

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.

5 participants