grid.h 2.05 KB
Newer Older
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef _GRID_H
#define _GRID_H


typedef struct {
  int     self;
  int     type;                   /* grid type                      */
  int     prec;                   /* grid precision                 */
  int    *mask;
  double *xvals;
  double *yvals;
  double *area;
  double *xbounds;
  double *ybounds;
  double  xfirst, yfirst;
  double  xlast, ylast;
  double  xinc, yinc;
18
  double  lcc_originLon;          /* Lambert Conformal Conic        */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
19
20
21
22
23
24
  double  lcc_originLat;
  double  lcc_lonParY;
  double  lcc_lat1;
  double  lcc_lat2;
  double  lcc_xinc;
  double  lcc_yinc;
25
26
  int     lcc_projflag;
  int     lcc_scanflag;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
27
  int     lcc_defined;
28
29
30
31
32
33
  double  lcc2_lon_0;             /* Lambert Conformal Conic 2      */
  double  lcc2_lat_0;
  double  lcc2_lat_1;
  double  lcc2_lat_2;
  double  lcc2_a;
  int     lcc2_defined;
34
35
36
37
  double  laea_lon_0;             /* Lambert Azimuthal Equal Area   */
  double  laea_lat_0;
  double  laea_a;
  int     laea_defined;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
38
  double  xpole, ypole, angle;    /* rotated north pole             */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
39
  int     isCyclic;               /* TRUE for global cyclic grids   */
Uwe Schulzweida's avatar
Uwe Schulzweida committed
40
41
42
43
44
45
46
47
48
49
50
51
  int     isRotated;              /* TRUE for rotated grids         */
  int     xdef;                   /* 0: undefined 1:xvals 2:x0+xinc */
  int     ydef;                   /* 0: undefined 1:yvals 2:y0+yinc */
  int     nd, ni, ni2, ni3;       /* parameter for GRID_GME         */
  int     trunc;                  /* parameter for GRID_SPECTEAL    */
  int     nvertex;
  int    *rowlon;
  int     nrowlon;
  int     size;
  int     xsize;
  int     ysize;
  int     locked;
52
  int     lcomplex;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
53
54
55
56
57
58
59
60
61
  char    xname[256];
  char    yname[256];
  char    xlongname[256];
  char    ylongname[256];
  char    xstdname[256];
  char    ystdname[256];
  char    xunits[256];
  char    yunits[256];
}
62
grid_t;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
63
64
65
66
67
68
69
70
71


const double *gridInqXvalsPtr(int gridID);
const double *gridInqYvalsPtr(int gridID);

double *gridInqXboundsPtr(int gridID);
double *gridInqYboundsPtr(int gridID);
const double *gridInqAreaPtr(int gridID);

72
73
int gridCompare(int gridID, grid_t grid);
int gridGenerate(grid_t grid);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
74
75

#endif