<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

Interpolation/

fromirr.pro

interpolate data from an irregular 2D grid to any 2D grid. Only 1 metod available: bilinear

topfromirr interpolation

result = fromirr(method, datain, lonin, latin, mskin, lonout, latout, mskout, WEIG=WEIG, ADDR=ADDR)

Return value

2D array: the interpolated data

Parameters

method        in required

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

datain        in required

a 2D array the input data to interpolate

lonin        in required

a 2D array defining the longitude of the input data

latin        in required

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

mskin        in required

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

lonout        in required

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

latout        in required

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

mskout        in required

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

Keywords

WEIG       

(see ADDR)

ADDR       

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 whithout computing again those 2 parameters. This greatly speed-up the interpolation! In that case, lonin, latin, lonout and latout are not necessary.

Examples

dataout = fromirr(method, datain [, lonin, latin, mskin, lonout, latout, mskout]) tncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout) or t1ncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout $ , WEIG = a, ADDR = b) help, a, b t2ncep = fromirr('bilinear', topa, WEIG = a, ADDR = b)

Version history

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.