Last modified: Mon, 06/19/2017 - 11:09
CURV_TO_RECT (V, mapping)
Applies the mapping computed by function CURV_TO_RECT_MAP to interpolate data from a curvilinear to a rectilinear latitude-longitude grid. This computation employs a spherical interpolation code written at GFDL; the Ferret developers are responsible for its implementation as an external function.
Arguments: |
V |
Variable on the source curvilinear grid |
mapping |
mapping from the source grid to a rectilinear grid |
|
Result Axes: |
X |
Inherited from mapping |
Y |
Inherited from mapping |
|
Z |
Inherited from V |
|
T |
Inherited from V |
This is a grid-changing function. Indicate limits on the argument axes with square brackets []. See the note on grid-changing functions in Chapter 3
Example of calls to CURV_TO_RECT_MAP and CURV_TO_RECT:
yes? use my_curvilinear_data.nc yes? show data currently SET data sets: 1> /.my_curvilinear_data.nc (default) name title I J K L GEOLON geographic longitude of grid 1:180 1:173 ... ... GEOLAT geographic latitude of grid 1:180 1:173 ... ... SALT salinity 1:180 1:173 1:30 1:12 AIRT air temperature 1:180 1:173 1:30 1:12 yes? ! For convenience define variables with curvilinear grid yes? let lonin = geolon[d=1] yes? let latin = geolat[d=1] yes? ! Define output grid and a variable on the rectilinear output grid yes? define axis/x=0:360:5/modulo/units=degrees xax yes? def axis/y=0:85:5/units=degrees yax ! This is a dummy variable on the rectilinear grid yes? let lonlatout = y[gy=yax] + x[gx=xax] yes? ! Compute the mapping to the rectangular grid, save to a file yes? let map = curv_to_rect_map ( lonin,latin,lonlatout,10) yes? save/clobber/file=curv_map.nc map yes? ! Apply the mapping to the data fields yes? cancel var/all yes? use curv_map.nc yes? let out_salt = curv_to_rect(salt[d=1,K=1,L=2], map[d=2])yes? shade out_salt yes? let out_airt = curv_to_rect(airt[d=1], map[d=2]) yes? save/file=air_on_rect.nc out_airt