NCL Home > Documentation > Functions > Lat/Lon functions


Converts from lat/lon to UTM using a specified datum.


	function latlon2utm (
		latlon  : numeric,  
		datum   : integer   

	return_val [dimsizes(latlon)] :  float or double



An array containing lat/lon coordinates. The leftmost dimension must be 2, with the 0-th dimension being the latitude values and the 1-th dimension being the longitude values.


A scalar integer indicating which datum to use.

Return value

A float or double array of the same size as latlon with values containing the lat/lon values.


This function converts lat/lon values to UTM coordinates, given a specified datum. The grid zones will be returned as an attribute of the return value called "grid_zone".

The recognized datums are:

  • 0 = CLARKE_1866_DATUM
  • 1 = GRS_80_DATUM
  • 2 = WGS_84_DATUM
If any missing values are encountered in latlon, missing values will be returned in the same locations in the return array.

If an invalid datum is input, then all missing values will be returned.

See Also



Example 1

  latlon = (/34.113, -119.331/)

  xy = latlon2utm(latlon,0)   ; 285039.99,3776960.12