Update version info for release v4.6.1 (#2122)
[WRF.git] / external / io_grib1 / MEL_grib1 / gribfuncs.h
blob42207e457d541278644aec50c0ed4bb175191152
1 #include <stdio.h>
2 #include "grib.h" /* all gribs structs */
3 #include "input.h" /* GEOM+IN, DATA+INPUT, USER_INPUT */
5 /* check Compiler, prototypes needed for ANSI-C */
7 /*#if defined( __cplusplus ) || defined( __STDC__ ) || defined( __GNUC__ )*/
8 /* Changed by Todd Hutchinson to force the need for PROTOTYPE */
9 #if 1
11 #define PROTOTYPE_NEEDED 1
13 int Expand_gribhdr (GRIB_HDR *, long, char *);
14 int prt_badmsg (GRIB_HDR *gh, char *errmsg);
15 int make_grib_log (char *,char *,unsigned long,long,PDS_INPUT,
16 grid_desc_sec,BDS_HEAD_INPUT,BMS_INPUT,float *,char *);
17 int FTP_getfile (char *,char *,char *);
18 int apply_bitmap (BMS_INPUT *,float **,float,BDS_HEAD_INPUT *,char *);
19 int create_inpLambert (GEOM_IN,void **,char *);
20 int create_inpLatlon (GEOM_IN,void **,char *);
21 void create_inpPDS (DATA_INPUT,USER_INPUT,PDS_INPUT *);
22 int create_inpPolar (GEOM_IN,void **,char *);
23 void display_gribhdr (GRIB_HDR *hdr);
24 void free_gribhdr (GRIB_HDR **);
25 void gbyte (char *,unsigned long *,unsigned long *,unsigned long);
26 void gbyte_quiet (char *,unsigned long *,unsigned long *,unsigned long);
27 int grib_dec (char *,PDS_INPUT *,grid_desc_sec *,BDS_HEAD_INPUT *,
28 BMS_INPUT *,float **,char *);
29 int grib_enc (DATA_INPUT,USER_INPUT,GEOM_IN,float *,GRIB_HDR *,char *);
30 float grib_ibm_local(unsigned long ibm_float);
31 int grib_seek (char *,long *,int,GRIB_HDR *,char *);
32 int grib_fseek (FILE *, long *, int, GRIB_HDR *, char *);
34 int gribgetbds (char *,short,BMS_INPUT *,grid_desc_sec *,float **,
35 BDS_HEAD_INPUT *, char *);
36 int gribgetbms (char *,BMS_INPUT *,int,unsigned long,char *);
37 int gribgetgds (char *,grid_desc_sec *,char *);
38 int gribgetpds (char *,PDS_INPUT *,char *);
39 int gribhdr2file (GRIB_HDR *,FILE *,char *);
40 int gribhdr2filed (GRIB_HDR *, int , char *);
42 int gribputbds (USER_INPUT,long,short,float *,BDS_HEAD_INPUT *,
43 GRIB_HDR **,char *);
44 int gribputgds (GEOM_IN,GDS_HEAD_INPUT *,void **,GRIB_HDR **,char *);
45 int gribputpds(DATA_INPUT,USER_INPUT,PDS_INPUT *,GRIB_HDR**,char *);
46 void hdr_print (char *,unsigned char *,int );
47 void init_dec_struct (PDS_INPUT *,grid_desc_sec *,BMS_INPUT *,BDS_HEAD_INPUT *);
48 void init_enc_struct (DATA_INPUT *,GEOM_IN *,USER_INPUT *);
49 int init_gribhdr (GRIB_HDR **,char *);
50 void init_struct (void *, int);
51 int inp2grib_Lambert (void **,LAMBERT *,long *,char *);
52 int inp2grib_Latlon (void **,LATLON *,long *,char *);
53 int inp2grib_PDS (PDS_INPUT *,PDS_GRIB **,char *);
54 int inp2grib_PolarSt (void **,POLAR *,long *,char *);
55 int create_inpMercator (GEOM_IN , void **, char *);
56 int inp2grib_Mercator (void **, MERCATOR *,long *, char *);
57 int ld_dec_lookup (char *,char *);
58 int ld_enc_config (char *,USER_INPUT *,char *);
59 int ld_enc_ffinfo (char *, DATA_INPUT *,char *);
60 int ld_enc_geomfile (char *,GEOM_IN *,char *);
61 int ld_enc_ieeeff (char *,float *,int,char *);
62 int ld_enc_lookup (char *,char *);
63 int ld_grib_origctrs (char *,char *,char *);
64 unsigned long grib_local_ibm (double local_float);
65 void make_default_grbfn (DATA_INPUT,USER_INPUT,char *);
66 int map_lvl (char *,DATA_INPUT *,float *,float *,char *);
67 int map_parm (char *,DATA_INPUT *,float *,float *,char *);
68 int pack_spatial (long *,unsigned short *,float *,float *,
69 unsigned long **,short,long *,char *);
70 void prt_inp_struct (PDS_INPUT *,grid_desc_sec *, BMS_INPUT *,
71 struct BDS_HEAD_INPUT *,float **);
72 void upd_child_errmsg (char *,char *);
73 void w3ft33_(float *ain,float **out, int *nsflag);
75 void set_bytes(long in, int numbytes, char *out);
76 void set_bytes_u(unsigned long in, int numbytes, unsigned char *out);
77 int grib_unthin(float *in,float *out,int *rowsizes, int ysize, int *xsize);
79 #else
80 #define PROTOTYPE_NEEDED 0
82 int Expand_gribhdr ();
83 int prt_badmsg ();
84 int make_grib_log ();
85 int FTP_getfile ();
86 int apply_bitmap ();
87 int create_inpLambert ();
88 int create_inpLatlon ();
89 void create_inpPDS ();
90 int create_inpPolar ();
91 void display_gribhdr ();
92 void free_gribhdr ();
93 void gbyte ();
94 void gbyte_quiet ();
95 int grib_dec ();
96 int grib_enc ();
97 float grib_ibm_local();
98 int grib_seek ();
99 int gribgetbds ();
100 int gribgetbms ();
101 int gribgetgds ();
102 int gribgetpds ();
103 int gribhdr2file ();
104 int gribputbds ( );
105 int gribputgds ();
106 int gribputpds();
107 void hdr_print ();
108 void init_dec_struct ();
109 void init_enc_struct ();
110 int init_gribhdr ();
111 void init_struct ();
112 int inp2Grib_Lambert ();
113 int inp2grib_Latlon ();
114 int inp2grib_PDS ();
115 int inp2grib_PolarSt ();
116 int ld_dec_lookup ();
117 int ld_enc_config ();
118 int ld_enc_ffinfo ();
119 int ld_enc_geomfile ();
120 int ld_enc_ieeeff ();
121 int ld_enc_lookup ();
122 int ld_grib_origctrs ();
123 unsigned long grib_local_ibm ();
124 void make_default_grbfn ();
125 int map_lvl ();
126 int map_parm ();
127 int pack_spatial ();
128 void prt_inp_struct ();
129 void upd_child_errmsg ();
130 #endif