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

Interpolation/

get_gridparams.pro

1) extract from a NetCDF file the longitude, latitude, and their dimensions and make sure it is 1D or 2D arrays or 2) given longitude and latitude arrays get their dimensions and make sure they are 1D or 2D arrays

topget_gridparams Interpolation

get_gridparams, in1, in2, in3, in4, in5, in6, in7, in8, DOUBLE=DOUBLE

Parameters

in1        in required

Case 1: the name of the netcdf file Case 2: 1d or 2D arrays defining longitudes and latitudes. Out: the variable that will contain the longitudes

in2        in required

Case 1: the name of the variable that contains the longitude in the NetCDF file Case 2: 1d or 2D arrays defining longitudes and latitudes. Note that these arrays are also outputs and can therefore be modified. Out: the variable that will contain the latitudes

in3        in required

Case 1: the name of the variable that contains the latitude in the NetCDF file Case 2: the number of points in the longitudinal direction.

in4        out

Case 1: the number of points in the longitudinal direction Case 2: the number of points in the latitudinal direction

in5        out

Case 1: the number of points in the latitudinal direction Case 2: 1 or 2 to specify if lon and lat should be 1D (jpi or jpj) arrays or 2D arrays (jpi,jpj). Note that of n_dimensions = 1, then the grid must be regular (each longitudes must be the same for all latitudes and each latitudes should be the same for all longitudes).

in6        out

the variable that will contain the longitudes

in7        out

the variable that will contain the latitudes

in8        out

1 or 2 to specify if lon and lat should be 1D (jpi or jpj)

Keywords

DOUBLE       

use double precision to perform the computation

Examples

1) IDL> get_gridparams, file, lonname, latname, lon, lat, jpi, jpj, n_dimensions or 2) IDL> get_gridparams, lon, lat, jpi, jpj, n_dimensions 1) 1) IDL> ncdf_get_gridparams, 'coordinates_ORCA_R05.nc', 'glamt', 'gphit' $ , olon, olat, jpio, jpjo, 2 2) IDL> ncdf_get_gridparams, olon, olat, jpio, jpjo, 2

Version history

Version

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

History

November 2005: Sebastien Masson (smasson@lodyc.jussieu.fr)

Statistics

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