source: lmdz_wrf/WRFV3/external/io_grib1/MEL_grib1/isdb.h @ 1

Last change on this file since 1 was 1, checked in by lfita, 10 years ago
  • -- --- Opening of the WRF+LMDZ coupling repository --- -- -

WRF: version v3.3
LMDZ: version v1818

More details in:

File size: 5.3 KB
Line 
1#ifndef ISDB_INCLUDE
2#define ISDB_INCLUDE
3
4#ifdef _NET_NEONS
5#include <nn_client.h>
6#endif /* _NET_NEONS */
7
8/* max value from rand; HW/OS dependent */
9#define MAX_RAND 2147483647.    /* SUN */               
10/* #define MAX_RAND 32767.      */              /* HP, Solaris */
11
12/* Vers 4.2.1 was installed 10/01/97 on Kelvin */
13#define NEONS_VRSN_MAJOR  4     /* major release version of NEONS software */
14#define NEONS_VRSN_MINOR  2     /* minor release version of NEONS software */
15#define NEONS_VRSN_MINOR2 1     /* (sub) minor release version of software */
16                                /* (for bug fixes)                         */
17
18#define BYTE_BIT_CNT  8         /* count of bits per byte */
19#define WORD_BIT_CNT  sizeof(long)*BYTE_BIT_CNT /* count of bits per word */
20#define WORD_BYTE_CNT 4         /* count of bytes per word */
21 
22#define OPN_RD    1             /* open database for read only */
23#define OPN_WR_RD 2             /* open database for write+read */
24
25#define MAX_FILE_CNT  15        /* maximum count of open files */
26
27#define ISDB_MODE   0666        /* mode for image files placed into db */
28#define LOCK_MODE   0200        /* mode for locking files while writing */
29#define INGEST_OWN "dba"        /* owner of image files before loaded in db */ 
30#define INGEST_MODE 0644        /* mode for ingest files before loaded in db */ 
31
32
33#define CLNDR_HOUR   0          /* calendar time, units = hours */
34#define CLIMO_DAY    1          /* climatology time, units = day in year */
35#define CLIMO_WEEK   2          /* climatology time, units = week in year */
36#define CLIMO_MONTH  3          /* climatology time, units = month in year */
37#define CLIMO_SEASON 4          /* climatology time, units = season in year */
38
39typedef struct {                /* date structure */
40   int year;                    /* year number since 0 BC */
41   int month;                   /* month number in year */
42   int day;                     /* day number in month */
43   int type;                    /* time coordinate type, default time type */
44                                /* is calendar time                        */
45} DATE;
46
47typedef struct {                /* info from table as_band */
48    long   chan_num;            /* channel number within sensor */
49    char   band_name[31];       /* name of band */
50    long   bit_cnt;             /* count of bits in pixel */
51    float  scl_fctr;            /* scaling factor */
52    float  reference;           /* reference value */
53    char   unit_name[31];       /* name of physical units */
54} AS_BAND;
55
56typedef struct {                /* info from tables grid_reg_geom/as_reg_im */
57    char   prjn_name[21];       /* projection name */
58    char   stor_dsc[21];        /* (+x in +y)/(+x in -y)/(-y in +x)/etc */ 
59    long   nx;                  /* count of columns */
60    long   ny;                  /* count of rows */
61    double lat;                 /* lat of origin in degrees */
62    double lon;                 /* lon of origin in degrees */
63#ifdef OLD_REG_GEOM
64    long orig_ix;               /* column # for origin, left column is 1 */
65    long orig_iy;               /* row # for origin; top row is 1 */
66    float x_int_dis;            /* distance interval between columns in km */
67    float y_int_dis;            /* distance interval between rows in km */
68    float parm_1;               /* geom parm 1, depends on projection */
69    float parm_2;               /* geom parm 2, depends on projection */
70    float parm_3;               /* geom parm 3, depends on projection */
71#else
72    double orig_ix;             /* column # for origin, left column is 1 */
73    double orig_iy;             /* row # for origin; top row is 1 */
74    double x_int_dis;           /* distance interval between columns in km */
75    double y_int_dis;           /* distance interval between rows in km */
76    double parm_1;              /* geom parm 1, depends on projection */
77    double parm_2;              /* geom parm 2, depends on projection */
78    double parm_3;              /* geom parm 3, depends on projection */
79#endif /* OLD_REG_GEOM */
80} REG_GEOM;
81
82typedef struct {                /* info from table as_sat_im */
83    long   bgn_lin_num;         /* beginning line number in orbit or pass */ 
84    long   bgn_smp_num;         /* beginning sample number in scan line */
85    long   lin_int;             /* lin interval relative to sensor scan mode */
86    long   smp_int;             /* smp interval relative to sensor scan mode */
87    float  roll_ang;            /* satellite roll angle in degrees */
88    float  pch_ang;             /* satellite pitch angle in degrees */
89    float  yaw_ang;             /* satellite yaw angle in degrees */
90} SAT_GEOM;
91
92typedef struct {                /* info from table grid_spct_geom */
93    char   stor_dsc[21];        /* (+x in +y)/(+x in -y)/(-y in +x)/etc */ 
94    char   trnc_type[21];       /* spectral truncation type (triangular/etc) */ 
95    long   coef_cnt;            /* count of complex coefficients used */ 
96    long   max_lat_wav_num;     /* max latitudinal wavenumber (M in GRIB) */
97    long   max_lon_wav_num_1;   /* max longitudinal wavenumber 1 (J in GRIB) */
98    long   max_lon_wav_num_2;   /* max longitudinal wavenumber 2 (K in GRIB) */
99} SPCT_GEOM;
100
101typedef struct {                /* info from table sat_oe */
102    char   seq_name[21];        /* orb-elem sequence name */
103    DATE   date;                /* date for orbital elements */
104    double hour;                /* hour of day for orbital elements */
105    double parm_1;              /* orb-elem parm 1 value */
106    double parm_2;              /* orb-elem parm 2 value */
107    double parm_3;              /* orb-elem parm 3 value */
108    double parm_4;              /* orb-elem parm 4 value */
109    double parm_5;              /* orb-elem parm 5 value */
110    double parm_6;              /* orb-elem parm 6 value */
111    double parm_7;              /* orb-elem parm 7 value */
112} ORB_ELEM;
113
114typedef struct {                /* bit-map structure */
115   short lin_cnt;               /* count of lines in bitmap */
116   short smp_cnt;               /* count of samples per line in bitmap */
117   short pad_bit_cnt;           /* count of bits for padding lines in bitmap */
118   short ofst_byte_cnt;         /* byte offset into bitmap array where actual
119                                   bitmap data begins */
120   unsigned char *bmap;         /* unsigned char array containing bitmap */
121} BITMAP;
122
123#endif  /* ISDB_INCLUDE */
Note: See TracBrowser for help on using the repository browser.