Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # extract_grib2_pointdata.sh
  4. #
  5. # original script was coded by Takashi Unuma, Tsu local meteorological office, Japan Meteorological Agency
  6. # last modified: 22nd July 2017
  7. #
  8. # requirements:
  9. # wgrib2, sed, awk (gawk is also available)
  10. #
  11.  
  12. # specify grid point (x,y) of input file, which is able to obtain by typing as follows;
  13. # $ wgrib2 -llij [longitude] [latitude] grib2file
  14. longrid=583
  15. latgrid=561
  16.  
  17. # specify input grib2 file (for example, radar echo top data of JMA-RADAR)
  18. infile=Z__C_RJTD_20140813150000_RDR_JMAGPV_Gll2p5km_Phhlv_ANAL_grib2.bin
  19.  
  20. # execute
  21. # output data will be displayed in your terminal with the format of "YYYYMMDDHH (UTC) Echo top data [km]".
  22. 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