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

Interpolation/

compute_fromirr_bilinear_weigaddr.pro

compute the weight and address needed to interpolate data from an "irregular 2D grid" (defined as a grid made of quadrilateral cells) to any grid using the bilinear method

topcompute_fromirr_bilinear_weigaddr Interpolation

compute_fromirr_bilinear_weigaddr, olonin, olat, omsk, alonin, alat, amsk, weig, addr

Parameters

olonin        in required type: 2d array

longitude of the input data

olat        in required type: 2d array

latitude of the input data

omsk        in required type: 2d array or -1

land/sea mask of the input data put -1 if input data are not masked

alonin        in required type: 2d array

longitude of the output data

alat        in required type: 2d array

latitude of the output data

amsk        in required type: 2d array or -1

land/sea mask of the output data put -1 if output data are not masked

weig        out type: 2d array

(see ADDR)

addr        out 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, jpia, jpja, /over)

Version history

Version

$Id: compute_fromirr_bilinear_weigaddr.pro 232 2007-03-20 16:59:36Z pinsard $

History

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

Known issues

Restrictions

- the input grid must be an "irregular 2D grid", defined as a grid made of quadrilateral cells which corners positions are defined with olonin and olat - We supposed the data are located on a sphere, with a periodicity along the longitude - to perform the bilinear interpolation within quadrilateral cells, we first morph the cell into a square cell and then compute the bilinear interpolation. - if some corners of the cell are land points, their weight is set to 0 and the weight is redistributed on the remaining "water" corners - points located out of the southern and northern boundaries or in cells containing only land points are set the the same value as their closest neighbor

Statistics

McCabe cyclic 37
McCabe essential 1
McCabe modular design 1
Produced by IDLdoc 2.0.