4 void get_hrap_coord(
double maximum_latitude,
double minimum_latitude,
double center_longitude)
20 char dbuf[200],kbuf[200];
25 float conv=.0174,totlat;
26 float dist,dist1,dist2,distance,
value;
27 float isohlat,isohlon;
28 int jj,latindex,lonindex;
30 int slider_size,scrollm,ivalue,increment,page_increment;
40 printf(
"could not allocate hrap_grid space\n");
45 pcp=(
struct pcp *) calloc(1,
sizeof(
struct pcp));
48 printf(
"could not allocate pcp space\n");
53 spf=(
struct pcp *) calloc(1,
sizeof(
struct pcp));
56 printf(
"could not allocate pcp space\n");
64 printf(
"could not allocate grid space\n");
70 maxi=-1;maxj=-1;mini=999999;minj=99999;
72 strcpy(dbuf,
"HRAP Coordinates\n");
76 XtVaGetValues(
scrollbar,XmNmaximum,&scrollm,NULL);
78 XmScrollBarGetValues(
scrollbar,&ivalue,&slider_size,
79 &increment,&page_increment);
81 XmScrollBarSetValues(
scrollbar,scrollm-slider_size,
82 slider_size, increment,page_increment,True);
88 totlat=maximum_latitude-minimum_latitude+2.0;
167 grid->
value=(
float **) calloc(maxi,
sizeof(
float *));
170 printf(
"could not allocate grid space\n");
175 pcp->
value=(
short int **) calloc(maxi,
sizeof(
short int *));
178 printf(
"could not allocate pcp space\n");
183 spf->
value=(
short int **) calloc(maxi,
sizeof(
short int *));
186 printf(
"could not allocate pcp space\n");
196 printf(
"no memory for hrap array\n");
201 for(
i=0;
i<maxi;
i++) {
208 printf(
"no memory for hrap array\n");
216 for(
i=0;
i<maxi;
i++) {
218 grid->
value[
i]=(
float *) calloc(maxj,
sizeof(
float));
222 printf(
"no memory for grid array\n");
229 for(
i=0;
i<maxi;
i++) {
231 pcp->
value[
i]=(
short int *) calloc(maxj,
sizeof(
short int));
235 printf(
"no memory for pcp array\n");
242 for(
i=0;
i<maxi;
i++) {
244 spf->
value[
i]=(
short int *) calloc(maxj,
sizeof(
short int));
248 printf(
"no memory for pcp array\n");
void get_hrap_coord(double maximum_latitude, double minimum_latitude, double center_longitude)
struct HRAP LatLongToHrap(float lat, float lon)
struct HRAP HrapToLatLong(struct HRAP hrap)
printf("fbuf is %s\n", fbuf)
char station_list_file[256]
struct hrap_grid * hrap_grid