Interpolation/
get_gridparams.pro
Case 1: extract from a NetCDF file longitude and latitude arrays, their dimensions
and make sure it is 1D or 2D arrays
Case 2: given longitude and latitude arrays, get their dimensions and make
sure they are 1D or 2D arrays
get_gridparams
Interpolation
get_gridparams, in1, in2, in3, in4, in5, in6, in7, in8, DOUBLE=scalar: 0 or 1
Parameters
in1
in
required
Case 1: name or the id (returned by ncdf_open) of the netcdf file
Case 2: 1D or 2D arrays defining longitudes, will be forced to have
n_dimensions dimensions when returned
in2
in
required
Case 1: name of the variable containing the longitude in the NetCDF file
Case 2: 1D or 2D arrays defining latitudes, will be forced to have
n_dimensions dimensions when returned
in3
Case 1: name of the variable containing the latitude in the NetCDF file
Case 2: returned number of points in longitudinal direction.
in4
out
Case 1: returned longitudes array, with n_dimensions dimensions
Case 2: returned number of points in latitudinal direction
in5
Case 1: returned latitudes array, with n_dimensions dimensions
Case 2: input scalar (1 or 2) to specify if lon and lat should be returned
as 1D or 2D arrays. Note that if n_dimensions = 1, the grid must be
regular (longitude and latitudes can be described as 1D arrays).
in6
out
Case 1: returned number of points in longitudinal direction.
in7
out
Case 1: returned number of points in latitudinal direction
in8
in
Case 1: input scalar (1 or 2) to specify if lon and lat should be returned
as 1D or 2D arrays. Note that if n_dimensions = 1, the grid must be
regular (longitude and latitudes can be described as 1D arrays).
Keywords
DOUBLE
type: scalar: 0 or 1
default: 0
activate to force double precision for lon/lat arrays
Examples
Case 1:
IDL> get_gridparams, file name/id, lonname, latname, lon, lat, jpi, jpj, n_dimensions
Case 2:
IDL> get_gridparams, lon, lat, jpi, jpj, n_dimensions
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 379 2008-09-03 15:32:14Z smasson $
History
November 2005: Sebastien Masson (smasson@lodyc.jussieu.fr)
Produced by IDLdoc 2.0.