11 extern struct time_cntl
tc;
12 extern struct fgroup_info
fg[20];
26 int i,ii,
j,
k,kk,last_per;
34 struct fmaz_struct fmaz[100];
43 if(snow_toggle_item_set < 1 || snow_toggle_item_set >= 7)
53 if(strlen(fmaz[
j].fmazid))
61 if(
tc.period==1) h=10;
62 if(
tc.period==2) h=16;
63 if(
tc.period==3) h=22;
72 sprintf(tmp_file,
"rsel_fg.%d%d%d.%d%d%d",
75 if((
fp = fopen (tmp_file,
"w")))
80 if( strlen(fmaz[
j].fmazid) &&
81 (!strcmp(fmaz[
j].pos,
"O") || !strcmp(fmaz[
j].pos,
"U"))
84 if(strcmp(fg_last,fmaz[
j].fgroupid))
89 if(!strcmp(
fg[
k].
id,fmaz[
j].fgroupid))
91 "%02d%02d%02d%02dPST %02d%02d%02d%02dPST\n",
92 fg[
k].desc,m,d,y,h,vm,vd,vy,vh);
94 strcpy(fg_last,fmaz[
j].fgroupid);
112 for(
k=0;
k<=last_per;
k++)
120 for(kk=
k;kk<=
k+1;kk++)
122 if(strcmp(fmaz[
j].per[kk].
qual,
"M"))
124 fhz=fhz+fmaz[
j].per[kk].amt;
131 rsel=100*((int)(10*(fhz+.0499)))+hz2rsel;
140 if(!((
k+1)%4) &&
k != last_per)
153 if((
fp = fopen (tmp_file,
"r")))
156 if (!(
text = XtMalloc ((
unsigned)(len+1))))
158 sprintf (line,
"%s: XtMalloc(%ld) failed", len, tmp_file);
165 len_actual=fread (
text,
sizeof (
char), len,
fp);
166 text[len_actual] = 0;
169 sprintf (line,
"Click 'Save as *' to store as '* File'");
175 sprintf(line,
"rm %s",tmp_file);
180 sprintf(line,
"Couldn't open temp file %s",tmp_file);
189 sprintf(line,
"Couldn't open temp file %s",tmp_file);
197 sprintf(line,
"No Freezing Level forecasts in table fmaqtrly to read.");
int adj_time(int adj, int y, int m, int d, int h, int *adj_y, int *adj_m, int *adj_d, int *adj_h)
struct fgroup_info fg[20]
int create_rsel2_file(int remove)
int fmaz_load(struct fmaz_struct *fmaz)
sprintf(fbuf,"/usr/mapper/nexrad/ngrid.%02d-%02d-%02d-%02d", year, month, day, hour)
fprintf(fp,"%d %d %d %d 1\n", iminx, iminy, maxi, maxj)