Skip Navigation Links 
NOAA logo - Click to go to the NOAA home page National Weather Service   NWS logo - Click to go to the NWS home page
Climate Prediction Center

About Us
   Our Mission
   Who We Are

Contact Us
   CPC Information
   CPC Web Team

HOME > Monitoring_and_Data > Oceanic and Atmospheric Data > Reanalysis: Atmospheric Data > wgrib2-udf

wgrib2: -udf


The -udf option is only available when the UDF (User Defined Function) extension is installed. The -udf option runs a shell command (arg1) and then sets the grid point so to contends of a binary file (arg2).



STRING is a shell command
FILE is a binary file which contains the contents of grid points

Some functions can be written in RPN and others are more conveniently writen is a language like C for Fortran. The idea behind UDF is that the input file to the user define function is prepared while scanning the grib file. When the input file is complete, the user defined function is called. If the user defined function returns no results, then the -sys option is used to run the user defined function otherwise -udf is used.


The UDF options may not work in windows.

The use of the UDF options is limited and the UDF options should, IMHO, not be enabled unless the UDF options are needed.

See alse: -udf_arg, -udf,

NOAA/ National Weather Service
National Centers for Environmental Prediction
Climate Prediction Center
5830 University Research Court
College Park, Maryland 20740
Climate Prediction Center Web Team
Page last modified: May 15, 2005
Disclaimer Privacy Policy