[Met_help] [rt.rap.ucar.edu #86320] History for Problem Degribbing

John Halley Gotway via RT met_help at ucar.edu
Tue Jul 9 12:07:35 MDT 2019


----------------------------------------------------------------
  Initial Request
----------------------------------------------------------------

John, I have two files I sent to you on AMERDEC.  I am able to degrib the one that has GLOBAL in its filename but can't degrib the one that has AFGHANISTAN in its file name.  Checking the headers, the files seem to have identical grib2 record names and codes.  Below is the error that I get.

/h/WXQC/met-6.1/bin/plot_data_plane /h/data/global/FSMT/data/GALWEM/RD/output/afghanistan_1p5km/PS.557WW_SC.U_DI.C_GP.GALWEM-RD_GR.C1P5KM_AR.AFGHANISTAN_DD.20180101_CY.00_FH.012_DF.GR2 /home/qcteam/imgout 'name="APCP"; level="A03";' -v 5

DEBUG 1: Reading user-defined grib1 MET_GRIB_TABLES file: /h/data/global/WXQC/data/met/config/grib2/grib1_af_131_57.txt
DEBUG 1: Reading user-defined grib2 MET_GRIB_TABLES file: /h/data/global/WXQC/data/met/config/grib2/grib2_geps.txt
DEBUG 1: Opening data file: /h/data/global/FSMT/data/GALWEM/RD/output/afghanistan_1p5km/PS.557WW_SC.U_DI.C_GP.GALWEM-RD_GR.C1P5KM_AR.AFGHANISTAN_DD.20180101_CY.00_FH.012_DF.GR2
DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new Met2dDataFile object of type "FileType_Gb2".
DEBUG 4: Switching the GRIB2 radius of the earth value of 6367.47 km to 6371.2 km for internal consistency.
ERROR  :
ERROR  : MetGrib2DataFile::read_grib2_grid() -> found unrecognized grid definition (1)
ERROR  :

What does the 1 in the "found unrecognized grid defintiation (1)" mean?

Thanks
Bob



----------------------------------------------------------------
  Complete Ticket History
----------------------------------------------------------------

Subject: Problem Degribbing
From: John Halley Gotway
Time: Wed Jul 25 10:27:47 2018

Hi Bob,

Thanks for sending the sample data files.  I was able to grab them
from
ARMDEC and reproduce the behavior you've found.

Yes, you've hit the nail on the head.  MET does not currently support
rotated projections.

I spoke with Randy Bullock this morning about this issue.  He's our
resident expert on grid projections.  He has some plans for how to
handle
rotated grids in general, not just rotated lat/lon.  We decided to
create a
development ticket for this issue and add it to our list of tasks.
However, we still need to coordinate with project management to figure
out
if/how to pay for this development work.  For that reason, I can't
make any
promises as

I'll save off your sample files to use during testing.

But for the time being you're stuck since MET isn't able to handle
this
projection.  One option would be using the wgrib2 utility to regrid
this
data from rotated lat/lon to the Global lat/lon grid instead, as
described
here:
   http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/new_grid.html

Unfortunately, though, the default version of wgrib2 on my system is
2.0.3
and trying to regrid rotated lat/lon data results in this error:
*** FATAL ERROR: mk_kgds: unsupported input grid code table 3.1=1 ***

According to that website, support for rotated lat/lon grids was added
in
version 2.0.8 of wgrib2.  If you happen to have that newer version
available, you could try this regridding step...

Here's the target global projection:
        lat-lon grid:(1536 x 1152) units 1e-06 input WE:SN output
WE:SN res
48
        lat -89.921875 to 89.921875 by 0.156250
        lon 0.117187 to 359.882812 by 0.234375 #points=1769472

And here's how you format the -new_grid option for lat/lon grids:
   -new_grid latlon lon0:nlon:dlon lat0:nlat:dlat

And so you'd run:
wgrib2
PS.557WW_SC.U_DI.C_GP.GALWEM-
RD_GR.C1P5KM_AR.AFGHANISTAN_DD.20180101_CY.00_FH.012_DF.GR2
\
   -new_grid latlon 0.117187:1536:0.234375 -89.921875:1152:0.156250
regrid.grib2

Thanks,
John Halley Gotway





On Mon, Jul 23, 2018 at 4:08 PM robert.craig.2 at us.af.mil via RT <
met_help at ucar.edu> wrote:

>
> Mon Jul 23 16:04:52 2018: Request 86320 was acted upon.
> Transaction: Ticket created by robert.craig.2 at us.af.mil
>        Queue: met_help
>      Subject: Problem Degribbing
>        Owner: Nobody
>   Requestors: robert.craig.2 at us.af.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86320 >
>
>
> John, I have two files I sent to you on AMERDEC.  I am able to
degrib the
> one that has GLOBAL in its filename but can't degrib the one that
has
> AFGHANISTAN in its file name.  Checking the headers, the files seem
to have
> identical grib2 record names and codes.  Below is the error that I
get.
>
> /h/WXQC/met-6.1/bin/plot_data_plane
>
/h/data/global/FSMT/data/GALWEM/RD/output/afghanistan_1p5km/PS.557WW_SC.U_DI.C_GP.GALWEM-
RD_GR.C1P5KM_AR.AFGHANISTAN_DD.20180101_CY.00_FH.012_DF.GR2
> /home/qcteam/imgout 'name="APCP"; level="A03";' -v 5
>
> DEBUG 1: Reading user-defined grib1 MET_GRIB_TABLES file:
> /h/data/global/WXQC/data/met/config/grib2/grib1_af_131_57.txt
> DEBUG 1: Reading user-defined grib2 MET_GRIB_TABLES file:
> /h/data/global/WXQC/data/met/config/grib2/grib2_geps.txt
> DEBUG 1: Opening data file:
>
/h/data/global/FSMT/data/GALWEM/RD/output/afghanistan_1p5km/PS.557WW_SC.U_DI.C_GP.GALWEM-
RD_GR.C1P5KM_AR.AFGHANISTAN_DD.20180101_CY.00_FH.012_DF.GR2
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
> Met2dDataFile object of type "FileType_Gb2".
> DEBUG 4: Switching the GRIB2 radius of the earth value of 6367.47 km
to
> 6371.2 km for internal consistency.
> ERROR  :
> ERROR  : MetGrib2DataFile::read_grib2_grid() -> found unrecognized
grid
> definition (1)
> ERROR  :
>
> What does the 1 in the "found unrecognized grid defintiation (1)"
mean?
>
> Thanks
> Bob
>
>
>

------------------------------------------------
Subject: RE: [Non-DoD Source] Re: [rt.rap.ucar.edu #86320] Problem Degribbing
From: robert.craig.2 at us.af.mil
Time: Wed Jul 25 11:02:16 2018

Thanks John, The rotated grid is a MET Office thing, so by adding it
you not only support us but you would support them.  We also seem to
have the older version of WGRIB but I will see how hard it would be to
the updated version.

Bob

-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Wednesday, July 25, 2018 11:28 AM
To: CRAIG, ROBERT J GS-12 USAF ACC 16 WS/WXN
<robert.craig.2 at us.af.mil>
Subject: [Non-DoD Source] Re: [rt.rap.ucar.edu #86320] Problem
Degribbing

Hi Bob,

Thanks for sending the sample data files.  I was able to grab them
from ARMDEC and reproduce the behavior you've found.

Yes, you've hit the nail on the head.  MET does not currently support
rotated projections.

I spoke with Randy Bullock this morning about this issue.  He's our
resident expert on grid projections.  He has some plans for how to
handle rotated grids in general, not just rotated lat/lon.  We decided
to create a development ticket for this issue and add it to our list
of tasks.
However, we still need to coordinate with project management to figure
out if/how to pay for this development work.  For that reason, I can't
make any promises as

I'll save off your sample files to use during testing.

But for the time being you're stuck since MET isn't able to handle
this projection.  One option would be using the wgrib2 utility to
regrid this data from rotated lat/lon to the Global lat/lon grid
instead, as described
here:
   http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/new_grid.html

Unfortunately, though, the default version of wgrib2 on my system is
2.0.3 and trying to regrid rotated lat/lon data results in this error:
*** FATAL ERROR: mk_kgds: unsupported input grid code table 3.1=1 ***

According to that website, support for rotated lat/lon grids was added
in version 2.0.8 of wgrib2.  If you happen to have that newer version
available, you could try this regridding step...

Here's the target global projection:
        lat-lon grid:(1536 x 1152) units 1e-06 input WE:SN output
WE:SN res
48
        lat -89.921875 to 89.921875 by 0.156250
        lon 0.117187 to 359.882812 by 0.234375 #points=1769472

And here's how you format the -new_grid option for lat/lon grids:
   -new_grid latlon lon0:nlon:dlon lat0:nlat:dlat

And so you'd run:
wgrib2
PS.557WW_SC.U_DI.C_GP.GALWEM-
RD_GR.C1P5KM_AR.AFGHANISTAN_DD.20180101_CY.00_FH.012_DF.GR2
\
   -new_grid latlon 0.117187:1536:0.234375 -89.921875:1152:0.156250
regrid.grib2

Thanks,
John Halley Gotway





On Mon, Jul 23, 2018 at 4:08 PM robert.craig.2 at us.af.mil via RT <
met_help at ucar.edu> wrote:

>
> Mon Jul 23 16:04:52 2018: Request 86320 was acted upon.
> Transaction: Ticket created by robert.craig.2 at us.af.mil
>        Queue: met_help
>      Subject: Problem Degribbing
>        Owner: Nobody
>   Requestors: robert.craig.2 at us.af.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=86320
> >
>
>
> John, I have two files I sent to you on AMERDEC.  I am able to
degrib
> the one that has GLOBAL in its filename but can't degrib the one
that
> has AFGHANISTAN in its file name.  Checking the headers, the files
> seem to have identical grib2 record names and codes.  Below is the
error that I get.
>
> /h/WXQC/met-6.1/bin/plot_data_plane
>
/h/data/global/FSMT/data/GALWEM/RD/output/afghanistan_1p5km/PS.557WW_S
> C.U_DI.C_GP.GALWEM-
RD_GR.C1P5KM_AR.AFGHANISTAN_DD.20180101_CY.00_FH.01
> 2_DF.GR2 /home/qcteam/imgout 'name="APCP"; level="A03";' -v 5
>
> DEBUG 1: Reading user-defined grib1 MET_GRIB_TABLES file:
> /h/data/global/WXQC/data/met/config/grib2/grib1_af_131_57.txt
> DEBUG 1: Reading user-defined grib2 MET_GRIB_TABLES file:
> /h/data/global/WXQC/data/met/config/grib2/grib2_geps.txt
> DEBUG 1: Opening data file:
>
/h/data/global/FSMT/data/GALWEM/RD/output/afghanistan_1p5km/PS.557WW_S
> C.U_DI.C_GP.GALWEM-
RD_GR.C1P5KM_AR.AFGHANISTAN_DD.20180101_CY.00_FH.01
> 2_DF.GR2 DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() ->
> created new Met2dDataFile object of type "FileType_Gb2".
> DEBUG 4: Switching the GRIB2 radius of the earth value of 6367.47 km
> to
> 6371.2 km for internal consistency.
> ERROR  :
> ERROR  : MetGrib2DataFile::read_grib2_grid() -> found unrecognized
> grid definition (1) ERROR  :
>
> What does the 1 in the "found unrecognized grid defintiation (1)"
mean?
>
> Thanks
> Bob
>
>
>



------------------------------------------------


More information about the Met_help mailing list