[gradsusr] writing results & variables to a text file
Wesley Ebisuzaki
Wesley.Ebisuzaki at noaa.gov
Wed Nov 23 13:43:10 EST 2011
Alireza,
"If all you have is a hammer, everything looks like a nail."
Before trying to find a GrADS solution, consider whether GrADS is
the right tool.
(A) To find Washington DCs T2m for a single file, 1.grb2
wgrib2 1.txt -match ":TMP:" -match ":2 m above ground:" -s -lon -53
38 >1.txt
(B) Do the same for *.grb2 (only works for v0.1.9.3 5/2011 or later)
cat *.grb2 | wgrib2 - -match ":TMP:" -match ":2 m above ground:"
-s -lon -53 38 >all.txt
for older wgrib2: cat *.grb2 >tmp.grb2
wgrib2 tmp.grb2 -match ":TMP:" -match
":2 m above ground:" -s -lon -53 38 >all.txt
Wesley Ebisuzaki
Alireza Azargoun wrote:
> Dear GrADS users
> Hi everybody
>
> I have about 200 grib2 files ( 1.grb2 ~ 200.grb ) . i need to read a
> temperature of a city (lat, lon, lev, time are constant in all files)
> . how i can read this files using a while loop!? ( I receive this
> error when i write a while. Unknown Command: while )
> and how can i write these data to a text file!? I've searched all
> grads option for a command that writes variables in a text file! but i
> couldn't find it!
>
> Thanks in advance,
> Alireza
> Sharif University of Technology
>
>
> --
> Alireza Azargoun
> ------------------------------------------------------------------------
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
More information about the gradsusr
mailing list