Previous SAXO Documentation Assistant: Overview Next

Interpolation/

fromirr.pro

interpolate data from an irregular 2D grid to any 2D grid. Only 1 method available = bilinear

fromirr Interpolation

result = fromirr(method, datain[, lonin][, latin][, mskin][, lonout][, latout], mskout, WEIG=2d array, ADDR=2d array)

Return value

2D array the interpolated data

Parameters

method        in required type: string

a string defining the interpolation method. must be 'bilinear'

datain        in required type: 2d array

a 2D array the input data to interpolate

lonin        in optional type: 2d array

a 2D array defining the longitude of the input data

latin        in optional type: 2d array

a 2D array defining the latitude of the input data.

mskin        in optional type: 2d array

a 2D array, the land-sea mask of the input data (1 on ocean, 0 on land)

lonout        in optional type: 1d or 2d array

1D or 2D array defining the longitude of the output data.

latout        in optional type: 1d or 2d array

1D or 2D array defining the latitude of the output data.

mskout        in required type: 2d array

a 2D array, the land-sea mask of the output data (1 on ocean, 0 on land)

Keywords

WEIG        type: 2d array

(see ADDR)

ADDR        type: 2d array

2D arrays, weig and addr are the weight and addresses used to perform the interpolation: dataout = total(weig*datain[addr], 1) dataout = reform(dataout, jpio, jpjo, /over) Those keywords can be set to named variables (that are undefined or equal to 0) into which the values will be copied when the current routine exits. Next, they can be used to perform the interpolation without computing again those 2 parameters. This greatly speed-up the interpolation! In that case, lonin, latin, lonout and latout are not necessary.

Examples

IDL> tncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout) or IDL> t1ncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout $ , WEIG = a, ADDR = b) IDL> help, a, b IDL> t2ncep = fromirr('bilinear', topa, WEIG = a, ADDR = b)

Version history

Version

$Id: fromirr.pro 163 2006-08-29 12:59:46Z navarro $

History

June 2006: Sebastien Masson (smasson@lodyc.jussieu.fr)

Known issues

Restrictions

We supposed the data are located on a sphere, with a periodicity along the longitude. Note that the input data can contain the same cells several times (like ORCA grid near the north pole boundary)

 


  Produced by IDLdoc 2.0 on Wed Sep 13 16:32:13 2006.