[Met_help] [rt.rap.ucar.edu #78720] History for Fw: pcp_combine does not work properly with lat-lon grid data

John Halley Gotway via RT met_help at ucar.edu
Fri Dec 2 09:16:07 MST 2016


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



          Any suggestions?  Thanks!

Kefeng





kefeng at nju.edu.cn

From: kefeng at nju.edu.cn
Date: 2016-11-15 12:55
To: met_help
Subject: pcp_combine does not work properly with lat-lon grid data
Dear Sir:


          I have recently use pcp_combine to generate no projection "lat-lon" gridded precipitation. The program ended with no error but i found the latitude information is not right.




          Here is the step:


         I use the "cnvgrib" convert the GFS grib 2 format to grib 1. 
         Then, i use "copygb" to get the data from the region 25~37N, 112~125N. 
         Finally, i used pcp_combine. When the latitude information  is  right in grib format ( see attached file. i use other software, like ncl or EC gribapi checked the value). The latitude after pcp_combine is wrong. The latitude is from 37~49N. 


         Attached is a simple grib file. You can use this data to test. Here is the information dumped from grib_dump.  
  
       latitudeOfFirstGridPointInDegrees = 25;
        longitudeOfFirstGridPointInDegrees = 112;
       earthIsOblate = 0;
      uvRelativeToGrid = 0;
      latitudeOfLastGridPointInDegrees = 37;
      longitudeOfLastGridPointInDegrees = 125;


      I tested v5.0 and v5.1. Both have the same problem. 


      Thanks! 


            


          




Kefeng





kefeng at nju.edu.cn

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

Subject: Fw: pcp_combine does not work properly with lat-lon grid data
From: John Halley Gotway
Time: Fri Nov 18 10:19:43 2016

Hello Kefeng,

I see that you're having trouble with the range of lat/lon values when
processing data through MET.

I see in your email that you are referencing some attachments... but I
don't see them.

Can you please send that data to me as well as the exactly the
commands
you've run.  I'll run them here to replicate the behavior you describe
and
hopefully that'll help me answer your question.

Thanks,
John Halley Gotway


On Thu, Nov 17, 2016 at 11:33 PM, kefeng at nju.edu.cn via RT <
met_help at ucar.edu> wrote:

>
> Thu Nov 17 23:33:50 2016: Request 78720 was acted upon.
> Transaction: Ticket created by kefeng at nju.edu.cn
>        Queue: met_help
>      Subject: Fw: pcp_combine does not work properly with lat-lon
grid data
>        Owner: Nobody
>   Requestors: kefeng at nju.edu.cn
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720 >
>
>
>
>
>           Any suggestions?  Thanks!
>
> Kefeng
>
>
>
>
>
> kefeng at nju.edu.cn
>
> From: kefeng at nju.edu.cn
> Date: 2016-11-15 12:55
> To: met_help
> Subject: pcp_combine does not work properly with lat-lon grid data
> Dear Sir:
>
>
>           I have recently use pcp_combine to generate no projection
> "lat-lon" gridded precipitation. The program ended with no error but
i
> found the latitude information is not right.
>
>
>
>
>           Here is the step:
>
>
>          I use the "cnvgrib" convert the GFS grib 2 format to grib
1.
>          Then, i use "copygb" to get the data from the region
25~37N,
> 112~125N.
>          Finally, i used pcp_combine. When the latitude information
is
> right in grib format ( see attached file. i use other software, like
ncl or
> EC gribapi checked the value). The latitude after pcp_combine is
wrong. The
> latitude is from 37~49N.
>
>
>          Attached is a simple grib file. You can use this data to
test.
> Here is the information dumped from grib_dump.
>
>        latitudeOfFirstGridPointInDegrees = 25;
>         longitudeOfFirstGridPointInDegrees = 112;
>        earthIsOblate = 0;
>       uvRelativeToGrid = 0;
>       latitudeOfLastGridPointInDegrees = 37;
>       longitudeOfLastGridPointInDegrees = 125;
>
>
>       I tested v5.0 and v5.1. Both have the same problem.
>
>
>       Thanks!
>
>
>
>
>
>
>
>
>
>
> Kefeng
>
>
>
>
>
> kefeng at nju.edu.cn
>

------------------------------------------------
Subject: Fw: pcp_combine does not work properly with lat-lon grid data
From: kefeng at nju.edu.cn
Time: Fri Nov 18 18:26:26 2016

Dear John:

Here is the step i used to get the accumulated rain.  I will send the
data in the next email in case you can not receive it.

grib_copy -w shortName=tp gfs.2016102000f06 gfsrain06.grb

$cnvgribdir/cnvgrib -g21 gfsrain06.grb gfsrain06.grb1

$UPP_DIR/bin/copygb.exe -g"255 0 131 121 25000 112000 128 37000 125000
100 100 0 64" -x gfsrain06.grb1 2016102000f06.grb1

${MET_DIR}/bin/pcp_combine -add 2016102000f06.grb1 6 rainf06.nc

Thanks!

Kefeng



kefeng at nju.edu.cn

From: John Halley Gotway via RT
Date: 2016-11-19 01:19
To: kefeng
Subject: Re: [rt.rap.ucar.edu #78720] Fw: pcp_combine does not work
properly with lat-lon grid data
Hello Kefeng,

I see that you're having trouble with the range of lat/lon values when
processing data through MET.

I see in your email that you are referencing some attachments... but I
don't see them.

Can you please send that data to me as well as the exactly the
commands
you've run.  I'll run them here to replicate the behavior you describe
and
hopefully that'll help me answer your question.

Thanks,
John Halley Gotway


On Thu, Nov 17, 2016 at 11:33 PM, kefeng at nju.edu.cn via RT <
met_help at ucar.edu> wrote:

>
> Thu Nov 17 23:33:50 2016: Request 78720 was acted upon.
> Transaction: Ticket created by kefeng at nju.edu.cn
>        Queue: met_help
>      Subject: Fw: pcp_combine does not work properly with lat-lon
grid data
>        Owner: Nobody
>   Requestors: kefeng at nju.edu.cn
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720 >
>
>
>
>
>           Any suggestions?  Thanks!
>
> Kefeng
>
>
>
>
>
> kefeng at nju.edu.cn
>
> From: kefeng at nju.edu.cn
> Date: 2016-11-15 12:55
> To: met_help
> Subject: pcp_combine does not work properly with lat-lon grid data
> Dear Sir:
>
>
>           I have recently use pcp_combine to generate no projection
> "lat-lon" gridded precipitation. The program ended with no error but
i
> found the latitude information is not right.
>
>
>
>
>           Here is the step:
>
>
>          I use the "cnvgrib" convert the GFS grib 2 format to grib
1.
>          Then, i use "copygb" to get the data from the region
25~37N,
> 112~125N.
>          Finally, i used pcp_combine. When the latitude information
is
> right in grib format ( see attached file. i use other software, like
ncl or
> EC gribapi checked the value). The latitude after pcp_combine is
wrong. The
> latitude is from 37~49N.
>
>
>          Attached is a simple grib file. You can use this data to
test.
> Here is the information dumped from grib_dump.
>
>        latitudeOfFirstGridPointInDegrees = 25;
>         longitudeOfFirstGridPointInDegrees = 112;
>        earthIsOblate = 0;
>       uvRelativeToGrid = 0;
>       latitudeOfLastGridPointInDegrees = 37;
>       longitudeOfLastGridPointInDegrees = 125;
>
>
>       I tested v5.0 and v5.1. Both have the same problem.
>
>
>       Thanks!
>
>
>
>
>
>
>
>
>
>
> Kefeng
>
>
>
>
>
> kefeng at nju.edu.cn
>

------------------------------------------------
Subject: Fw: pcp_combine does not work properly with lat-lon grid data
From: kefeng at nju.edu.cn
Time: Fri Nov 18 18:28:19 2016


            Here is the data. This is start from cnvgrib. The
grib_copy does not effect the result.

Kefeng



kefeng at nju.edu.cn

From: John Halley Gotway via RT
Date: 2016-11-19 01:19
To: kefeng
Subject: Re: [rt.rap.ucar.edu #78720] Fw: pcp_combine does not work
properly with lat-lon grid data
Hello Kefeng,

I see that you're having trouble with the range of lat/lon values when
processing data through MET.

I see in your email that you are referencing some attachments... but I
don't see them.

Can you please send that data to me as well as the exactly the
commands
you've run.  I'll run them here to replicate the behavior you describe
and
hopefully that'll help me answer your question.

Thanks,
John Halley Gotway


On Thu, Nov 17, 2016 at 11:33 PM, kefeng at nju.edu.cn via RT <
met_help at ucar.edu> wrote:

>
> Thu Nov 17 23:33:50 2016: Request 78720 was acted upon.
> Transaction: Ticket created by kefeng at nju.edu.cn
>        Queue: met_help
>      Subject: Fw: pcp_combine does not work properly with lat-lon
grid data
>        Owner: Nobody
>   Requestors: kefeng at nju.edu.cn
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720 >
>
>
>
>
>           Any suggestions?  Thanks!
>
> Kefeng
>
>
>
>
>
> kefeng at nju.edu.cn
>
> From: kefeng at nju.edu.cn
> Date: 2016-11-15 12:55
> To: met_help
> Subject: pcp_combine does not work properly with lat-lon grid data
> Dear Sir:
>
>
>           I have recently use pcp_combine to generate no projection
> "lat-lon" gridded precipitation. The program ended with no error but
i
> found the latitude information is not right.
>
>
>
>
>           Here is the step:
>
>
>          I use the "cnvgrib" convert the GFS grib 2 format to grib
1.
>          Then, i use "copygb" to get the data from the region
25~37N,
> 112~125N.
>          Finally, i used pcp_combine. When the latitude information
is
> right in grib format ( see attached file. i use other software, like
ncl or
> EC gribapi checked the value). The latitude after pcp_combine is
wrong. The
> latitude is from 37~49N.
>
>
>          Attached is a simple grib file. You can use this data to
test.
> Here is the information dumped from grib_dump.
>
>        latitudeOfFirstGridPointInDegrees = 25;
>         longitudeOfFirstGridPointInDegrees = 112;
>        earthIsOblate = 0;
>       uvRelativeToGrid = 0;
>       latitudeOfLastGridPointInDegrees = 37;
>       longitudeOfLastGridPointInDegrees = 125;
>
>
>       I tested v5.0 and v5.1. Both have the same problem.
>
>
>       Thanks!
>
>
>
>
>
>
>
>
>
>
> Kefeng
>
>
>
>
>
> kefeng at nju.edu.cn
>


------------------------------------------------
Subject: Fw: pcp_combine does not work properly with lat-lon grid data
From: Tara Jensen
Time: Mon Nov 21 17:32:37 2016

Kefeng,

Much of our helpdesk staff is out this week due to the Thanksgiving
holiday.  John is one of the staff who is out.  I will try to take a
look
at this tomorrow but a resolution may have to wait until John returns
on 28
Nov.

Thanks,
Tara Jensen

On Fri, Nov 18, 2016 at 6:28 PM, kefeng at nju.edu.cn via RT
<met_help at ucar.edu
> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720 >
>
>
>             Here is the data. This is start from cnvgrib. The
grib_copy
> does not effect the result.
>
> Kefeng
>
>
>
> kefeng at nju.edu.cn
>
> From: John Halley Gotway via RT
> Date: 2016-11-19 01:19
> To: kefeng
> Subject: Re: [rt.rap.ucar.edu #78720] Fw: pcp_combine does not work
> properly with lat-lon grid data
> Hello Kefeng,
>
> I see that you're having trouble with the range of lat/lon values
when
> processing data through MET.
>
> I see in your email that you are referencing some attachments... but
I
> don't see them.
>
> Can you please send that data to me as well as the exactly the
commands
> you've run.  I'll run them here to replicate the behavior you
describe and
> hopefully that'll help me answer your question.
>
> Thanks,
> John Halley Gotway
>
>
> On Thu, Nov 17, 2016 at 11:33 PM, kefeng at nju.edu.cn via RT <
> met_help at ucar.edu> wrote:
>
> >
> > Thu Nov 17 23:33:50 2016: Request 78720 was acted upon.
> > Transaction: Ticket created by kefeng at nju.edu.cn
> >        Queue: met_help
> >      Subject: Fw: pcp_combine does not work properly with lat-lon
grid
> data
> >        Owner: Nobody
> >   Requestors: kefeng at nju.edu.cn
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720 >
> >
> >
> >
> >
> >           Any suggestions?  Thanks!
> >
> > Kefeng
> >
> >
> >
> >
> >
> > kefeng at nju.edu.cn
> >
> > From: kefeng at nju.edu.cn
> > Date: 2016-11-15 12:55
> > To: met_help
> > Subject: pcp_combine does not work properly with lat-lon grid data
> > Dear Sir:
> >
> >
> >           I have recently use pcp_combine to generate no
projection
> > "lat-lon" gridded precipitation. The program ended with no error
but i
> > found the latitude information is not right.
> >
> >
> >
> >
> >           Here is the step:
> >
> >
> >          I use the "cnvgrib" convert the GFS grib 2 format to grib
1.
> >          Then, i use "copygb" to get the data from the region
25~37N,
> > 112~125N.
> >          Finally, i used pcp_combine. When the latitude
information  is
> > right in grib format ( see attached file. i use other software,
like ncl
> or
> > EC gribapi checked the value). The latitude after pcp_combine is
wrong.
> The
> > latitude is from 37~49N.
> >
> >
> >          Attached is a simple grib file. You can use this data to
test.
> > Here is the information dumped from grib_dump.
> >
> >        latitudeOfFirstGridPointInDegrees = 25;
> >         longitudeOfFirstGridPointInDegrees = 112;
> >        earthIsOblate = 0;
> >       uvRelativeToGrid = 0;
> >       latitudeOfLastGridPointInDegrees = 37;
> >       longitudeOfLastGridPointInDegrees = 125;
> >
> >
> >       I tested v5.0 and v5.1. Both have the same problem.
> >
> >
> >       Thanks!
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Kefeng
> >
> >
> >
> >
> >
> > kefeng at nju.edu.cn
> >
>
>
>


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tara Jensen
Project Manager II
NCAR RAL and DTC
PO Box 3000, Boulder, Colorado 80307 USA
+1 303-497-8479          jensen at ucar.edu

------------------------------------------------
Subject: Fw: pcp_combine does not work properly with lat-lon grid data
From: John Halley Gotway
Time: Wed Nov 23 12:44:41 2016

Kefeng,

Thanks for sending the sample data.  I see the behavior you're
describing.

gfsrain06.grb is a GRIB2 file on a global lat/lon grid.

I should take a closer look at this issue when I'm back in the office
next
week.  However, rather than converting to GRIB1 you could use the
wgrib2
utility to do the regridding:

wgrib2 gfsrain06.grb  -new_grid latlon 112:131:0.1 25:121:0.1
gfsrain06_regrid.grb2

And then run that GRIB2 file through pcp_combine:

pcp_combine -add gfsrain06_regrid.grb2 'name="APCP"; level="A6";'
gfsrain06_regrid.nc

Then the output NetCDF file does not have this problem:

ncdump -h 2a_wgrib2_regrid.nc | grep "_ll"

:lat_ll = "25.000000 degrees_north" ;

:lon_ll = "112.000000 degrees_east" ;


MET can read both GRIB1 and GRIB2 data.  Also, MET version 5.2
includes an
automated regridding feature.  So you can pass data to grid_stat on
different grids... and instruct grid_stat to regrid one to the other.
That
would avoid the need to do regridding using copygb or wgrib2 at all.

Just let me know if you have more questions.

Thanks,
John Halley Gotway

On Mon, Nov 21, 2016 at 5:32 PM, Tara Jensen via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720 >
>
> Kefeng,
>
> Much of our helpdesk staff is out this week due to the Thanksgiving
> holiday.  John is one of the staff who is out.  I will try to take a
look
> at this tomorrow but a resolution may have to wait until John
returns on 28
> Nov.
>
> Thanks,
> Tara Jensen
>
> On Fri, Nov 18, 2016 at 6:28 PM, kefeng at nju.edu.cn via RT <
> met_help at ucar.edu
> > wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720 >
> >
> >
> >             Here is the data. This is start from cnvgrib. The
grib_copy
> > does not effect the result.
> >
> > Kefeng
> >
> >
> >
> > kefeng at nju.edu.cn
> >
> > From: John Halley Gotway via RT
> > Date: 2016-11-19 01:19
> > To: kefeng
> > Subject: Re: [rt.rap.ucar.edu #78720] Fw: pcp_combine does not
work
> > properly with lat-lon grid data
> > Hello Kefeng,
> >
> > I see that you're having trouble with the range of lat/lon values
when
> > processing data through MET.
> >
> > I see in your email that you are referencing some attachments...
but I
> > don't see them.
> >
> > Can you please send that data to me as well as the exactly the
commands
> > you've run.  I'll run them here to replicate the behavior you
describe
> and
> > hopefully that'll help me answer your question.
> >
> > Thanks,
> > John Halley Gotway
> >
> >
> > On Thu, Nov 17, 2016 at 11:33 PM, kefeng at nju.edu.cn via RT <
> > met_help at ucar.edu> wrote:
> >
> > >
> > > Thu Nov 17 23:33:50 2016: Request 78720 was acted upon.
> > > Transaction: Ticket created by kefeng at nju.edu.cn
> > >        Queue: met_help
> > >      Subject: Fw: pcp_combine does not work properly with lat-
lon grid
> > data
> > >        Owner: Nobody
> > >   Requestors: kefeng at nju.edu.cn
> > >       Status: new
> > >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720
> >
> > >
> > >
> > >
> > >
> > >           Any suggestions?  Thanks!
> > >
> > > Kefeng
> > >
> > >
> > >
> > >
> > >
> > > kefeng at nju.edu.cn
> > >
> > > From: kefeng at nju.edu.cn
> > > Date: 2016-11-15 12:55
> > > To: met_help
> > > Subject: pcp_combine does not work properly with lat-lon grid
data
> > > Dear Sir:
> > >
> > >
> > >           I have recently use pcp_combine to generate no
projection
> > > "lat-lon" gridded precipitation. The program ended with no error
but i
> > > found the latitude information is not right.
> > >
> > >
> > >
> > >
> > >           Here is the step:
> > >
> > >
> > >          I use the "cnvgrib" convert the GFS grib 2 format to
grib 1.
> > >          Then, i use "copygb" to get the data from the region
25~37N,
> > > 112~125N.
> > >          Finally, i used pcp_combine. When the latitude
information  is
> > > right in grib format ( see attached file. i use other software,
like
> ncl
> > or
> > > EC gribapi checked the value). The latitude after pcp_combine is
wrong.
> > The
> > > latitude is from 37~49N.
> > >
> > >
> > >          Attached is a simple grib file. You can use this data
to test.
> > > Here is the information dumped from grib_dump.
> > >
> > >        latitudeOfFirstGridPointInDegrees = 25;
> > >         longitudeOfFirstGridPointInDegrees = 112;
> > >        earthIsOblate = 0;
> > >       uvRelativeToGrid = 0;
> > >       latitudeOfLastGridPointInDegrees = 37;
> > >       longitudeOfLastGridPointInDegrees = 125;
> > >
> > >
> > >       I tested v5.0 and v5.1. Both have the same problem.
> > >
> > >
> > >       Thanks!
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Kefeng
> > >
> > >
> > >
> > >
> > >
> > > kefeng at nju.edu.cn
> > >
> >
> >
> >
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Tara Jensen
> Project Manager II
> NCAR RAL and DTC
> PO Box 3000, Boulder, Colorado 80307 USA
> +1 303-497-8479          jensen at ucar.edu
>
>

------------------------------------------------
Subject: Fw: pcp_combine does not work properly with lat-lon grid data
From: kefeng at nju.edu.cn
Time: Wed Nov 23 19:04:33 2016



     Thanks! John. I will try that.

      I need to use copygb to interoplate the regional model forecast
to the lat-lon grid which using lambert projection. The wgrib2 cann't
solve this problem.

      I'm not in hurry.  You can do that when you have time.

      Happy thanks giving!

Kefeng






kefeng at nju.edu.cn

From: John Halley Gotway via RT
Date: 2016-11-24 03:44
To: kefeng
Subject: Re: Re: [rt.rap.ucar.edu #78720] Fw: pcp_combine does not
work properly with lat-lon grid data
Kefeng,

Thanks for sending the sample data.  I see the behavior you're
describing.

gfsrain06.grb is a GRIB2 file on a global lat/lon grid.

I should take a closer look at this issue when I'm back in the office
next
week.  However, rather than converting to GRIB1 you could use the
wgrib2
utility to do the regridding:

wgrib2 gfsrain06.grb  -new_grid latlon 112:131:0.1 25:121:0.1
gfsrain06_regrid.grb2

And then run that GRIB2 file through pcp_combine:

pcp_combine -add gfsrain06_regrid.grb2 'name="APCP"; level="A6";'
gfsrain06_regrid.nc

Then the output NetCDF file does not have this problem:

ncdump -h 2a_wgrib2_regrid.nc | grep "_ll"

:lat_ll = "25.000000 degrees_north" ;

:lon_ll = "112.000000 degrees_east" ;


MET can read both GRIB1 and GRIB2 data.  Also, MET version 5.2
includes an
automated regridding feature.  So you can pass data to grid_stat on
different grids... and instruct grid_stat to regrid one to the other.
That
would avoid the need to do regridding using copygb or wgrib2 at all.

Just let me know if you have more questions.

Thanks,
John Halley Gotway

On Mon, Nov 21, 2016 at 5:32 PM, Tara Jensen via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720 >
>
> Kefeng,
>
> Much of our helpdesk staff is out this week due to the Thanksgiving
> holiday.  John is one of the staff who is out.  I will try to take a
look
> at this tomorrow but a resolution may have to wait until John
returns on 28
> Nov.
>
> Thanks,
> Tara Jensen
>
> On Fri, Nov 18, 2016 at 6:28 PM, kefeng at nju.edu.cn via RT <
> met_help at ucar.edu
> > wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720 >
> >
> >
> >             Here is the data. This is start from cnvgrib. The
grib_copy
> > does not effect the result.
> >
> > Kefeng
> >
> >
> >
> > kefeng at nju.edu.cn
> >
> > From: John Halley Gotway via RT
> > Date: 2016-11-19 01:19
> > To: kefeng
> > Subject: Re: [rt.rap.ucar.edu #78720] Fw: pcp_combine does not
work
> > properly with lat-lon grid data
> > Hello Kefeng,
> >
> > I see that you're having trouble with the range of lat/lon values
when
> > processing data through MET.
> >
> > I see in your email that you are referencing some attachments...
but I
> > don't see them.
> >
> > Can you please send that data to me as well as the exactly the
commands
> > you've run.  I'll run them here to replicate the behavior you
describe
> and
> > hopefully that'll help me answer your question.
> >
> > Thanks,
> > John Halley Gotway
> >
> >
> > On Thu, Nov 17, 2016 at 11:33 PM, kefeng at nju.edu.cn via RT <
> > met_help at ucar.edu> wrote:
> >
> > >
> > > Thu Nov 17 23:33:50 2016: Request 78720 was acted upon.
> > > Transaction: Ticket created by kefeng at nju.edu.cn
> > >        Queue: met_help
> > >      Subject: Fw: pcp_combine does not work properly with lat-
lon grid
> > data
> > >        Owner: Nobody
> > >   Requestors: kefeng at nju.edu.cn
> > >       Status: new
> > >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720
> >
> > >
> > >
> > >
> > >
> > >           Any suggestions?  Thanks!
> > >
> > > Kefeng
> > >
> > >
> > >
> > >
> > >
> > > kefeng at nju.edu.cn
> > >
> > > From: kefeng at nju.edu.cn
> > > Date: 2016-11-15 12:55
> > > To: met_help
> > > Subject: pcp_combine does not work properly with lat-lon grid
data
> > > Dear Sir:
> > >
> > >
> > >           I have recently use pcp_combine to generate no
projection
> > > "lat-lon" gridded precipitation. The program ended with no error
but i
> > > found the latitude information is not right.
> > >
> > >
> > >
> > >
> > >           Here is the step:
> > >
> > >
> > >          I use the "cnvgrib" convert the GFS grib 2 format to
grib 1.
> > >          Then, i use "copygb" to get the data from the region
25~37N,
> > > 112~125N.
> > >          Finally, i used pcp_combine. When the latitude
information  is
> > > right in grib format ( see attached file. i use other software,
like
> ncl
> > or
> > > EC gribapi checked the value). The latitude after pcp_combine is
wrong.
> > The
> > > latitude is from 37~49N.
> > >
> > >
> > >          Attached is a simple grib file. You can use this data
to test.
> > > Here is the information dumped from grib_dump.
> > >
> > >        latitudeOfFirstGridPointInDegrees = 25;
> > >         longitudeOfFirstGridPointInDegrees = 112;
> > >        earthIsOblate = 0;
> > >       uvRelativeToGrid = 0;
> > >       latitudeOfLastGridPointInDegrees = 37;
> > >       longitudeOfLastGridPointInDegrees = 125;
> > >
> > >
> > >       I tested v5.0 and v5.1. Both have the same problem.
> > >
> > >
> > >       Thanks!
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Kefeng
> > >
> > >
> > >
> > >
> > >
> > > kefeng at nju.edu.cn
> > >
> >
> >
> >
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Tara Jensen
> Project Manager II
> NCAR RAL and DTC
> PO Box 3000, Boulder, Colorado 80307 USA
> +1 303-497-8479          jensen at ucar.edu
>
>

------------------------------------------------
Subject: Fw: pcp_combine does not work properly with lat-lon grid data
From: John Halley Gotway
Time: Thu Dec 01 15:26:15 2016

Kefeng,

I looked more carefully at your processing steps and see the problem
in the
arguments you passed to copygb.

First, please refer to this information about using copygb to regrid
to a
lat/lon grid:

http://www.dtcenter.org/met/users/support/online_tutorial/METv5.2/tutorial.php?name=copygb&category=run2

Based on that page, here's what the LATLON grid spec looks like:
   copygb -g"*255 0 NX NY LAT0 LON0 128 LAT1 LON1 DX DY 64*" -x in.grb
out.grb

But here's what you ran:
   copygb.exe -g"255 0 131 121 25000 112000 128 37000 125000 100 100 0
64"
-x gfsrain06.grb1 2016102000f06.grb1

Do you see the problem?  The gridspec should end with "DX DY 64" while
yours ends with "DX DY 0 64".  I ran it both ways and then ran "wgrib
-V"
on the result.  Here's the relevant wgrib output:

  CORRECT:
  latlon: lat  25.000000 to 37.000000 by 0.100000  nxny 15851
          long 112.000000 to 125.000000 by 0.100000, (131 x 121) scan
64
mode 128 bdsgrid 1
  INCORRECT:
  latlon: lat  25.000000 to 37.000000 by 0.100000  nxny 15851
          long 112.000000 to 125.000000 by 0.100000, (131 x 121) scan
0
mode 128 bdsgrid 1

The difference is the scanning mode being set to 0 versus 64.   The
scanning mode defines how you read data from top to bottom and left to
right:
   http://www.nco.ncep.noaa.gov/pmb/docs/on388/table8.html

The difference in the scanning mode explains why MET chose an
unexpected
lower-left corner.

This really is not a GRIB1 versus GRIB2 issue.  Ideally, copygb would
have
given you a warning when you supplied an extra argument in the grid
specification.  But I'm confident that once you correct your copygb
grid
specification, this issue will be fixed.

Thanks,
John










On Wed, Nov 23, 2016 at 7:04 PM, kefeng at nju.edu.cn via RT
<met_help at ucar.edu
> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720 >
>
>
>
>      Thanks! John. I will try that.
>
>       I need to use copygb to interoplate the regional model
forecast to
> the lat-lon grid which using lambert projection. The wgrib2 cann't
solve
> this problem.
>
>       I'm not in hurry.  You can do that when you have time.
>
>       Happy thanks giving!
>
> Kefeng
>
>
>
>
>
>
> kefeng at nju.edu.cn
>
> From: John Halley Gotway via RT
> Date: 2016-11-24 03:44
> To: kefeng
> Subject: Re: Re: [rt.rap.ucar.edu #78720] Fw: pcp_combine does not
work
> properly with lat-lon grid data
> Kefeng,
>
> Thanks for sending the sample data.  I see the behavior you're
describing.
>
> gfsrain06.grb is a GRIB2 file on a global lat/lon grid.
>
> I should take a closer look at this issue when I'm back in the
office next
> week.  However, rather than converting to GRIB1 you could use the
wgrib2
> utility to do the regridding:
>
> wgrib2 gfsrain06.grb  -new_grid latlon 112:131:0.1 25:121:0.1
> gfsrain06_regrid.grb2
>
> And then run that GRIB2 file through pcp_combine:
>
> pcp_combine -add gfsrain06_regrid.grb2 'name="APCP"; level="A6";'
> gfsrain06_regrid.nc
>
> Then the output NetCDF file does not have this problem:
>
> ncdump -h 2a_wgrib2_regrid.nc | grep "_ll"
>
> :lat_ll = "25.000000 degrees_north" ;
>
> :lon_ll = "112.000000 degrees_east" ;
>
>
> MET can read both GRIB1 and GRIB2 data.  Also, MET version 5.2
includes an
> automated regridding feature.  So you can pass data to grid_stat on
> different grids... and instruct grid_stat to regrid one to the
other.  That
> would avoid the need to do regridding using copygb or wgrib2 at all.
>
> Just let me know if you have more questions.
>
> Thanks,
> John Halley Gotway
>
> On Mon, Nov 21, 2016 at 5:32 PM, Tara Jensen via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720 >
> >
> > Kefeng,
> >
> > Much of our helpdesk staff is out this week due to the
Thanksgiving
> > holiday.  John is one of the staff who is out.  I will try to take
a look
> > at this tomorrow but a resolution may have to wait until John
returns on
> 28
> > Nov.
> >
> > Thanks,
> > Tara Jensen
> >
> > On Fri, Nov 18, 2016 at 6:28 PM, kefeng at nju.edu.cn via RT <
> > met_help at ucar.edu
> > > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720 >
> > >
> > >
> > >             Here is the data. This is start from cnvgrib. The
grib_copy
> > > does not effect the result.
> > >
> > > Kefeng
> > >
> > >
> > >
> > > kefeng at nju.edu.cn
> > >
> > > From: John Halley Gotway via RT
> > > Date: 2016-11-19 01:19
> > > To: kefeng
> > > Subject: Re: [rt.rap.ucar.edu #78720] Fw: pcp_combine does not
work
> > > properly with lat-lon grid data
> > > Hello Kefeng,
> > >
> > > I see that you're having trouble with the range of lat/lon
values when
> > > processing data through MET.
> > >
> > > I see in your email that you are referencing some attachments...
but I
> > > don't see them.
> > >
> > > Can you please send that data to me as well as the exactly the
commands
> > > you've run.  I'll run them here to replicate the behavior you
describe
> > and
> > > hopefully that'll help me answer your question.
> > >
> > > Thanks,
> > > John Halley Gotway
> > >
> > >
> > > On Thu, Nov 17, 2016 at 11:33 PM, kefeng at nju.edu.cn via RT <
> > > met_help at ucar.edu> wrote:
> > >
> > > >
> > > > Thu Nov 17 23:33:50 2016: Request 78720 was acted upon.
> > > > Transaction: Ticket created by kefeng at nju.edu.cn
> > > >        Queue: met_help
> > > >      Subject: Fw: pcp_combine does not work properly with lat-
lon
> grid
> > > data
> > > >        Owner: Nobody
> > > >   Requestors: kefeng at nju.edu.cn
> > > >       Status: new
> > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> Ticket/Display.html?id=78720
> > >
> > > >
> > > >
> > > >
> > > >
> > > >           Any suggestions?  Thanks!
> > > >
> > > > Kefeng
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > kefeng at nju.edu.cn
> > > >
> > > > From: kefeng at nju.edu.cn
> > > > Date: 2016-11-15 12:55
> > > > To: met_help
> > > > Subject: pcp_combine does not work properly with lat-lon grid
data
> > > > Dear Sir:
> > > >
> > > >
> > > >           I have recently use pcp_combine to generate no
projection
> > > > "lat-lon" gridded precipitation. The program ended with no
error but
> i
> > > > found the latitude information is not right.
> > > >
> > > >
> > > >
> > > >
> > > >           Here is the step:
> > > >
> > > >
> > > >          I use the "cnvgrib" convert the GFS grib 2 format to
grib 1.
> > > >          Then, i use "copygb" to get the data from the region
25~37N,
> > > > 112~125N.
> > > >          Finally, i used pcp_combine. When the latitude
information
> is
> > > > right in grib format ( see attached file. i use other
software, like
> > ncl
> > > or
> > > > EC gribapi checked the value). The latitude after pcp_combine
is
> wrong.
> > > The
> > > > latitude is from 37~49N.
> > > >
> > > >
> > > >          Attached is a simple grib file. You can use this data
to
> test.
> > > > Here is the information dumped from grib_dump.
> > > >
> > > >        latitudeOfFirstGridPointInDegrees = 25;
> > > >         longitudeOfFirstGridPointInDegrees = 112;
> > > >        earthIsOblate = 0;
> > > >       uvRelativeToGrid = 0;
> > > >       latitudeOfLastGridPointInDegrees = 37;
> > > >       longitudeOfLastGridPointInDegrees = 125;
> > > >
> > > >
> > > >       I tested v5.0 and v5.1. Both have the same problem.
> > > >
> > > >
> > > >       Thanks!
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Kefeng
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > kefeng at nju.edu.cn
> > > >
> > >
> > >
> > >
> >
> >
> > --
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Tara Jensen
> > Project Manager II
> > NCAR RAL and DTC
> > PO Box 3000, Boulder, Colorado 80307 USA
> > +1 303-497-8479          jensen at ucar.edu
> >
> >
>

------------------------------------------------
Subject: Fw: pcp_combine does not work properly with lat-lon grid data
From: kefeng at nju.edu.cn
Time: Thu Dec 01 18:39:22 2016


Thanks! John.

It works all right now.

I didn't notice that careless mistake until you point out. Anyway,
Thanks again!



Kefeng



kefeng at nju.edu.cn

From: John Halley Gotway via RT
Date: 2016-12-02 06:26
To: kefeng
Subject: Re: Re: [rt.rap.ucar.edu #78720] Fw: pcp_combine does not
work properly with lat-lon grid data
Kefeng,

I looked more carefully at your processing steps and see the problem
in the
arguments you passed to copygb.

First, please refer to this information about using copygb to regrid
to a
lat/lon grid:

http://www.dtcenter.org/met/users/support/online_tutorial/METv5.2/tutorial.php?name=copygb&category=run2

Based on that page, here's what the LATLON grid spec looks like:
   copygb -g"*255 0 NX NY LAT0 LON0 128 LAT1 LON1 DX DY 64*" -x in.grb
out.grb

But here's what you ran:
   copygb.exe -g"255 0 131 121 25000 112000 128 37000 125000 100 100 0
64"
-x gfsrain06.grb1 2016102000f06.grb1

Do you see the problem?  The gridspec should end with "DX DY 64" while
yours ends with "DX DY 0 64".  I ran it both ways and then ran "wgrib
-V"
on the result.  Here's the relevant wgrib output:

  CORRECT:
  latlon: lat  25.000000 to 37.000000 by 0.100000  nxny 15851
          long 112.000000 to 125.000000 by 0.100000, (131 x 121) scan
64
mode 128 bdsgrid 1
  INCORRECT:
  latlon: lat  25.000000 to 37.000000 by 0.100000  nxny 15851
          long 112.000000 to 125.000000 by 0.100000, (131 x 121) scan
0
mode 128 bdsgrid 1

The difference is the scanning mode being set to 0 versus 64.   The
scanning mode defines how you read data from top to bottom and left to
right:
   http://www.nco.ncep.noaa.gov/pmb/docs/on388/table8.html

The difference in the scanning mode explains why MET chose an
unexpected
lower-left corner.

This really is not a GRIB1 versus GRIB2 issue.  Ideally, copygb would
have
given you a warning when you supplied an extra argument in the grid
specification.  But I'm confident that once you correct your copygb
grid
specification, this issue will be fixed.

Thanks,
John










On Wed, Nov 23, 2016 at 7:04 PM, kefeng at nju.edu.cn via RT
<met_help at ucar.edu
> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720 >
>
>
>
>      Thanks! John. I will try that.
>
>       I need to use copygb to interoplate the regional model
forecast to
> the lat-lon grid which using lambert projection. The wgrib2 cann't
solve
> this problem.
>
>       I'm not in hurry.  You can do that when you have time.
>
>       Happy thanks giving!
>
> Kefeng
>
>
>
>
>
>
> kefeng at nju.edu.cn
>
> From: John Halley Gotway via RT
> Date: 2016-11-24 03:44
> To: kefeng
> Subject: Re: Re: [rt.rap.ucar.edu #78720] Fw: pcp_combine does not
work
> properly with lat-lon grid data
> Kefeng,
>
> Thanks for sending the sample data.  I see the behavior you're
describing.
>
> gfsrain06.grb is a GRIB2 file on a global lat/lon grid.
>
> I should take a closer look at this issue when I'm back in the
office next
> week.  However, rather than converting to GRIB1 you could use the
wgrib2
> utility to do the regridding:
>
> wgrib2 gfsrain06.grb  -new_grid latlon 112:131:0.1 25:121:0.1
> gfsrain06_regrid.grb2
>
> And then run that GRIB2 file through pcp_combine:
>
> pcp_combine -add gfsrain06_regrid.grb2 'name="APCP"; level="A6";'
> gfsrain06_regrid.nc
>
> Then the output NetCDF file does not have this problem:
>
> ncdump -h 2a_wgrib2_regrid.nc | grep "_ll"
>
> :lat_ll = "25.000000 degrees_north" ;
>
> :lon_ll = "112.000000 degrees_east" ;
>
>
> MET can read both GRIB1 and GRIB2 data.  Also, MET version 5.2
includes an
> automated regridding feature.  So you can pass data to grid_stat on
> different grids... and instruct grid_stat to regrid one to the
other.  That
> would avoid the need to do regridding using copygb or wgrib2 at all.
>
> Just let me know if you have more questions.
>
> Thanks,
> John Halley Gotway
>
> On Mon, Nov 21, 2016 at 5:32 PM, Tara Jensen via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720 >
> >
> > Kefeng,
> >
> > Much of our helpdesk staff is out this week due to the
Thanksgiving
> > holiday.  John is one of the staff who is out.  I will try to take
a look
> > at this tomorrow but a resolution may have to wait until John
returns on
> 28
> > Nov.
> >
> > Thanks,
> > Tara Jensen
> >
> > On Fri, Nov 18, 2016 at 6:28 PM, kefeng at nju.edu.cn via RT <
> > met_help at ucar.edu
> > > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=78720 >
> > >
> > >
> > >             Here is the data. This is start from cnvgrib. The
grib_copy
> > > does not effect the result.
> > >
> > > Kefeng
> > >
> > >
> > >
> > > kefeng at nju.edu.cn
> > >
> > > From: John Halley Gotway via RT
> > > Date: 2016-11-19 01:19
> > > To: kefeng
> > > Subject: Re: [rt.rap.ucar.edu #78720] Fw: pcp_combine does not
work
> > > properly with lat-lon grid data
> > > Hello Kefeng,
> > >
> > > I see that you're having trouble with the range of lat/lon
values when
> > > processing data through MET.
> > >
> > > I see in your email that you are referencing some attachments...
but I
> > > don't see them.
> > >
> > > Can you please send that data to me as well as the exactly the
commands
> > > you've run.  I'll run them here to replicate the behavior you
describe
> > and
> > > hopefully that'll help me answer your question.
> > >
> > > Thanks,
> > > John Halley Gotway
> > >
> > >
> > > On Thu, Nov 17, 2016 at 11:33 PM, kefeng at nju.edu.cn via RT <
> > > met_help at ucar.edu> wrote:
> > >
> > > >
> > > > Thu Nov 17 23:33:50 2016: Request 78720 was acted upon.
> > > > Transaction: Ticket created by kefeng at nju.edu.cn
> > > >        Queue: met_help
> > > >      Subject: Fw: pcp_combine does not work properly with lat-
lon
> grid
> > > data
> > > >        Owner: Nobody
> > > >   Requestors: kefeng at nju.edu.cn
> > > >       Status: new
> > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> Ticket/Display.html?id=78720
> > >
> > > >
> > > >
> > > >
> > > >
> > > >           Any suggestions?  Thanks!
> > > >
> > > > Kefeng
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > kefeng at nju.edu.cn
> > > >
> > > > From: kefeng at nju.edu.cn
> > > > Date: 2016-11-15 12:55
> > > > To: met_help
> > > > Subject: pcp_combine does not work properly with lat-lon grid
data
> > > > Dear Sir:
> > > >
> > > >
> > > >           I have recently use pcp_combine to generate no
projection
> > > > "lat-lon" gridded precipitation. The program ended with no
error but
> i
> > > > found the latitude information is not right.
> > > >
> > > >
> > > >
> > > >
> > > >           Here is the step:
> > > >
> > > >
> > > >          I use the "cnvgrib" convert the GFS grib 2 format to
grib 1.
> > > >          Then, i use "copygb" to get the data from the region
25~37N,
> > > > 112~125N.
> > > >          Finally, i used pcp_combine. When the latitude
information
> is
> > > > right in grib format ( see attached file. i use other
software, like
> > ncl
> > > or
> > > > EC gribapi checked the value). The latitude after pcp_combine
is
> wrong.
> > > The
> > > > latitude is from 37~49N.
> > > >
> > > >
> > > >          Attached is a simple grib file. You can use this data
to
> test.
> > > > Here is the information dumped from grib_dump.
> > > >
> > > >        latitudeOfFirstGridPointInDegrees = 25;
> > > >         longitudeOfFirstGridPointInDegrees = 112;
> > > >        earthIsOblate = 0;
> > > >       uvRelativeToGrid = 0;
> > > >       latitudeOfLastGridPointInDegrees = 37;
> > > >       longitudeOfLastGridPointInDegrees = 125;
> > > >
> > > >
> > > >       I tested v5.0 and v5.1. Both have the same problem.
> > > >
> > > >
> > > >       Thanks!
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Kefeng
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > kefeng at nju.edu.cn
> > > >
> > >
> > >
> > >
> >
> >
> > --
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Tara Jensen
> > Project Manager II
> > NCAR RAL and DTC
> > PO Box 3000, Boulder, Colorado 80307 USA
> > +1 303-497-8479          jensen at ucar.edu
> >
> >
>

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


More information about the Met_help mailing list