README_WRF_NCL_SCRIPTS (20 December 2000, Bill Skamarock)
                         (Updated: May 08, 2001, wrfhelp)
                       (Updated: April 24, 2002, wrfhelp)
	     (Updated: September 26, 2005, Cindy Bruyere)

In this directory are NCL scripts that can be used to produce 2D plots
of wrf output. 

Beta Release:
	The NCL script have been entirely re-written to use
	high level NCL procedures and functions
	This release can process ARW input/output/static files
	as well as WRF-Var files 
	Input file for both single and double precision data
	can be processed
	
To run NCL with these scripts, you need NCL and NCAR GRAPHICS on your
system.  See README_NCL for specific information concerning how to
acquire and set up NCL and NCAR GRAPHICS for your system.
Also, there is more information about some of the functions and
procedures used by the user scripts in README_NCL.

---

NCL links in fortran shareable object files for computing some
diagnostic quantities and for performing interpolations.  Presently,
only one fortran object needs to be built - wrf_user_fortran_util_0.  
To build the fortran object, try running one of the make_ncl_fortran 
csh scripts that will build the shared-object library

"make_ncl_fortran wrf_user_fortran_util_0"

There are a few versions of this script for different architectures in
this directory.  More information about creating the shared objects
can be found at

http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclExtend.shtml

---

The following scripts are available:

-> for idealized cases:

wrf_bwave.ncl
wrf_grav2x.ncl
wrf_hill2d.ncl
wrf_qss.ncl
wrf_squall_2d_x.ncl
wrf_squall_2d_y.ncl

-> for real-data:

wrf_real.ncl		plot SLP, sfc precip, 850, 700, 500, 300 wind/temp
                        cross sections and skew-T diagrams
wrf_real_cloud.ncl	plot cloud parameters on selected model levels
wrf_real_input.ncl	plot input data

---

These scripts can be run by entering

"ncl < script_file"
(for newer NCL versions "ncl script_file" also works)

The scripts expect to find the wrf output file in the 
call to the function "addfile".  Edit the path to your wrfout file.

---

The scripts are ascii files, and they can be edited to change what is
plotted and where the output is directed.  


1.	Load additional scripts at the top of the script (before "begin"):

load "WRFOptions.ncl"	; set basic plot options here
load "gsn_code.ncl"	; High level NCL functions and procedures
load "WRFPlot.ncl"	; Special WRF funcrions and procedures
load "WRFUserARW.ncl"	; WRF diagnostics
load "SkewTFunc.ncl"	; Needed only if SkewT's are generated

2.	Point to the correct input file with "addfile"

  a = addfile("../WRFV2/run/wrfout_d01_2000-01-24_12:00:00.nc","r")

Your file name in this case will be 
	"../WRFV2/run/wrfout_d01_2000-01-24_12:00:00"
The ".nc" is NOT part of your file name, but is needed in the script 
to idently the fact that we are working with netCDF input files

3.	Indicate which type of output is needed:

;  type = "x11"
;  type = "pdf"
;  type = "ps"
;  type = "ncgm"

4.	Change the output file name:

  wks = gsn_open_wks(type,"wrf_real")

For this case the output file name will be "wrf_real"


5.	Name your plot

    res@MainTitle                   = "REAL-TIME WRF"

6.	Now you are ready to get variables and generate plots


---

Any 2D and 3D data in the WRF netcdf output files can be plotted.  The
NCL function "wrf_user_getvar" extracts data from the output files.
Variables in the output files are all in capital letters
(use "ncdump -h wrf_output_file | more" to view what is in the file).
Lower case variables are diagnostics that can be computed.
Currently we have diagnostics computed for the following named variables.

umet -> u wind (parallel to latitude line, used for skew-T plots)
vmet -> v wind (parallel to longitude line, used for skew-T plots)
u -> u horizontal velocity (m/s) 
v -> v horizontal velocity (m/s)
w -> w vertical velocity (m/s)
ua -> u averaged to mass (p) points. (the center point on the C grid)
va -> v averaged to mass (p) points. (the center point on the C grid)
wa -> w averaged to mass (p) points. (the center point on the C grid)
om -> transformed vertical velocity from model
th -> potential temperature (theta)
p  -> pressure (mb)
tc -> temperature (Celsius)
td -> dewpoint temperature (Celsius)
rh -> relative humidity

For any other variable "wrf_user_getvar" will look in the output file.
If a variable is not found, NCL will produce error messages and 
will not produce any more plots.

----------------------------------------------------------------