[gradsusr] WGRIB2

Wesley Ebisuzaki - NOAA Federal wesley.ebisuzaki at noaa.gov
Thu Apr 28 09:51:30 EDT 2016


Alvin,

You might want to consider learning about regular expressions (regex).
They are used in a
number of computer languages and many utilities.  I had a little fun and
wrote the regex on one line.

wgrib2 in.grb -match ":((U|V)GRD:10 m above
ground|PRMSL|(ABSV|HGT|UGRD|VGRD|TMP):(850|700|500) mb):" -grib out.grb

For readability, I would use a slower version

wgrib2 in.grb -match ":(UGRD:10 m above ground|VGRD:10 m above
ground|PRMSL):" -grib out.grb
wgrib2 in.grb -match ":(HGT|UGRD|VGRD|TMP):(850|700|500) mb:" -append -grib
out.grb

Wesley


On Thu, Apr 28, 2016 at 3:42 AM, J43 <webmaster at meteorologic.net> wrote:

> Hi,
>
> Use the command -match, wgrib2 -s  FullGrib.grb2 -match "(:HGT:500
> mb:|:VGRD:10 m above ground:|:TMP:850 mb:)" -grib_out MinIGribFile.grb2
>
> To have a level and variable, make a simple index with a command -s :
> wgrib2 -s FullGrib.grb2
>
> Best regards,
>
> Jérémy
>
>
> Le 28/04/2016 à 09:36, Alvin Pura a écrit :
>
> Dear all,
>
> I have grib2 to files, but only wanted to select the following variables @
> 850, 700 and 500 mb.
>
> 1. ABSV
> 2.HGT
> 3. PRMSL
> 4. UGRD
> 5. UGRD:10m
> 6. VGRD
> 7. VGRD:10m
> 8. TMP
>
> I am successful using wgrib2 but cant figure out how to limit the
> variables only for  850, 700 and 500mb level.
>
> Thanks.
>
>
> *Alvin *
>
>
>
> _______________________________________________
> gradsusr mailing listgradsusr at gradsusr.orghttp://gradsusr.org/mailman/listinfo/gradsusr
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160428/af6d015f/attachment.html 


More information about the gradsusr mailing list