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

add switch for two different init_grib2 approaches for non-E arakawa grids #241

Merged

Conversation

AlexanderRichert-NOAA
Copy link
Contributor

@AlexanderRichert-NOAA AlexanderRichert-NOAA commented May 20, 2024

My solution for conflicting approaches to deriving the non-E arakawa grids is to include both. wgrib2 and ncep_post (incl. NAM) agree on one definition, which is different from what's in NCEPLIBS-ip currently. With this PR, the user calls use_ncep_post_arakawa() (which can be called from C, defined as void use_ncep_post_arakawa(void) and called as use_ncep_post_arakawa()) to use the wgrib2/ncep_post derivation. The default behavior is to use the current code, so any users of the current definition should be unaffected. This option is only used when gdtn=32769, and can be re-disabled with unuse_ncep_post_arakawa().

Fixes #238

@AlexanderRichert-NOAA AlexanderRichert-NOAA marked this pull request as ready for review May 20, 2024 23:21
@AlexanderRichert-NOAA AlexanderRichert-NOAA changed the base branch from arakawa_grib2_fix to develop May 20, 2024 23:21
@AlexanderRichert-NOAA AlexanderRichert-NOAA marked this pull request as draft May 20, 2024 23:22
@AlexanderRichert-NOAA AlexanderRichert-NOAA marked this pull request as ready for review May 21, 2024 03:32
@AlexanderRichert-NOAA AlexanderRichert-NOAA marked this pull request as draft May 21, 2024 03:32
@AlexanderRichert-NOAA AlexanderRichert-NOAA marked this pull request as ready for review May 21, 2024 19:19
@AlexanderRichert-NOAA
Copy link
Contributor Author

@webisu please try out my branch at https://github.com/AlexanderRichert-NOAA/NCEPLIBS-ip/tree/arakawa_grib2_fix and see if it works. It requires changes to wgrib2: in wgrib.h, add void use_ncep_post_arakawa(void);, then in New_grid.c, add use_ncep_post_arakawa(); at any point before the first ipolate?_grib2_single_field() calls.

@AlexanderRichert-NOAA
Copy link
Contributor Author

@edwardhartnett this code is confirmed working by @webisu. Please review this PR and also #245, then next stop, Releaseville.

@AlexanderRichert-NOAA AlexanderRichert-NOAA merged commit 88fea9b into NOAA-EMC:develop Jul 18, 2024
19 checks passed
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.

fix support for rotated lat/lon in ip2 code to support wgrib2
2 participants