|
|
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 filenames and then open and read one at a time. Note we read met_em files, but the concept applies to all WRF ARW files.
wrf_metgrid3.ncl
In this script note:
- By making use of the NCL function systemfunc, we obtain a list of the files we are interested in;
- Then we open each file with addfile;
- Obtaining fields from each file is similar to having a single input file.
wrf_metgrid4.ncl
- Make sure that all plots have the same contour intervals (opts@Contourparameters);
- 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
- 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;
- Now we can simply use one call to wrf_user_getvar to get all the time periods;
- Note we now have to be careful to pass a single file to wrf_contour and wrf_map_overlays.
|