Thanks to Ms Zarrin . but I don't understand NCL language very well.<br><br>Dear wesley! using wgrib was a great idea ! thanks a lot<br><br><div class="gmail_quote"><br><br>On Wed, Nov 23, 2011 at 10:13 PM, Wesley Ebisuzaki <span dir="ltr"><<a href="mailto:Wesley.Ebisuzaki@noaa.gov">Wesley.Ebisuzaki@noaa.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Alireza,<br>
<br>
"If all you have is a hammer, everything looks like a nail."<br>
<br>
Before trying to find a GrADS solution, consider whether GrADS is<br>
the right tool.<br>
<br>
<br>
(A) To find Washington DCs T2m for a single file, 1.grb2<br>
<br>
wgrib2 1.txt -match ":TMP:" -match ":2 m above ground:" -s -lon -53<br>
38 >1.txt<br>
<br>
<br>
(B) Do the same for *.grb2 (only works for v0.1.9.3 5/2011 or later)<br>
<br>
cat *.grb2 | wgrib2 - -match ":TMP:" -match ":2 m above ground:"<br>
-s -lon -53 38 >all.txt<br>
<br>
<br>
for older wgrib2: cat *.grb2 >tmp.grb2<br>
wgrib2 tmp.grb2 -match ":TMP:" -match<br>
":2 m above ground:" -s -lon -53 38 >all.txt<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Wesley Ebisuzaki<br>
</font></span><div><div class="h5"><br>
<br>
<br>
Alireza Azargoun wrote:<br>
> Dear GrADS users<br>
> Hi everybody<br>
><br>
> I have about 200 grib2 files ( 1.grb2 ~ 200.grb ) . i need to read a<br>
> temperature of a city (lat, lon, lev, time are constant in all files)<br>
> . how i can read this files using a while loop!? ( I receive this<br>
> error when i write a while. Unknown Command: while )<br>
> and how can i write these data to a text file!? I've searched all<br>
> grads option for a command that writes variables in a text file! but i<br>
> couldn't find it!<br>
><br>
> Thanks in advance,<br>
> Alireza<br>
> Sharif University of Technology<br>
><br>
><br>
> --<br>
> Alireza Azargoun<br>
</div></div>> ------------------------------------------------------------------------<br>
<div class="HOEnZb"><div class="h5">><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>
<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Alireza Azargoun<br>