NCL Website header
NCL Home> Application examples> Models || Data files for some examples

Example pages containing: tips | resources | functions/procedures


Contours Only

The purpose of this page is to show some very basic scripts for creating contour plots of WRF variables using gsn_csm_contour. In some cases, for example, for debug purposes, a simple contour plot without a map or lat/lon coordinates is desired.

Some variables are read directly from the WRF output file, while others are read via wrf_user_getvar.

For more meaningful plots of WRF data, see the WRF-ARW Online Tutorial.

WRF_cn_1.ncl: A simple contour plot of the pressure field at a specific time and level.

The default contour plot is a black-and-white line contour plot. Setting cnFillOn to True turns on color fill.

WRF_cn_2.ncl: This creates an eta-longitude cross-section at a specific time and latitude.

The gsn_csm_contour graphical interface recognizes certain "units" attributes (eg, "degrees_north" and "degrees_east") that conform to the COARDS, CSM and CF netCDF convention and will label the axis appropriately.

To emphasize contours of different sign, the BlReWh color map is specified. To obtain the desired effect, symMinMaxPlt is used to determine the appropriate contour limits.
WRF_cn_3.ncl: Creates an eta-latitude cross-section at a specific time and longitude.

sprintf allows the user to control the label format.
WRF_cn_4.ncl: An eta-time contour plot that requires dimension reordering to reshape the data.

lbOrientation = "vertical", changes the label bar orientation.