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-mem_del

wgrib2: -mem_del CW2


Wgrib2 supports memory files. Memory files are transient and only exist while wgrib2 is running. Memory files can be loaded prior to grib processing by the -mem_init option, writen to disk after grib processing by the -mem_final option and deleted during the processing phase by the -mem_del option. Memory files can be used with the wgrib2 utility but were designed for use by callable wgrib2 (CW2).

HPC and CW2

Memory files was designed to support the read and writing of grib files using CW2 in a HPC environment. Suppose you want to read a grib file with a 1000 grib messages. One CPU reads the grib file, divides it into 1000 grib messages and sends one grib message to 1000 different CPUS. Each of the CPUS is reponsible for reading 1 grib message. Each CPU receives a message (memory buffer) with a grib message and needs to decode that data. Rather than writing that grib message to disk, the CPU will write the grib message to memory file and then have wgrib2 decode the memory file, saving the metadata to another memory file and the grid data to a rpn register. The CPU can then get the metadata and grid from memory.


-mem_del N


The -mem_del option is intended for the use by callable wgrib2 so that memory files can be deleted and the memory freed.

See also: -mem_final, -mem_init,

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: Sep 3, 2016
Disclaimer Privacy Policy