WRF-NMM Users Page

WRF Utility Programs



  • List the contents of a WRF input, output, restart, or boundary datasets.
  • Extract a field in wgrib text output format, also suitable for plotting using HMV.
  • Compare two WRF datasets and generate field-by-field difference statistics.
  • Supported formats include: NetCDF, Native binary, GRIB1 (use wgrib directly)

Necessary Software

NetCDF libraries needed for NetCDF version.

No additional libraries needed for native-binary version.

Distribution and compilation

diffwrf is distributed with WRF and built when WRF is configured and compiled.

  • diffwrf for NetCDF is external/io_netcdf/diffwrf
  • diffwrf for native binary I/O is external/io_int/diffwrf

Steps to Run Utility

  • To list the fields of a dataset

    diffwrf filename list

  • To extract all time frames of a field in ascii form and write to the file fort.88

    diffwrf filename fieldname [level]

    fieldname is the name of the field exactly as listed (case sensitive)

    level is an optional integer argument. If specified, only that level of a multi-level field will be output; otherwise, the entire field will be output

    Note that the resulting fort.88 output file may be plotted to a X-window display device using the HMV tool with the following command:

    hmv -3 fort.88

  • To difference two wrf datasets

    diffwrf filename1 filename2

    For each field in each time frame stored in the files, diffwrf will display RMS, L2, and point-max differences. Note that the files must match in other respects; the sizes, number, types, and time stamps of the fields must be the same in each file.