3 /* The value used to fill missing data points */
4 #define FILL_VALUE -9999999.
29 BDS_HEAD_INPUT
*bds_head
;
56 char name
[STRINGSIZE
];
57 char comment
[STRINGSIZE
];
62 GribTableEntry
*parms
;
73 char prjnmm
[24], stordsc
[24];
75 float origlat
, origlon
, origx
, origy
;
76 float xintdis
, yintdis
, parm1
, parm2
, parm3
;
77 } GRIB_PROJECTION_INFO_DEF
;
79 /* Public function definitions */
81 int rg_setup_gribmap(GribParameters
*gribmap
, char file
[]);
82 int rg_gribmap_parameter(GribParameters
*gribmap
, char name
[], int table
,
83 GribTableEntry
*gribmap_parms
);
84 void rg_free_gribmap_elements(GribParameters
*gribmap
);
86 int rg_setup_gribinfo(GribInfo
*gribinfo
, char files
[][STRINGSIZE
],
88 int rg_setup_gribinfo_f(GribInfo
*gribinfo
, FILE *fp
, int use_fcst
);
89 int rg_setup_gribinfo_i(GribInfo
*gribinfo
, int fid
, int use_fcst
);
91 int rg_get_index(GribInfo
*gribinfo
, FindGrib
*find_grib
);
93 int rg_get_index_guess(GribInfo
*gribinfo
, FindGrib
*findgrib
, int guess_index
);
95 int rg_get_indices(GribInfo
*gribinfo
, FindGrib
*find_grib
, int *indices
);
97 int rg_init_findgrib(FindGrib
*findgrib
);
99 int rg_get_grib_header(GribInfo
*gribinfo
, int index
, PDS_INPUT
*pds
,
100 grid_desc_sec
*gds
,BMS_INPUT
*bms
);
102 int rg_num_elements(GribInfo
*gribinfo
);
104 void rg_free_gribinfo_elements(GribInfo
*gribinfo
);
106 int rg_get_numrows(GribInfo
*gribinfo
,int index
);
108 int rg_get_numcols(GribInfo
*gribinfo
,int index
);
110 int rg_get_level1(GribInfo
*gribinfo
, int index
);
112 int rg_get_level2(GribInfo
*gribinfo
, int index
);
114 int rg_get_center_id(GribInfo
*gribinfo
, int index
);
116 int rg_get_subcenter_id(GribInfo
*gribinfo
, int index
);
118 int rg_get_proc_id(GribInfo
*gribinfo
, int index
);
120 int rg_get_tblversion(GribInfo
*gribinfo
, int index
);
122 float rg_get_point(GribInfo
*gribinfo
, int index
, float column
, float row
);
124 int rg_get_points(GribInfo
*gribinfo
, int index
, PointData
*pointdata
,
127 int rg_get_offset(GribInfo
*gribinfo
, int index
);
129 int rg_get_end(GribInfo
*gribinfo
, int index
);
131 int rg_get_valid_time(GribInfo
*gribinfo
, int index
, char valid_time
[]);
133 int rg_get_data(GribInfo
*gribinfo
, int index
, float **data
);
135 int rg_get_data_1d(GribInfo
*gribinfo
, int index
, float *data
);
137 int rg_write_grib(PDS_INPUT
*pds
, grid_desc_sec
*gds
, char filename
[],
139 int rg_fwrite_grib(PDS_INPUT
*pds
, grid_desc_sec
*gds
, float **data
,
144 /* The following are public functions also. However, the interface to many
145 * of them needs to be reworked. For example, it is not possible to specify
146 * a secondary height or forecast time with many of them.
147 * Note: As of 11/11/04, the functions listed above have already been reworked.
150 int rg_get_pressure_levels(GribInfo
*gribinfo
, int dates
[], int centuries
[],
151 int parm_id
[], int finallevels
[],int min_pres
,
153 int rg_get_msl_indices(GribInfo
*gribinfo
, char dates
[][STRINGSIZE
],
154 int centuries
[], int usParm_id
[],int usLevel_id
[],
155 int usHeight1
[],int infactor
[],int numparms
,
156 int grib_index
[],int outfactor
[]);
157 int rg_get_grib(GribInfo
*gribinfo
, int index
,int scale
,
158 float **grib_out
,int *vect_comp_flag
,
159 GRIB_PROJECTION_INFO_DEF
*Proj
, BDS_HEAD_INPUT
*bds_head
);
160 int rg_get_dates(GribInfo
*gribinfo
,int usParm_id
[],int usLevel_id
[],
161 int usHeight1
[],int numparms
,int dates
[],int century
[],
163 int rg_get_index_near_date(GribInfo
*gribinfo
,char targetdate
[STRINGSIZE
],
164 int century
,int hours_before
,int hours_after
,
165 int usParm_id
[],int usLevel_id
[],int usHeight1
[],
167 int rg_get_date(GribInfo
*gribinfo
,int index
);
168 int rg_get_century(GribInfo
*gribinfo
,int index
);
169 int rg_get_forecast_time(GribInfo
*gribinfo
,int index
);