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

dcgrib2 conversion of NAM 212 grib1 analysis file results in GDATTIM not having F000 #16

Closed
akrherz opened this issue Jun 2, 2017 · 2 comments

Comments

Projects
None yet
1 participant
@akrherz
Copy link
Contributor

commented Jun 2, 2017

Writing up a discussion Michael James and myself had offlist.

Here's an example Grib1 file from the NAM 212 Grid and the associated LDM product name with it

HDS 8019281  YHRA77 KWBE 011200 /mNAM_84 !grib/ncep/NAM_84/#212/201706011200/F000/HGT/775 mb/

The issue is that when this grib file is run through dcgrib2, it results in a GEMPAK grid file entry that has 170601/1200 as the GDATTIM instead of 170601/1200F000. The question is why :) This issue appears to have started with the NAM upgrade done in March 2017. I've been digging at this, but haven't had luck yet.

@akrherz

This comment has been minimized.

Copy link
Contributor Author

commented Jun 2, 2017

This diff fixed it for me, but perhaps too big a hammer :/

$ git diff gempak/source/griblib/gb/gbftim.c
diff --git a/gempak/source/griblib/gb/gbftim.c b/gempak/source/griblib/gb/gbftim.c
index 020fff0..934fddd 100644
--- a/gempak/source/griblib/gb/gbftim.c
+++ b/gempak/source/griblib/gb/gbftim.c
@@ -74,6 +74,7 @@ void gb_ftim ( int *itime, int *iaccm, int *iret )
                    if  ( ( pds.center == 57 && pds.process == 10 ) ||
                          ( pds.center == 54 && pds.process == 71 ) ||
                          ( pds.center == 78 ) ||
+                         ( pds.center == 7 ) ||
                          ( pds.center == 146 ) ||
                          ( pds.center == 43 ) ||
                          ( pds.center == 46 ) )  {
@akrherz

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2017

A smaller hammer would be to include the process ID in the check, but perhaps this is not aggressive enough then :(

diff --git a/gempak/source/griblib/gb/gbftim.c b/gempak/source/griblib/gb/gbftim.c
index 020fff0..8c3e79c 100644
--- a/gempak/source/griblib/gb/gbftim.c
+++ b/gempak/source/griblib/gb/gbftim.c
@@ -73,6 +73,7 @@ void gb_ftim ( int *itime, int *iaccm, int *iret )
                     */
                    if  ( ( pds.center == 57 && pds.process == 10 ) ||
                          ( pds.center == 54 && pds.process == 71 ) ||
+                         ( pds.center == 7 && pds.process == 84) ||
                          ( pds.center == 78 ) ||
                          ( pds.center == 146 ) ||
                          ( pds.center == 43 ) ||
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.