|
FORTRAN integer gdxyfll, ier ier = gdxyfll(gdid, x, y, lat, lon, n) integer gdid, n real x(n), y(n), lat(n), lon(n) |
|
C int c_gdxyfll(int gdid, float *x, float *y, float *lat, float *lon, int npts) |
Routine description
|
gdxyfll computes, on grid gdid, the x-y coordinates of the points defined at lat-lon positions defined in lat() and lon(). The coordinates are returned in the FORTRAN convention, where the first grid point is at (1,1) and the last is at (ni, nj). |
Description of parameters
|
gdid |
a valid grid identifier (returned by ezqkdef or ezgdef) that will be used as the source (input) grid. |
|
x,y |
Position of the points on the grid, in grid coordinates. |
|
lat, lon |
Stream of latitude and longitude points. |
|
n |
Number of points |
?
Sample FORTRAN code :
The following code computes the grid coordinates, on a GEM grid, of 3 lat-lon points. Assume necessary memory space has been allocated.
datev = -1
etiket = ' '
typvar = ' '
nomvar = 'GZ'
ip1 = 500
ip2 = 0
ip3 = -1
iun = 13
*** read fld info and data
key = FSTINF(iun, NI, NJ, NK, datev, etiket, ip1, ip2, ip3, typvar, nomvar)
ier = FSTPRM(key, DATEO, DEET, NPAS, NI, NJ, NK, NBITS, DATYP, IP1,
$ IP2, IP3, TYPVAR, NOMVAR, ETIKET, GRTYP, IG1, IG2, IG3,
$ IG4, SWA, LNG, DLTF, UBC, EX1, EX2, EX3)
*** Define input grid
gdgem = ezqkdef(nigem,njgem ,'Z',ig1, ig2, ig3, ig4, iun)
*** Define latlon values and wind speed/directions
lat(1) = 45.73
lon(1) = -73.75
lat(2) = 43.40
lon(2) = -79.38
lat(3) = 49.18
lon(3) = -123.18
ier = gdxyfll(gdgem, x, y, lat, lon, 3)
Go to the list of functions, or the general index.