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

PopLatLon

Regrids a scalar variable on a POP grid to a lat/lon grid or vice-versa.

Prototype

	procedure PopLatLon (
		x          : numeric,  
		grd_src    : string,   
		grd_dst    : string,   
		method     : string,   
		area_type  : string,   
		date       : string    
	)

	return_val  :  numeric

Arguments

x

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", "1.9x2.5"

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_REMAP to indicate where the weight files reside on your system:

    export NCL_POP_REMAP=/xxx/yyy/zzz
or

    setenv NCL_POP_REMAP /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

PopLatLonV, 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.