<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thanks Wesley,<br>
<br>
I'll give that a try this week :)<br>
<br>
Cheers, Mike<br>
<br>
<br>
On 19/05/2012 1:07 AM, Wesley Ebisuzaki wrote:
<blockquote
cite="mid:CAMHOGekx2qCSYo-ty8v0Z7Hh1o+6e0AK+sy5HLLOerDEnOjtRg@mail.gmail.com"
type="cite">Mike,<br>
<br>
The error message suggests that you haven't installed all the
files needed<br>
for <a moz-do-not-send="true" href="http://g2grb.gs">g2grb.gs</a>
to run. You need<br>
<br>
template.grb2 in the $GADDIR directory<br>
you need wgrib2 (v1.8.4+) on your path<br>
<br>
<br>
BTW The simpler way of making regional grib2 subset is to use
wgrib2.<br>
<br>
For lat-lon -> subset lat-lon: use the -small_grib option<br>
<br>
wgrib2 IN.grb2 -set_grib_type j -small_grib 100:170 -55:0
OUT.grb2<br>
<br>
You can also interpolate to a lat-lon grid by the -new_grid
option.<br>
<br>
Yours,<br>
Wesley<br>
<br>
<br>
<br>
<div class="gmail_quote">On Fri, May 18, 2012 at 3:19 AM, Mike
Manning <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:michael@bsch.au.com" target="_blank">michael@bsch.au.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I've got data downloaded from an archive now however I'd like
to extract<br>
a subregion from the grib2 files using g2grb. I've created a
test.ctl<br>
files as follows:<br>
<br>
'open gfs.00z.ctl'<br>
'set lat -55 0'<br>
'set lon 100 170'<br>
'g2grb LFTXsfc extrap.grb UGRD:1000 mb:anl:packing=j:center=7'<br>
#'g2grb h(lev=925) +extrap.grb HGT:925
mb:anl:packing=j:center=7'<br>
#'g2grb h(lev=850) +extrap.grb HGT:850
mb:anl:packing=j:center=7'<br>
#'g2grb h(lev=700) +extrap.grb HGT:700
mb:anl:packing=j:center=7'<br>
#'g2grb h(lev=600) +extrap.grb HGT:600
mb:anl:packing=j:center=7'<br>
#'g2grb h(lev=500) +extrap.grb HGT:500
mb:anl:packing=j:center=7'<br>
quit<br>
<br>
<br>
I run it using grads -blc however it's throwing up some
errors:<br>
Starting "/grads2/Linux/Versions/2.0.a9.oga.1/i686/grads
-blc test.ctl<br>
" ...<br>
<br>
<br>
Grid Analysis and Display System (GrADS) Version 2.0.a9.oga.1<br>
Copyright (c) 1988-2010 by Brian Doty and the<br>
Institute for Global Environment and Society (IGES)<br>
GrADS comes with ABSOLUTELY NO WARRANTY<br>
See file COPYRIGHT for more information<br>
<br>
Config: v2.0.a9.oga.1 little-endian readline printim grib2
netcdf<br>
hdf4-sds hdf5 opendap-grids,stn athena geotiff shapefile<br>
Issue 'q config' command for more detailed configuration
information<br>
Loading User Defined Extensions table<br>
</grads2/Linux/Versions/2.0.a9.oga.1/i686/gex/udxt> ...
ok.<br>
GX Package Initialization: Size = 11 8.5<br>
Running in Batch mode<br>
dlon=1 nx = 71 lon0 = 100<br>
Y is varying Lat = -55 to 0 Y = 36 to 91<br>
dlat=1 ny = 56 lat0 = -55<br>
need to generate date<br>
new inv=d=2011121000:UGRD:1000 mb:anl:packing=j:center=7<br>
new grads found undef=-999000000.000000<br>
making template file<br>
! /grads2/wgrib2 $GADDIR/template.grb2 -d 1 -lola 100:71:1
-55:56:1<br>
extrap.grb.template grib<br>
argument: -lola ????<br>
argument: 100:71:1 ????<br>
argument: -55:56:1 ????<br>
argument: extrap.grb.template ????<br>
argument: grib ????<br>
missing GRIB record(s)<br>
opening fwrite extrap.grb.tmp<br>
going to display LFTXsfc<br>
result is Wrote 3976 of 3976 elements to extrap.grb.tmp as
Sequential<br>
Big_Endian<br>
<br>
metadata = 1:0:d=2011121000:UGRD:1000
mb:anl:packing=j:center=7:<br>
! /grads2/wgrib2 extrap.grb.template -import_ieee
extrap.grb.tmp<br>
-set_metadata extrap.grb.inv -undefine_val -999000000.000000
-grib_out<br>
extrap.grb<br>
argument: -import_ieee ????<br>
argument: extrap.grb.tmp ????<br>
argument: -set_grib_type ????<br>
argument: c3 ????<br>
argument: -set_metadata ????<br>
argument: extrap.grb.inv ????<br>
argument: -undefine_val ????<br>
argument: -999000000.000000 ????<br>
argument: -grib_out ????<br>
argument: extrap.grb ????<br>
could not open file: extrap.grb.template<br>
<br>
!rm extrap.grb.tmp extrap.grb.inv extrap.grb.template<br>
rm: cannot remove `extrap.grb.template': No such file or
directory<br>
<br>
<br>
I'm not sure why it's not working :( All I'd like to do is
extract the<br>
subregion from lat -55 to 0 and lon 100 to 170 for all
variables in the<br>
grib data files I've downloaded.<br>
<br>
Cheers, Mike<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a moz-do-not-send="true" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a moz-do-not-send="true"
href="http://gradsusr.org/mailman/listinfo/gradsusr"
target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote>
</div>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
</blockquote>
<br>
</body>
</html>