Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- # extract_grib2_pointdata.sh
- #
- # original script was coded by Takashi Unuma, Tsu local meteorological office, Japan Meteorological Agency
- # last modified: 22nd July 2017
- #
- # requirements:
- # wgrib2, sed, awk (gawk is also available)
- #
- # specify grid point (x,y) of input file, which is able to obtain by typing as follows;
- # $ wgrib2 -llij [longitude] [latitude] grib2file
- longrid=583
- latgrid=561
- # specify input grib2 file (for example, radar echo top data of JMA-RADAR)
- infile=Z__C_RJTD_20140813150000_RDR_JMAGPV_Gll2p5km_Phhlv_ANAL_grib2.bin
- # execute
- # output data will be displayed in your terminal with the format of "YYYYMMDDHH (UTC) Echo top data [km]".
- wgrib2 -ij ${longrid} ${latgrid} -s ${infile} 2> /dev/null | sed -e "s/\=/ /g" -e "s/:/ /g" | awk '{print $6,$4}'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement