Data and Graphics Manipulation Tools:
Below is a list of tools that are freely available and can be used to very successfully manipulate model data (WRF model data, as well as other GRIB and netCDF datasets).
Converting Graphics
Design WRF model domains.
Display ungrib (intermediate) files.
netCDF data
GRIB data
Model Verification
Converting Graphics
ImageMagick
ImageMagick is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and B_zier curves.
The software package is freely available from, http://www.imagemagick.org. Download and installation instructions are also available from this site.
Examples of converting data with ImageMagick software:
convert file.pdf file.png
convert file.png file.bmp
convert file.pdf file.gif
convert file.ras file.png
ImageMagick cannot convert ncgm (NCAR Graphics) file format to other file formats.
Converting ncgm (NCAR Graphics) file format
NCAR Graphics has tools to convert ncgm files to raster file format. Once files are in raster file format, ImageMagick can be used to translate the files into other formats.
For ncgm files containing a single frame, use ctrans.
ctrans -d sun file.ncgm file.ras
For ncgm files containing multiple frames, first use med (metafile frame editor) and then ctrans. med will create multiple single frame files called medxxx.ncgm
med -e '1,$ split $' file.ncgm
ctrans -d sun_ med001.ncgm > med001.ras
--- top ---
Design WRF model domains.
WPS/util/plotgrids.exe, can be used to display model domains before WPS/geogrid.exe is run.
This utility reads the domain setup from namelist.wps and creates an ncgm file that can be viewed with the NCAR Graphics command “idt”, e.g.,
idt gmeta
Read more about this utility in Chapter 3 of this Users Guide.
--- top ---
Display ungrib (intermediate) files.
WPS/util/plotfmt.exe, can be used to display intermediate files created by WPS/ungrib.exe.
If you have created intermediate files manually, it is a very good practice to use this utility to display the data in your files first before running WPS/metgrid/exe.
Note: If you plan on manually creating intermediate files, refer to http://www.mmm.ucar.edu/wrf/OnLineTutorial/Basics/IM_files/index.html for detailed information about the file formats and sample programs.
This utility reads intermediate files and creates an ncgm file that can be viewed with the NCAR Graphics command “idt”, e.g.,
idt gmeta
Read more about this utility in Chapter 3 of this Users Guide.
--- top ---
netCDF data
netCDF stands for network Common Data Form.
Most of the information below can be used for WRF netCDF data, as well as other netCDF datasets.
netCDF is one of the current supported data formats chosen for WRF I/O API.
Advantages of using netCDF?
Most graphical packages support netCDF file formats
netCDF files are platform-independent (big_endian / little_endian)
A lot of software already exists that can be used to process/manipulate netCDF data
Documentation:
http://www.unidata.ucar.edu/ (General netCDF documentation)
http://www.unidata.ucar.edu/software/netcdf/fguide.pdf (NETCDF User’s Guide for FORTRAN)
Utilities:
ncdump
Part of the netCDF libraries. Reads a netCDF file and prints information about the dataset. e.g.
ncdump –h file (prints header information)
ncdump –v VAR file (prints header information and the full field VAR)
ncdump –v Times file (a handy way to see how many times are available in a WRF output file)
ncview
Displays netCDF data graphically. No overlays, no maps and no manipulation of data possible.
http://meteora.ucsd.edu/~pierce/ncview_home_page.html
ncBrowse
Displays netCDF data graphically. Some overlays, maps and manipulation of data are possible.
http://www.epic.noaa.gov/java/ncBrowse/
read_wrf_nc
A utility to display basic information about WRF netCDF files.
iowrf
A utility to do some basic file manipulation on WRF-ARW netCDF files.
p_interp
A utility to interpolate WRF-ARW netCDF output files to user-specified pressure levels.
netCDF operators
http://nco.sourceforge.net/
Stand-alone programs that can be used to manipulate data (performing grid point averaging / file differencing / file ‘appending’). The following are examples of the available operators:
ncdiff
Difference two file, e.g.
ncdiff input1.nc input2.nc output.nc
ncrcat
Write specified variables / times to a new file, e.g.
ncrcat -v RAINNC wrfout* RAINNC.nc
ncrcat -d Time,0,231 –v RAINNC wrfout* RAINNC.nc
ncra
Average variables and write to a new file, e.g.
ncra -v OLR wrfout* OLR.nc
ncks (nc kitchen sink)
Combination of NCO tools all in one (handy: one tool for multiple operations).
--- top ---
GRIB data
Documentation
http://dss.ucar.edu/docs/formats/grib/gribdoc/ (Guide to GRIB 1)
http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc.shtml (Guide to GRIB2)
http://www.nco.ncep.noaa.gov/pmb/docs/grib2/GRIB2_parmeter_conversion_table.html (GRIB2 - GRIB1 parameter conversion table)
GRIB codes
It is important to understand the GRIB codes to know which fields are available in your dataset. For instance, NCEP uses the GRIB1 code 33 for the U-component of the wind, and 34 for the V-component. Other centers may use different codes, so always obtain the GRIB codes from the center from which you get your data.
GRIB2 uses 3 codes for each field - product, category and parameter.
We would most often be interested in product 0 (Meteorological products). Category refers to the type of field, e.g., category 0 is temperature, category 1 is moisture and category 2 is momentum. Parameter is the field number.
So whereas GRIB1 only uses code 33 for the U-component of the wind, GRIB2 will use 0,2,2, for the U-component, and 0,2,3 for the V-component.
Display GRIB header/field information
GRIB1 data
WPS/util/g1print.exe
wgrib (http://www.cpc.ncep.noaa.gov/products/wesley/wgrib.html)
GRIB2 data
WPS/util/g2print.exe
wgrib2 (http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/)
Convert GRIB1 data to netCDF format
ncl_grib2nc (http://www.ncl.ucar.edu/Document/Tools)
--- top ---
Model Verification
MET is designed to be a highly configurable, state-of-the-art suite of verification tools. It was developed using output from the Weather Research and Forecasting (WRF) modeling system but may be applied to the output of other modeling systems, as well.
MET provides a variety of verification techniques, including:
- Standard verification scores, comparing gridded model data to point-based observations
- Standard verification scores, comparing gridded model data to gridded observations
- Object-based verification method, comparing gridded model data to gridded observations
http://www.dtcenter.org/met/users/index.php
--- top ---
|