wrf_user_getvar
Extracts data from ARW WRF model output, and does basic diagnostics calculations.
Available in version 4.3.1 or later.
Prototype
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" function wrf_user_getvar ( wks : graphic, variable : string, time : integer ) return_val : numeric
Arguments
wksAn NCL Workstation identifier. The identifier is one returned either from calling gsn_open_wks or calling create to create a Workstation object.
variableVariable to retrieve. This can be either a variable in the ARW WRF output file, or a diagnostics.
timeTime in file to retrieve.
Return value
Data of requested field.
Description
This function extracts data from the ARW WRF file, and, if available, calculates requested diagnostic.
For WRF variable names and their definitions, you can easily check them by using "ncl_filedump":
ncl_filedump wrfout_d01_2000-01-24_12:00:00.nc
Available diagnostics:
pressure: Full model pressure [hPa] rh: Relative Humidity [%] slp: Sea level pressure [hPa] td2: 2m dew point temperature [C] td: Dew point temperature [C] tc: Temperature [C] th: Potential temperature [K] tk: Temperature [K] ua: U component of wind on mass points va: V component of wind on mass points wa: W component of wind on mass points uvmet: U and V components of wind rotated to earth coordinates z: Full geopotemtial height [m]
wrf_user_getvar is part of a library of functions and procedures in WRFUserARW.ncl written to help users plot ARW WRF model data.
WRF-related questions should be sent to wrfhelp@ucar.edu.
See Also
See the full list of WRF functions.
Examples
Example 1
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" a = addfile("wrfout_d01_2000-01-24_12:00:00.nc","r") time = 1 slp = wrf_user_getvar(a,"slp",time) ; slp tc2 = wrf_user_getvar(a,"T2",time) ; T2 in Kelvin u10 = wrf_user_getvar(a,"U10",time) ; u at 10 m v10 = wrf_user_getvar(a,"V10",time) ; v at 10 m ua = wrf_user_getvar(a,"ua",time) ; u on mass points va = wrf_user_getvar(a,"va",time) ; v on mass points