NCL Home > Documentation > Functions > Regridding, CESM, Oceanography

PopLatLonV

Converts vectors on a POP grid to a lat/lon grid and vice-versa.

Prototype

	procedure PopLatLonV (
		u          : numeric,  
		v          : numeric,  
		grd_src    : string,   
		grd_dst    : string,   
		method     : string,   
		area_type  : string,   
		date       : string    
	)

	return_val  :  numeric

Arguments

u

The 3- or 4-dimensional variable to be regridded. Typically, the variable has dimensions like (time,lat,lon) or (time,lev,lat,lon).

v

The 3- or 4-dimensional variable to be regridded. Typically, the variable has dimensions like (time,lat,lon) or (time,lev,lat,lon).

grd_src

String specifying the POP model grid: eg, "gx1v3"

grd_dst

String specifying the output grid: eg, "1x1d"

method

String specifying the method used to interpolate/regrid. There are two choices: "bilin" or "aave".

area_type

String specifying the area: "da" or "fa"

date

String specifying the date the weight file was generated: eg, "010808"

Description

The conversion of lat/lon grids to the POP grid is limited by the existence of the grid files and the associated weight files. See the POP weight files page for more details.

You can set the environment variable NCL_POP_REMAPV to indicate where the weight files reside on your system:

    export NCL_POP_REMAPV=/xxx/yyy/zzz
or

    setenv NCL_POP_REMAPV /xxx/yyy/zzz

For historical reasons, the substrings are used to create the name of the weight file to be used. (The weight file is not generated by NCL.)

For more robust regridding, see the ESMF regridding examples, which show how to regrid data from and to rectilinear, curvilinear, or unstructured grids. Available in version 6.1.0 and later.

See Also

PopLatLon, ESMF_regrid

Examples

This function requires that following libraries be loaded prior to invoking the function:

     load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" 
     load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/popRemap.ncl" 

See the examples on the "Pop==>Lat/Lon" applications page for examples on how to use this function.