[Met_help] [rt.rap.ucar.edu #45480] History for how to read lat and long of a specific grid point in GRIB1/GRIB2 gaussian gridded data

RAL HelpDesk {for John Halley Gotway} met_help at ucar.edu
Mon Mar 21 12:50:42 MDT 2011


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

Hi,
   I need to know lat and long of a particular grid point of the
Gaussian gridded data; data in in the grib1 format. How can I figure out
it? Any information or related documentation greatly helps me.
Thanks,
Satish 


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

Subject: Re: [rt.rap.ucar.edu #45480] how to read lat and long of a specific grid point in GRIB1/GRIB2 gaussian gridded data
From: John Halley Gotway
Time: Fri Mar 18 13:34:37 2011

Satish,

There's probably a lot of ways to go about this.  But here's one
option for you, making use of the MET package.

You could use the "pcp_combine" tool within MET.  Just have it read
some data from your GRIB1 file and have it use the "-add" option so
you just need to supply a single file.  PCP-Combine will write
out a NetCDF file containing the output.  That NetCDF file will
include variables for the "lat" and "lon" of the grid.  Then you could
use whatever tool you prefer to look at the lat/lon values in
that NetCDF file.

I checked to see if the ncview utility would plot the lat/lon values
for you, but it appears that it will not.  It handles variables named
"lat" and "lon" in a special way, and it doesn't allow you to
display them.  However, you could trick ncview by renaming those
variables to a new name.  And then you could use ncview to display
them.

Using the test data distributed with the MET package, these steps
would consist of:
   cd top-level/MET/directory
   bin/pcp_combine -add
data/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212 12 apcp_12.nc
   ncrename -v lat,lat_show -v lon,lon_show apcp_12.nc
apcp_12_show_latlon.nc
   ncview apcp_12_show_latlon.nc

Then select the "lat_show" and "lon_show" variables and move your
mouse over the image to display the values at each grid point.

Alternatively, you could use whatever tools you'd like to extract
values from that NetCDF file.  Personally, I often use the "ncdf"
package within the R scripting language for doing this sort of thing.

Hope that helps.

John Halley Gotway
met_help at ucar.edu


On 03/18/2011 01:21 PM, RAL HelpDesk {for Satish Regonda} wrote:
>
> Fri Mar 18 13:21:03 2011: Request 45480 was acted upon.
> Transaction: Ticket created by Satish.Regonda at noaa.gov
>        Queue: met_help
>      Subject: how to read lat and long of a specific grid point in
GRIB1/GRIB2 gaussian gridded data
>        Owner: Nobody
>   Requestors: Satish.Regonda at noaa.gov
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=45480 >
>
>
> Hi,
>    I need to know lat and long of a particular grid point of the
> Gaussian gridded data; data in in the grib1 format. How can I figure
out
> it? Any information or related documentation greatly helps me.
> Thanks,
> Satish

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #45480] how to read lat and long of a specific grid point in GRIB1/GRIB2 gaussian gridded data
From: Satish Regonda
Time: Fri Mar 18 14:04:39 2011

John,
  This helps, and will try. However, I request you to let me know if I
can find out this information using standard GRIB related executables
(e.g., wgrib, etc) without using any other software, if possible, and
in
unix environment.
Thanks,
Satish


----- Original Message -----
From: RAL HelpDesk {for John Halley Gotway} <met_help at ucar.edu>
Date: Friday, March 18, 2011 3:34 pm
Subject: Re: [rt.rap.ucar.edu #45480] how to read lat and long of a
specific grid point in GRIB1/GRIB2 gaussian gridded data

> Satish,
>
> There's probably a lot of ways to go about this.  But here's one
> option for you, making use of the MET package.
>
> You could use the "pcp_combine" tool within MET.  Just have it read
> some data from your GRIB1 file and have it use the "-add" option so
> you just need to supply a single file.  PCP-Combine will write
> out a NetCDF file containing the output.  That NetCDF file will
> include variables for the "lat" and "lon" of the grid.  Then you
> could use whatever tool you prefer to look at the lat/lon values in
> that NetCDF file.
>
> I checked to see if the ncview utility would plot the lat/lon
> values for you, but it appears that it will not.  It handles
> variables named "lat" and "lon" in a special way, and it doesn't
> allow you to
> display them.  However, you could trick ncview by renaming those
> variables to a new name.  And then you could use ncview to display
> them.
> Using the test data distributed with the MET package, these steps
> would consist of:
>   cd top-level/MET/directory
>   bin/pcp_combine -add
> data/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212 12 apcp_12.nc
>   ncrename -v lat,lat_show -v lon,lon_show apcp_12.nc
> apcp_12_show_latlon.nc   ncview apcp_12_show_latlon.nc
>
> Then select the "lat_show" and "lon_show" variables and move your
> mouse over the image to display the values at each grid point.
>
> Alternatively, you could use whatever tools you'd like to extract
> values from that NetCDF file.  Personally, I often use the "ncdf"
> package within the R scripting language for doing this sort of
thing.
>
> Hope that helps.
>
> John Halley Gotway
> met_help at ucar.edu
>
>
> On 03/18/2011 01:21 PM, RAL HelpDesk {for Satish Regonda} wrote:
> >
> > Fri Mar 18 13:21:03 2011: Request 45480 was acted upon.
> > Transaction: Ticket created by Satish.Regonda at noaa.gov
> >        Queue: met_help
> >      Subject: how to read lat and long of a specific grid point
> in GRIB1/GRIB2 gaussian gridded data
> >        Owner: Nobody
> >   Requestors: Satish.Regonda at noaa.gov
> >       Status: new
> >  Ticket <URL:
> https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=45480 >
> >
> >
> > Hi,
> >    I need to know lat and long of a particular grid point of the
> > Gaussian gridded data; data in in the grib1 format. How can I
> figure out
> > it? Any information or related documentation greatly helps me.
> > Thanks,
> > Satish
>
>

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #45480] how to read lat and long of a specific grid point in GRIB1/GRIB2 gaussian gridded data
From: John Halley Gotway
Time: Mon Mar 21 12:50:33 2011

Satish,

No, I am not aware of how you'd do this using only wgrib or copygb.
Regarding the environment, all the options I listed are able to be run
in a UNIX environment.  Another possible option is making
use of NCL (http://www.ncl.ucar.edu).  If you happen to be familiar
with NCL, it'd be pretty straight-forward to write an NCL script to do
this sort of things.  And then you could run that script from
the command line.

Good luck.  Hope that helps.

Thanks,
John



On 03/18/2011 02:04 PM, RAL HelpDesk {for Satish Regonda} wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=45480 >
>
> John,
>   This helps, and will try. However, I request you to let me know if
I
> can find out this information using standard GRIB related
executables
> (e.g., wgrib, etc) without using any other software, if possible,
and in
> unix environment.
> Thanks,
> Satish
>
>
> ----- Original Message -----
> From: RAL HelpDesk {for John Halley Gotway} <met_help at ucar.edu>
> Date: Friday, March 18, 2011 3:34 pm
> Subject: Re: [rt.rap.ucar.edu #45480] how to read lat and long of a
> specific grid point in GRIB1/GRIB2 gaussian gridded data
>
>> Satish,
>>
>> There's probably a lot of ways to go about this.  But here's one
>> option for you, making use of the MET package.
>>
>> You could use the "pcp_combine" tool within MET.  Just have it read
>> some data from your GRIB1 file and have it use the "-add" option so
>> you just need to supply a single file.  PCP-Combine will write
>> out a NetCDF file containing the output.  That NetCDF file will
>> include variables for the "lat" and "lon" of the grid.  Then you
>> could use whatever tool you prefer to look at the lat/lon values in
>> that NetCDF file.
>>
>> I checked to see if the ncview utility would plot the lat/lon
>> values for you, but it appears that it will not.  It handles
>> variables named "lat" and "lon" in a special way, and it doesn't
>> allow you to
>> display them.  However, you could trick ncview by renaming those
>> variables to a new name.  And then you could use ncview to display
>> them.
>> Using the test data distributed with the MET package, these steps
>> would consist of:
>>   cd top-level/MET/directory
>>   bin/pcp_combine -add
>> data/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212 12 apcp_12.nc
>>   ncrename -v lat,lat_show -v lon,lon_show apcp_12.nc
>> apcp_12_show_latlon.nc   ncview apcp_12_show_latlon.nc
>>
>> Then select the "lat_show" and "lon_show" variables and move your
>> mouse over the image to display the values at each grid point.
>>
>> Alternatively, you could use whatever tools you'd like to extract
>> values from that NetCDF file.  Personally, I often use the "ncdf"
>> package within the R scripting language for doing this sort of
thing.
>>
>> Hope that helps.
>>
>> John Halley Gotway
>> met_help at ucar.edu
>>
>>
>> On 03/18/2011 01:21 PM, RAL HelpDesk {for Satish Regonda} wrote:
>>>
>>> Fri Mar 18 13:21:03 2011: Request 45480 was acted upon.
>>> Transaction: Ticket created by Satish.Regonda at noaa.gov
>>>        Queue: met_help
>>>      Subject: how to read lat and long of a specific grid point
>> in GRIB1/GRIB2 gaussian gridded data
>>>        Owner: Nobody
>>>   Requestors: Satish.Regonda at noaa.gov
>>>       Status: new
>>>  Ticket <URL:
>> https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=45480 >
>>>
>>>
>>> Hi,
>>>    I need to know lat and long of a particular grid point of the
>>> Gaussian gridded data; data in in the grib1 format. How can I
>> figure out
>>> it? Any information or related documentation greatly helps me.
>>> Thanks,
>>> Satish
>>
>>

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


More information about the Met_help mailing list