Graphics: NCL - Example

These are example scripts showing how to deal with multiple input files. There are different ways to do this. Below are examples in which we first get a list of file names and then open and read one at a time. Note: these examples show how we read met_em files, but the concept applies to all WRF ARW files.

wrf_metgrid3.ncl

In this script note:

    1. By making use of the NCL function systemfunc, we obtain a list of the files we are interested in;
    2. Then we open each file with addfile;
    3. Obtaining fields from each file is similar to having a single input file.

wrf_metgrid4.ncl

    1. Make sure that all plots have the same contour intervals (opts@Contourparameters);
    2. Convert data from Pa to hPa - note the header on the plots change automatically since we set slp@units to reflect this change.

wrf_metgrid8.ncl

  1. For this example we still use the NCL function systemfunc, to obtain a list of files, but now we open them all at once with addfiles;
  2. Now we can simply use one call to wrf_user_getvar to get all the time periods;
  3. Note we now have to be careful to pass a single file to wrf_contour and wrf_map_overlays.