[gradsusr] writing results & variables to a text file
Rowell, Mason D.
Mason.D.Rowell-1 at ou.edu
Wed Nov 23 17:36:08 EST 2011
Wesley,
Will command syntax like this work for wgrib as well (not wgrib2)? I have had instances of just wanting to extract one variable at one exact location but the wgrib documentation didn't have examples of how to do this (what options to use after wgrib) for a specific location.
Mason
________________________________________
From: gradsusr-bounces at gradsusr.org [gradsusr-bounces at gradsusr.org] on behalf of Wesley Ebisuzaki [Wesley.Ebisuzaki at noaa.gov]
Sent: Wednesday, November 23, 2011 12:43 PM
To: GrADS Users Forum
Subject: Re: [gradsusr] writing results & variables to a text file
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
>
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr
More information about the gradsusr
mailing list