2011/8/30 A. S. <span dir="ltr"><<a href="mailto:irln@hotmail.com">irln@hotmail.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr">
<font style="font-size:12pt" face="Arial" size="3">Hello,<br>I'm having some problem with cropping and subsetting GRIB files.<br>I found lats4d script very useful for that, but there is some annoying error it makes - in the resulting GRIB file it writes the wrong variable names (while in the resulting CTL file they are correct).<br>
<br>For example, I'm taking the </font><font style="font-size:12pt" face="Arial" size="3">lfff00120000p GRIB file (attached, together with its CTL and IDX),<br>and it has 5 fields inside: fi, omega, relhum, t, u, v.<br>
You can see it in the attached</font><font style="font-size:12pt" face="Arial" size="3"> lfff00120000p.ctl</font><font style="font-size:12pt" face="Arial" size="3"> file, as well as by running "wgrib </font><font style="font-size:12pt" face="Arial" size="3">lfff00120000p"</font><font style="font-size:12pt" face="Arial" size="3">.<br>
Then I'm trying to extract only 2 fields, e.g. fi and t, to reduce the domain size, and t!
o dump the result into a new GRIB file.<br>To do that, I'm using the following command:<br></font><font style="font-size:12pt" face="Arial" size="3"><br></font><div>
<font style="font-size:12pt" face="Arial" size="3">
lats4d.sh -i lfff00120000p.ctl -o lfff00120000p_crop.grb -format grads_grib -lat 29 33.5 -lon 34 36 -vars fi t</font><font style="font-size:12pt" face="Arial" size="3"><br><br>This command generates 3 new files: </font><font style="font-size:12pt" face="Arial" size="3">lfff00120000p_crop.grb, </font><font style="font-size:12pt" face="Arial" size="3">lfff00120000p_crop.ctl and </font><font style="font-size:12pt" face="Arial" size="3">lfff00120000p_crop.gmp (attached as well)</font><font face="Arial">.</font><font face="Arial"><br>
</font><font style="font-size:12pt" face="Arial" size="3">The resulting GRIB file seems to be valid, and the CTL </font><font style="font-size:12pt" face="Arial" size="3">file looks absolutely fine!<br>But when I try to run "wgrib </font><font style="font-size:12pt" face="Arial" size="3">lfff00120000p_crop.grb", instead of fi & t, I see </font><font style="font-size:12pt" face="Arial" size="3">PRES & PRMSL<u></u><font style="font-size:12pt" face="Arial" size="3"> variables!<br>
My guess is, that the lats4d script is in some way unaware of the fact that the original GRIB file is encoded according to Offenbach (center code 78) GRIB table, but I don't know how to define it.<br><br>Any help would be highly appreciated!<br>
Thanks!<br>Alon.<br></font></font></div></div></div></blockquote><div><br></div><div>You may need to setup a LATS PARAMETER TABLE for your file; enter</div><div><br></div><div>% lats4d.sh -h</div><div><br></div><div>and read the section on LATS PARAMETER TABLES. Please notice that the LATS documentation page is no longer available at PCMDI. Use the way back machine instead:</div>
<div><br></div><div><a href="http://web.archive.org/web/20080920122353/http://www-pcmdi.llnl.gov/software/lats/">http://web.archive.org/web/20080920122353/http://www-pcmdi.llnl.gov/software/lats/</a></div><div><br></div><div>
Arlindo</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div dir="ltr"><div><font style="font-size:12pt" face="Arial" size="3"><font style="font-size:12pt" face="Arial" size="3"></font>
<font style="font-size:12pt" face="Arial" size="3"><br></font><font style="font-size:12pt" face="Arial" size="3">P. S. some aditional technical info, don't know if it's relevant:<br></font><font style="font-size:12pt" face="Arial" size="3">
lats4d Version 2.1.5</font><font style="font-size:12pt" face="Arial" size="3"><br></font><font style="font-size:12pt" face="Arial" size="3">
Grads v2.0.a9.oga.1</font><font style="font-size:12pt" face="Arial" size="3"><br></font><font style="font-size:12pt" face="Arial" size="3">
Ubuntu 10.04 x86_64</font><font style="font-size:12pt" face="Arial" size="3"><br></font></font></div>                                            </div></div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br>