Computational Science Community Wiki

Using NCL And VAPOR For Post-Processing Of WRF-Chem Data

This page contains information on installing and using the post-processing programs NCL and VAPOR. The NCAR Command Language (NCL) is a programming language designed to read netcdf (.nc) format files and produce paper quality plots of the data. The Visualization and Analysis Platform for Ocean, atmosphere and solar Researchers (VAPOR) is a program useful for producing 3D visualisations and plots of WRF-Chem data. There are utilities for using both programs together to produce 3D VAPOR plots superimposed with projections of NCL plots.

Installing NCView, NCL and VAPOR

Using NCL

ncl <filename>.ncl

module swap PrgEnv-pgi PrgEnv-gnu
module load xe-ncl-gnu/5.1.1


Converting WRF netcdf files into vapor format

Before using VAPOR, the WRF-Chem netcdf files need to be converted into vapor format (vdc).

. /Applications/ 

wrfvdfcreate [options] <wrf_ncdf_files>.nc <vdffile>.vdf

wrf2vdf [options] <vdffile>.vdf <wrf_netcdf_files>.nc [options] minLon minLat maxLon maxLat

Full list of VAPOR terminal commands and syntax:

Example Conversion Commands

For converting selected chemical species into VAPOR format. Run in working directory containing wrfout files.

wrfvdfcreate -vars3d CCN1:CCN2:CCN3:CCN4:CCN5:CCN6:so4_a04:no3_a04:cl_a04:num_a04:nc4h10:benzene:hcho:c2h6:ho2:ho:c5h8:hcl:clno2:no2:no:o3:no3:co:ho:nh3:hno3:n2o5:QNDROP:QCLOUD:QRAIN wrfout* <vdffile>.vdf

<wrf2vdf vapor_folder_name>.vdf  wrfout* 

###     Script to generate 
# load vapor libraries

. /Applications/ 

# define links to data

# define which wrfout files to get (* for all)

# savename:

ls $WRF_dir$WRF_name

# List variables to extract. ":" deliminated. View vdfcreate.out for lon/lat points for getting map
wrfvdfcreate -vars3d BC1:BC2:OC1:OC2:P25:\
o3:no:no2:sulf:hno3:h2o2:ald:hcho:no3:co:ho:nh3:iso \
        $WRF_dir$WRF_name $VAPORDIR$SAVENAME &> vdfcreate.out


wrf2vdf $VAPORDIR$SAVENAME  $WRF_dir$WRF_name

Using NCL with VAPOR