[Met_help] [rt.rap.ucar.edu #62420] History for using copygb to convert grid

John Halley Gotway via RT met_help at ucar.edu
Tue Jul 30 12:20:12 MDT 2013


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

Hi,

I'm trying to re-grid my WRF outputs to the NCEP/CPC 4km precipitation
grid in order to proceed to the pcp_combine step of my forecast
verification, using the MET tools. I wasn't sure if I should write to
the met_help or wrf_help, so I'm sending this email to both.

My problem is that the file created by copygb is a 0B file. This is
the command line I'm using:

$UPP_Dir/bin/copygb.exe -g"255 5 1121 881 23117 -119023 8 105000
4762.5 4762.5 0 64" -k'4*-1 61' -x $UPPin WRFPRS_d03.newgrid

I believe there must be something wrong with the grid specifications,
because when I try the opposite - converting the data into the WRF
grid - it works. I'm running the MET tools in the yellowstone cluster
so I have no reason to question the installation. I have previously
tried in a different cluster and had the same zero byte file result.

Would you be able to help me with that?

The dataset is the GCIP/EOP Surface: Precipitation NCEP/CPC 4KM
Gridded (Grib) Stage IV Data.
I'm downloading it from
http://data.eol.ucar.edu/cgi-bin/codiac/fgr_form/id=21.093
but it's also available in NCAR's HPSS data server, in
/DSS/DS507.5/stage4/stage4.YYYYMM.tar

The grid specs are:
(http://www.emc.ncep.noaa.gov/mmb/ylin/pcpanl/QandA/#GRIDINFO)
    It is a 1121x881 polar stereographic grid.
    Point (1,1) is at 23.117N 119.023W.
    Point (1,881) is at 53.509N 134.039W.
    Point (1121,1) is at 19.805N 80.750W.
    Point (1121,881) is at 45.619N 59.959W.
    The y-axis is parallel to 105W.
    The resolution is 4.7625km at 60N.
    The pole point is (I,J) = (400.5,1600.5)

Using the copygb parameters according to what's described in page 27 of
http://www.mmm.ucar.edu/wrf/users/tutorial/201301/pyle_upp.pdf

For a polar stereographic grid, we should use:
copygb.exe –xg”255 5 NX NY STARTLAT STARTLON 8 CENLON
DX DY 0 64” in.grb out.grb

I'd appreciate if you could help me figuring this out.

Thanks

Maria Eugenia B. Frediani
-------------------------------------------------------------------------------------
PhD Candidate
University of Connecticut
School of Engineering
261 Glenbrook Rd
Storrs, CT 06269
maria.frediani at uconn.edu



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

Subject: Re: [rt.rap.ucar.edu #62420] using copygb to convert grid
From: John Halley Gotway
Time: Tue Jul 30 09:59:45 2013

Maria,

I retrieved a StageIV file and used the verbose option to wgrib to
dump it's header:

[johnhg at rambler]% wgrib -V ST4.2013073012.06h
rec 1:0:date 2013072912 APCP kpds5=61 kpds6=1 kpds7=0 levels=(0,0)
grid=255 sfc 18-24hr acc: bitmap: 443759 undef
   APCP=Total precipitation [kg/m^2]
   timerange 4 P1 18 P2 24 TimeU 1  nx 1121 ny 881 GDS grid 5
num_in_ave 0 missing 0
   center 7 subcenter 4 process 182 Table 2 scan: WE:SN winds(grid)
   polar stereo: Lat1 23.117000 Long1 -119.023000 Orient -105.000000
      north pole (1121 x 881) Dx 4763 Dy 4763 scan 64 mode 8
   min/max data 0 144.12  num bits 14  BDS_Ref 0  DecScale 2 BinScale
0

The grid definition part of that is this:
   polar stereo: Lat1 23.117000 Long1 -119.023000 Orient -105.000000
      north pole (1121 x 881) Dx 4763 Dy 4763 scan 64 mode 8

Next, we need to figure out the copygb parameters for a polar
stereographic grid.  Here's an example:
    http://www.dtcenter.org/met/users/support/online_tutorial/METv4.0/copygb/run4.php

So the required grid specification is this:
    255 5 NX NY STARTLAT STARTLON 8 CENLON DX DY 0 64

Substituting in the StageIV values yields:
    255 5 1121 881 23117 -119023 8 -105000 4763 4763 0 64

That's identical to what you used other than 4763 instead of 4762.5.
copygb reads the grid specification as integers, and perhaps the
decimal place is messing things up.  Try using 4763 and see if
that yields better results.

Thanks,
John Halley Gotway
met_help at ucar.edu


On 07/29/2013 03:19 PM, Maria Eugenia via RT wrote:
>
> Mon Jul 29 15:19:31 2013: Request 62420 was acted upon.
> Transaction: Ticket created by maria.frediani at gmail.com
>         Queue: met_help
>       Subject: using copygb to convert grid
>         Owner: Nobody
>    Requestors: maria.frediani at gmail.com
>        Status: new
>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=62420 >
>
>
> Hi,
>
> I'm trying to re-grid my WRF outputs to the NCEP/CPC 4km
precipitation
> grid in order to proceed to the pcp_combine step of my forecast
> verification, using the MET tools. I wasn't sure if I should write
to
> the met_help or wrf_help, so I'm sending this email to both.
>
> My problem is that the file created by copygb is a 0B file. This is
> the command line I'm using:
>
> $UPP_Dir/bin/copygb.exe -g"255 5 1121 881 23117 -119023 8 105000
> 4762.5 4762.5 0 64" -k'4*-1 61' -x $UPPin WRFPRS_d03.newgrid
>
> I believe there must be something wrong with the grid
specifications,
> because when I try the opposite - converting the data into the WRF
> grid - it works. I'm running the MET tools in the yellowstone
cluster
> so I have no reason to question the installation. I have previously
> tried in a different cluster and had the same zero byte file result.
>
> Would you be able to help me with that?
>
> The dataset is the GCIP/EOP Surface: Precipitation NCEP/CPC 4KM
> Gridded (Grib) Stage IV Data.
> I'm downloading it from
> http://data.eol.ucar.edu/cgi-bin/codiac/fgr_form/id=21.093
> but it's also available in NCAR's HPSS data server, in
> /DSS/DS507.5/stage4/stage4.YYYYMM.tar
>
> The grid specs are:
> (http://www.emc.ncep.noaa.gov/mmb/ylin/pcpanl/QandA/#GRIDINFO)
>      It is a 1121x881 polar stereographic grid.
>      Point (1,1) is at 23.117N 119.023W.
>      Point (1,881) is at 53.509N 134.039W.
>      Point (1121,1) is at 19.805N 80.750W.
>      Point (1121,881) is at 45.619N 59.959W.
>      The y-axis is parallel to 105W.
>      The resolution is 4.7625km at 60N.
>      The pole point is (I,J) = (400.5,1600.5)
>
> Using the copygb parameters according to what's described in page 27
of
> http://www.mmm.ucar.edu/wrf/users/tutorial/201301/pyle_upp.pdf
>
> For a polar stereographic grid, we should use:
> copygb.exe –xg”255 5 NX NY STARTLAT STARTLON 8 CENLON
> DX DY 0 64” in.grb out.grb
>
> I'd appreciate if you could help me figuring this out.
>
> Thanks
>
> Maria Eugenia B. Frediani
>
-------------------------------------------------------------------------------------
> PhD Candidate
> University of Connecticut
> School of Engineering
> 261 Glenbrook Rd
> Storrs, CT 06269
> maria.frediani at uconn.edu
>

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #62420] using copygb to convert grid
From: John Halley Gotway
Time: Tue Jul 30 10:05:31 2013

Maria,

Sorry, I just saw the problem.  You were using 105000 when it should
have been -105000.  So you were on the wrong side of the globe!

This grid specification should work:
    255 5 1121 881 23117 -119023 8 -105000 4763 4763 0 64

Also, since this is precipitation, consider using the "budget"
interpolation option by passing in the "-i3" option.  It's much slower
but is supposed to preserve the total rainfall amount.

John

On 07/30/2013 09:59 AM, John Halley Gotway wrote:
> Maria,
>
> I retrieved a StageIV file and used the verbose option to wgrib to
dump it's header:
>
> [johnhg at rambler]% wgrib -V ST4.2013073012.06h
> rec 1:0:date 2013072912 APCP kpds5=61 kpds6=1 kpds7=0 levels=(0,0)
grid=255 sfc 18-24hr acc: bitmap: 443759 undef
>    APCP=Total precipitation [kg/m^2]
>    timerange 4 P1 18 P2 24 TimeU 1  nx 1121 ny 881 GDS grid 5
num_in_ave 0 missing 0
>    center 7 subcenter 4 process 182 Table 2 scan: WE:SN winds(grid)
>    polar stereo: Lat1 23.117000 Long1 -119.023000 Orient -105.000000
>       north pole (1121 x 881) Dx 4763 Dy 4763 scan 64 mode 8
>    min/max data 0 144.12  num bits 14  BDS_Ref 0  DecScale 2
BinScale 0
>
> The grid definition part of that is this:
>    polar stereo: Lat1 23.117000 Long1 -119.023000 Orient -105.000000
>       north pole (1121 x 881) Dx 4763 Dy 4763 scan 64 mode 8
>
> Next, we need to figure out the copygb parameters for a polar
stereographic grid.  Here's an example:
>
http://www.dtcenter.org/met/users/support/online_tutorial/METv4.0/copygb/run4.php
>
> So the required grid specification is this:
>     255 5 NX NY STARTLAT STARTLON 8 CENLON DX DY 0 64
>
> Substituting in the StageIV values yields:
>     255 5 1121 881 23117 -119023 8 -105000 4763 4763 0 64
>
> That's identical to what you used other than 4763 instead of 4762.5.
copygb reads the grid specification as integers, and perhaps the
decimal place is messing things up.  Try using 4763 and see if
> that yields better results.
>
> Thanks,
> John Halley Gotway
> met_help at ucar.edu
>
>
> On 07/29/2013 03:19 PM, Maria Eugenia via RT wrote:
>>
>> Mon Jul 29 15:19:31 2013: Request 62420 was acted upon.
>> Transaction: Ticket created by maria.frediani at gmail.com
>>         Queue: met_help
>>       Subject: using copygb to convert grid
>>         Owner: Nobody
>>    Requestors: maria.frediani at gmail.com
>>        Status: new
>>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=62420 >
>>
>>
>> Hi,
>>
>> I'm trying to re-grid my WRF outputs to the NCEP/CPC 4km
precipitation
>> grid in order to proceed to the pcp_combine step of my forecast
>> verification, using the MET tools. I wasn't sure if I should write
to
>> the met_help or wrf_help, so I'm sending this email to both.
>>
>> My problem is that the file created by copygb is a 0B file. This is
>> the command line I'm using:
>>
>> $UPP_Dir/bin/copygb.exe -g"255 5 1121 881 23117 -119023 8 105000
>> 4762.5 4762.5 0 64" -k'4*-1 61' -x $UPPin WRFPRS_d03.newgrid
>>
>> I believe there must be something wrong with the grid
specifications,
>> because when I try the opposite - converting the data into the WRF
>> grid - it works. I'm running the MET tools in the yellowstone
cluster
>> so I have no reason to question the installation. I have previously
>> tried in a different cluster and had the same zero byte file
result.
>>
>> Would you be able to help me with that?
>>
>> The dataset is the GCIP/EOP Surface: Precipitation NCEP/CPC 4KM
>> Gridded (Grib) Stage IV Data.
>> I'm downloading it from
>> http://data.eol.ucar.edu/cgi-bin/codiac/fgr_form/id=21.093
>> but it's also available in NCAR's HPSS data server, in
>> /DSS/DS507.5/stage4/stage4.YYYYMM.tar
>>
>> The grid specs are:
>> (http://www.emc.ncep.noaa.gov/mmb/ylin/pcpanl/QandA/#GRIDINFO)
>>      It is a 1121x881 polar stereographic grid.
>>      Point (1,1) is at 23.117N 119.023W.
>>      Point (1,881) is at 53.509N 134.039W.
>>      Point (1121,1) is at 19.805N 80.750W.
>>      Point (1121,881) is at 45.619N 59.959W.
>>      The y-axis is parallel to 105W.
>>      The resolution is 4.7625km at 60N.
>>      The pole point is (I,J) = (400.5,1600.5)
>>
>> Using the copygb parameters according to what's described in page
27 of
>> http://www.mmm.ucar.edu/wrf/users/tutorial/201301/pyle_upp.pdf
>>
>> For a polar stereographic grid, we should use:
>> copygb.exe –xg”255 5 NX NY STARTLAT STARTLON 8 CENLON
>> DX DY 0 64” in.grb out.grb
>>
>> I'd appreciate if you could help me figuring this out.
>>
>> Thanks
>>
>> Maria Eugenia B. Frediani
>>
-------------------------------------------------------------------------------------
>> PhD Candidate
>> University of Connecticut
>> School of Engineering
>> 261 Glenbrook Rd
>> Storrs, CT 06269
>> maria.frediani at uconn.edu
>>

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #62420] using copygb to convert grid
From: Maria Eugenia
Time: Tue Jul 30 12:17:45 2013

Hi John,

I worked! Pcp_combine now runs successfully.

Thanks you very much!
Maria Eugenia B. Frediani
-------------------------------------------------------------------------------------
PhD Candidate
University of Connecticut
School of Engineering
261 Glenbrook Rd
Storrs, CT 06269
maria.frediani at uconn.edu


On Tue, Jul 30, 2013 at 10:05 AM, John Halley Gotway via RT
<met_help at ucar.edu> wrote:
> Maria,
>
> Sorry, I just saw the problem.  You were using 105000 when it should
have been -105000.  So you were on the wrong side of the globe!
>
> This grid specification should work:
>     255 5 1121 881 23117 -119023 8 -105000 4763 4763 0 64
>
> Also, since this is precipitation, consider using the "budget"
interpolation option by passing in the "-i3" option.  It's much slower
but is supposed to preserve the total rainfall amount.
>
> John
>
> On 07/30/2013 09:59 AM, John Halley Gotway wrote:
>> Maria,
>>
>> I retrieved a StageIV file and used the verbose option to wgrib to
dump it's header:
>>
>> [johnhg at rambler]% wgrib -V ST4.2013073012.06h
>> rec 1:0:date 2013072912 APCP kpds5=61 kpds6=1 kpds7=0 levels=(0,0)
grid=255 sfc 18-24hr acc: bitmap: 443759 undef
>>    APCP=Total precipitation [kg/m^2]
>>    timerange 4 P1 18 P2 24 TimeU 1  nx 1121 ny 881 GDS grid 5
num_in_ave 0 missing 0
>>    center 7 subcenter 4 process 182 Table 2 scan: WE:SN winds(grid)
>>    polar stereo: Lat1 23.117000 Long1 -119.023000 Orient
-105.000000
>>       north pole (1121 x 881) Dx 4763 Dy 4763 scan 64 mode 8
>>    min/max data 0 144.12  num bits 14  BDS_Ref 0  DecScale 2
BinScale 0
>>
>> The grid definition part of that is this:
>>    polar stereo: Lat1 23.117000 Long1 -119.023000 Orient
-105.000000
>>       north pole (1121 x 881) Dx 4763 Dy 4763 scan 64 mode 8
>>
>> Next, we need to figure out the copygb parameters for a polar
stereographic grid.  Here's an example:
>>
http://www.dtcenter.org/met/users/support/online_tutorial/METv4.0/copygb/run4.php
>>
>> So the required grid specification is this:
>>     255 5 NX NY STARTLAT STARTLON 8 CENLON DX DY 0 64
>>
>> Substituting in the StageIV values yields:
>>     255 5 1121 881 23117 -119023 8 -105000 4763 4763 0 64
>>
>> That's identical to what you used other than 4763 instead of
4762.5.  copygb reads the grid specification as integers, and perhaps
the decimal place is messing things up.  Try using 4763 and see if
>> that yields better results.
>>
>> Thanks,
>> John Halley Gotway
>> met_help at ucar.edu
>>
>>
>> On 07/29/2013 03:19 PM, Maria Eugenia via RT wrote:
>>>
>>> Mon Jul 29 15:19:31 2013: Request 62420 was acted upon.
>>> Transaction: Ticket created by maria.frediani at gmail.com
>>>         Queue: met_help
>>>       Subject: using copygb to convert grid
>>>         Owner: Nobody
>>>    Requestors: maria.frediani at gmail.com
>>>        Status: new
>>>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=62420 >
>>>
>>>
>>> Hi,
>>>
>>> I'm trying to re-grid my WRF outputs to the NCEP/CPC 4km
precipitation
>>> grid in order to proceed to the pcp_combine step of my forecast
>>> verification, using the MET tools. I wasn't sure if I should write
to
>>> the met_help or wrf_help, so I'm sending this email to both.
>>>
>>> My problem is that the file created by copygb is a 0B file. This
is
>>> the command line I'm using:
>>>
>>> $UPP_Dir/bin/copygb.exe -g"255 5 1121 881 23117 -119023 8 105000
>>> 4762.5 4762.5 0 64" -k'4*-1 61' -x $UPPin WRFPRS_d03.newgrid
>>>
>>> I believe there must be something wrong with the grid
specifications,
>>> because when I try the opposite - converting the data into the WRF
>>> grid - it works. I'm running the MET tools in the yellowstone
cluster
>>> so I have no reason to question the installation. I have
previously
>>> tried in a different cluster and had the same zero byte file
result.
>>>
>>> Would you be able to help me with that?
>>>
>>> The dataset is the GCIP/EOP Surface: Precipitation NCEP/CPC 4KM
>>> Gridded (Grib) Stage IV Data.
>>> I'm downloading it from
>>> http://data.eol.ucar.edu/cgi-bin/codiac/fgr_form/id=21.093
>>> but it's also available in NCAR's HPSS data server, in
>>> /DSS/DS507.5/stage4/stage4.YYYYMM.tar
>>>
>>> The grid specs are:
>>> (http://www.emc.ncep.noaa.gov/mmb/ylin/pcpanl/QandA/#GRIDINFO)
>>>      It is a 1121x881 polar stereographic grid.
>>>      Point (1,1) is at 23.117N 119.023W.
>>>      Point (1,881) is at 53.509N 134.039W.
>>>      Point (1121,1) is at 19.805N 80.750W.
>>>      Point (1121,881) is at 45.619N 59.959W.
>>>      The y-axis is parallel to 105W.
>>>      The resolution is 4.7625km at 60N.
>>>      The pole point is (I,J) = (400.5,1600.5)
>>>
>>> Using the copygb parameters according to what's described in page
27 of
>>> http://www.mmm.ucar.edu/wrf/users/tutorial/201301/pyle_upp.pdf
>>>
>>> For a polar stereographic grid, we should use:
>>> copygb.exe –xg”255 5 NX NY STARTLAT STARTLON 8 CENLON
>>> DX DY 0 64” in.grb out.grb
>>>
>>> I'd appreciate if you could help me figuring this out.
>>>
>>> Thanks
>>>
>>> Maria Eugenia B. Frediani
>>>
-------------------------------------------------------------------------------------
>>> PhD Candidate
>>> University of Connecticut
>>> School of Engineering
>>> 261 Glenbrook Rd
>>> Storrs, CT 06269
>>> maria.frediani at uconn.edu
>>>
>


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


More information about the Met_help mailing list