NCL Home > Documentation > Functions > WRF

wrf_uvmet

Rotates u,v components of the wind to earth coordinates.

Prototype

	function wrf_uvmet (
		u           : numeric,  
		v           : numeric,  
		lat         : numeric,  
		lon         : numeric,  
		cen_lon [1] : numeric,  
		cone    [1] : numeric   
	)

	return_val  :  float or double

Arguments

u

U,V components of the wind. The rightmost dimensions of these arrays are nz x ny x nx.

lat
lon

Latitude and longitude arrays, with rightmost dimensions ny x nx.

cen_lon

A scalar value. This is the standard longitude around which the domain is projected.

cone

A scalar value. The cone factor used in the model domain projection.

Return value

The return array will be U and V components of the wind rotated to earth coordinates. It will be a multi-dimensional array whose rightmost dimensions are 2 x nz x ny x nx. The first of which holds the U component of the wind, while the second holds the V component of the wind.

Description

The return variable will contain two attributes, the U and V components of the wind after they have been rotated to earth coordinates.

Rotated winds are needed when comparing model data with observations.

return_val@description = "u,v met velocity"
return_val@units = "m/s"

See Also

See the full list of WRF functions.

Examples

Example 1

The function wrf_user_getvar, (available in the $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl script) can also be used to calculate many diagnostics in one step.

  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
  uvm = wrf_user_getvar(a,"uvmet",time)         
        ; umet and vmet averaged to mass points
        ; This is a 4D array where
        ; uvm(0,:,:,:) is umet, and
        ; uvm(1,:,:,:) is vmet, and
        ; This function rotate winds to earth coord.