Using GrADS with G-RSM output


G-RSM output is in GRIB format. We recommend GrADS software to read the data. GrADS Home
wgrib is a very useful tool for GRIB files. wgrib Home

  • Use grmap (in libs/etc) to create a control file from a GRIB file. (You may also use grib2ctl.pl, but I don't know it well.)
  • Use grmean (in libs/etc) to create time-mean files from GRIB files. The easiest way to use grmean is 1) create a text file (e.g. grmean_list.txt) with the paths to GRIB files you want to take the average for. One file per line. 2) $ grmean -s grmean_list.txt -o average.grib ; this will create a mean file "average.grib".
  • Use grvar_ver2 (in libs/etc) to calculate standard deviation from GRIB files. It works the same way as grmean.
  • If you edit a control file manually, you need to run gribmap (that comes with GrADS) to recreate the index file.
    • For example, type $ gribmap -i r_p.ctl , if you are reading forecast files.
    • Type $ gribmap -0 -i r_p.ctl , if you are reading time-mean files. -0 option ignores the forecast time. -0 is [minus zero]. -0 option is not necessary if you are working with original forecast output r_pgb.ftxxx. But if you created mean files (daily mean, monthly mean, etc) you will need -0 option to create correct ctl and idx files.
    • You can access multiple GRIB files by setting "options template" and using "%f2, %y4, %m2, %d2, %h2, etc" in the path to GRIB files in a ctl file. See GrADS Documentation for details.
    • You can also use "%f2, %y4, %m2, %d2, %h2 when using grmap to generate single ctl file for multiple grib files. (for example, grmap r_pgb.%y4%m2%d2%h2.ft%f2.grib). If the number of digit varies, use the smallest (i,e, %f2 refers to fxx, fxxx, fxxxx etc).
    • There are other grmap options. Type grmap to see options. Particularly useful one is -c[osu,noah], which generates ctl file with proper number of soil layers.

    ----

  • Having trouble displaying a domain that crosses lon=0 in polar stereographic projection? Change the line for xdef in your ctl file. Change the fourth column (after "linear") from "0" to "-180.000".



Note: grmean error on IBM was fixed. "len" function was replaced by "len_trim". Go to libs/etc/util_ibmsp. Type $ cvs update grmean.F. You will get a new grmean.F. Type $ make , which will recompile the new grmean.F. (Nov 11th, 2006)



Files related to questions:

griblst.in grmean.out - Provided by Sai Ming