3 static const char _Cn5[] =
"loop_fcst";
4 static const char _Cn4[] =
"loop_area_sens";
5 static const char _Cn3[] =
"loop_seg";
6 static const char _Cn2[] =
"loop_fg";
7 static const char _Cn1[] =
"qfg";
15 #include <sys/types.h>
33 extern struct fgroup_info
fg[20];
34 extern struct time_cntl
tc;
41 int loop_fcst_err,loop_fg_err,loop_seg_err,loop_area_sens_err;
47 #line 36 "map_load.ec"
48 #line 37 "map_load.ec"
50 char fgroupid[9], segid[9], rfs_id[9], wfo_resp[4];
51 char drain[2], pos[2], cgroup[2];
52 char pe1[2], pe2[2], dur[2], t[2], s[2], e[2], p[2];
54 char qz00[2], qz06[2], qz12[2], qz18[2];
57 int vcal_yr, vmon, vzday, vhour;
60 float z00, z06, z12, z18;
64 #line 49 "map_load.ec"
70 #line 51 "map_load.ec"
72 #line 51 "map_load.ec"
73 static const char *sqlcmdtxt[] =
74 #line 51 "map_load.ec"
76 #line 51 "map_load.ec"
77 "set isolation to dirty read",
80 #line 51 "map_load.ec"
81 static ifx_statement_t _SQ0 = {0};
82 #line 51 "map_load.ec"
83 sqli_stmt(ESQLINTVERSION, &_SQ0, sqlcmdtxt, 0, (ifx_sqlvar_t *)0, (
struct value *)0, (ifx_literal_t *)0, (ifx_namelist_t *)0, (ifx_cursor_t *)0, -1, 0, 0);
84 #line 51 "map_load.ec"
98 sprintf(query,
"select fgroupid "
103 sprintf(query,
"select fgroupid "
105 "where fgroupid matches \"%s\"",
112 #line 75 "map_load.ec"
114 #line 75 "map_load.ec"
115 sqli_prep(ESQLINTVERSION,
_Cn1, query,(ifx_literal_t *)0, (ifx_namelist_t *)0, -1, 0, 0 );
116 #line 75 "map_load.ec"
128 #line 83 "map_load.ec"
130 #line 83 "map_load.ec"
131 sqli_curs_decl_dynm(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn2, 512),
_Cn2, sqli_curs_locate(ESQLINTVERSION,
_Cn1, 513), 0, 0);
132 #line 83 "map_load.ec"
143 #line 90 "map_load.ec"
145 #line 90 "map_load.ec"
146 sqli_curs_open(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn2, 768), (ifx_sqlda_t *)0, (
char *)0, (
struct value *)0, 0, 0);
147 #line 90 "map_load.ec"
164 #line 103 "map_load.ec"
166 #line 103 "map_load.ec"
167 static ifx_sqlvar_t _sqobind[] =
169 { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
170 #line 103 "map_load.ec"
172 static ifx_sqlda_t _SD0 = { 1, _sqobind, {0}, 1, 0 };
173 static _FetchSpec _FS1 = { 0, 1, 0 };
174 #line 103 "map_load.ec"
175 _sqobind[0].sqldata = fgroupid;
176 sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn2, 768), (ifx_sqlda_t *)0, &_SD0, (
char *)0, &_FS1);
177 #line 103 "map_load.ec"
189 #line 108 "map_load.ec"
191 #line 111 "map_load.ec"
192 static const char *sqlcmdtxt[] =
193 #line 111 "map_load.ec"
195 #line 111 "map_load.ec"
196 "select segid , segnum from fgroup_seg where fgroupid = ? order by segnum",
199 #line 111 "map_load.ec"
200 static ifx_sqlvar_t _sqibind[] =
202 { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
203 #line 111 "map_load.ec"
205 static ifx_sqlda_t _SD0 = { 1, _sqibind, {0}, 1, 0 };
206 #line 111 "map_load.ec"
207 _sqibind[0].sqldata = fgroupid;
208 #line 111 "map_load.ec"
209 sqli_curs_decl_stat(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn3, 512),
_Cn3, sqlcmdtxt, &_SD0, (ifx_sqlda_t *)0, 0, (ifx_literal_t *)0, (ifx_namelist_t *)0, 2, 0, 0);
210 #line 111 "map_load.ec"
221 #line 118 "map_load.ec"
223 #line 118 "map_load.ec"
224 sqli_curs_open(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn3, 768), (ifx_sqlda_t *)0, (
char *)0, (
struct value *)0, 0, 0);
225 #line 118 "map_load.ec"
242 #line 131 "map_load.ec"
244 #line 131 "map_load.ec"
245 static ifx_sqlvar_t _sqobind[] =
247 { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
248 { 102,
sizeof(segnum), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
249 #line 131 "map_load.ec"
251 static ifx_sqlda_t _SD0 = { 2, _sqobind, {0}, 2, 0 };
252 static _FetchSpec _FS1 = { 0, 1, 0 };
253 #line 131 "map_load.ec"
254 _sqobind[0].sqldata = segid;
255 #line 131 "map_load.ec"
256 _sqobind[1].sqldata = (
char *) &segnum;
257 sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn3, 768), (ifx_sqlda_t *)0, &_SD0, (
char *)0, &_FS1);
258 #line 131 "map_load.ec"
282 #line 136 "map_load.ec"
284 #line 151 "map_load.ec"
285 static const char *sqlcmdtxt[] =
286 #line 151 "map_load.ec"
288 #line 151 "map_load.ec"
289 "select id , pe1 , pe2 , dur , t , s , e , p , drain , area_sens . pos , cgroup , rfs_id , wfo_resp , size_mi2 , pos_order from area_sens , pos where segid = ? and pe1 = \"P\" and pe2 = \"P\" and dur = \"Q\" and t = \"P\" and s = ? and e = \"Z\" and p = \"Z\" and area_sens . pos = pos . pos order by id , pos_order desc",
292 #line 151 "map_load.ec"
293 static ifx_sqlvar_t _sqibind[] =
295 { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
296 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
297 #line 151 "map_load.ec"
299 static ifx_sqlda_t _SD0 = { 2, _sqibind, {0}, 2, 0 };
300 #line 151 "map_load.ec"
301 _sqibind[0].sqldata = segid;
302 #line 151 "map_load.ec"
303 _sqibind[1].sqldata = src;
304 #line 151 "map_load.ec"
305 sqli_curs_decl_stat(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn4, 512),
_Cn4, sqlcmdtxt, &_SD0, (ifx_sqlda_t *)0, 0, (ifx_literal_t *)0, (ifx_namelist_t *)0, 2, 0, 0);
306 #line 151 "map_load.ec"
317 #line 158 "map_load.ec"
319 #line 158 "map_load.ec"
320 sqli_curs_open(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn4, 768), (ifx_sqlda_t *)0, (
char *)0, (
struct value *)0, 0, 0);
321 #line 158 "map_load.ec"
333 while(!loop_area_sens_err)
341 #line 171 "map_load.ec"
343 #line 174 "map_load.ec"
344 static ifx_sqlvar_t _sqobind[] =
346 { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
347 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
348 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
349 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
350 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
351 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
352 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
353 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
354 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
355 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
356 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
357 { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
358 { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
359 { 102,
sizeof(size_mi2), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
360 { 102,
sizeof(pos_order), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
361 #line 174 "map_load.ec"
363 static ifx_sqlda_t _SD0 = { 15, _sqobind, {0}, 15, 0 };
364 static _FetchSpec _FS1 = { 0, 1, 0 };
365 #line 174 "map_load.ec"
366 _sqobind[0].sqldata = areaid;
367 #line 174 "map_load.ec"
368 _sqobind[1].sqldata = pe1;
369 #line 174 "map_load.ec"
370 _sqobind[2].sqldata = pe2;
371 #line 174 "map_load.ec"
372 _sqobind[3].sqldata = dur;
373 #line 174 "map_load.ec"
374 _sqobind[4].sqldata = t;
375 #line 174 "map_load.ec"
376 _sqobind[5].sqldata = s;
377 #line 174 "map_load.ec"
378 _sqobind[6].sqldata = e;
379 #line 174 "map_load.ec"
380 _sqobind[7].sqldata = p;
381 #line 174 "map_load.ec"
382 _sqobind[8].sqldata = drain;
383 #line 174 "map_load.ec"
384 _sqobind[9].sqldata = pos;
385 #line 174 "map_load.ec"
386 _sqobind[10].sqldata = cgroup;
387 #line 174 "map_load.ec"
388 _sqobind[11].sqldata = rfs_id;
389 #line 174 "map_load.ec"
390 _sqobind[12].sqldata = wfo_resp;
391 #line 174 "map_load.ec"
392 _sqobind[13].sqldata = (
char *) &size_mi2;
393 #line 174 "map_load.ec"
394 _sqobind[14].sqldata = (
char *) &pos_order;
395 sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn4, 768), (ifx_sqlda_t *)0, &_SD0, (
char *)0, &_FS1);
396 #line 174 "map_load.ec"
400 if(!loop_area_sens_err)
405 strcpy(
map[num_maps].fgroupid,fgroupid);
406 strcpy(
map[num_maps].segid,segid);
407 strcpy(
map[num_maps].areaid,areaid);
408 strcpy(
map[num_maps].drain,drain);
409 strcpy(
map[num_maps].pos,pos);
410 strcpy(
map[num_maps].cgroup,cgroup);
412 "%s%s%s%s%s%s%s",pe1,pe2,dur,t,s,e,p);
413 strcpy(
map[num_maps].mapid,rfs_id);
414 strcpy(
map[num_maps].wfo_resp,wfo_resp);
415 map[num_maps].size_mi2=size_mi2;
419 map[num_maps].per[
i].amt=0.;
420 strcpy(
map[num_maps].per[
i].
qual,
"M");
421 strcpy(
map[num_maps].per[
i].src,s);
429 &vcal_yr,&vmon,&vzday,&vhour);
431 adj_time(24,vcal_yr,vmon,vzday,vhour,
432 &vcal_yr,&vmon,&vzday,&vhour);
444 #line 211 "map_load.ec"
446 #line 218 "map_load.ec"
447 static const char *sqlcmdtxt[] =
448 #line 218 "map_load.ec"
450 #line 218 "map_load.ec"
451 "select z00 , z06 , z12 , z18 , qz00 , qz06 , qz12 , qz18 from maqtrly where id = ? and drain = ? and pos = ? and cgroup = ? and pe1 = ? and pe2 = ? and dur = ? and t = ? and s = ? and e = ? and p = ? and cal_yr = ? and mon = ? and zday = ?",
454 #line 218 "map_load.ec"
455 static ifx_cursor_t _SQ0 = {0};
456 static ifx_sqlvar_t _sqibind[] =
458 { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
459 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
460 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
461 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
462 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
463 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
464 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
465 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
466 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
467 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
468 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
469 { 102,
sizeof(vcal_yr), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
470 { 102,
sizeof(vmon), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
471 { 102,
sizeof(vzday), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
472 #line 218 "map_load.ec"
474 static ifx_sqlvar_t _sqobind[] =
476 { 104,
sizeof(z00), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
477 { 104,
sizeof(z06), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
478 { 104,
sizeof(z12), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
479 { 104,
sizeof(z18), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
480 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
481 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
482 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
483 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
484 #line 218 "map_load.ec"
486 #line 218 "map_load.ec"
487 _sqibind[0].sqldata = areaid;
488 #line 218 "map_load.ec"
489 _sqibind[1].sqldata = drain;
490 #line 218 "map_load.ec"
491 _sqibind[2].sqldata = pos;
492 #line 218 "map_load.ec"
493 _sqibind[3].sqldata = cgroup;
494 #line 218 "map_load.ec"
495 _sqibind[4].sqldata = pe1;
496 #line 218 "map_load.ec"
497 _sqibind[5].sqldata = pe2;
498 #line 218 "map_load.ec"
499 _sqibind[6].sqldata = dur;
500 #line 218 "map_load.ec"
501 _sqibind[7].sqldata = t;
502 #line 218 "map_load.ec"
503 _sqibind[8].sqldata = src;
504 #line 218 "map_load.ec"
505 _sqibind[9].sqldata = e;
506 #line 218 "map_load.ec"
507 _sqibind[10].sqldata = p;
508 #line 218 "map_load.ec"
509 _sqibind[11].sqldata = (
char *) &vcal_yr;
510 #line 218 "map_load.ec"
511 _sqibind[12].sqldata = (
char *) &vmon;
512 #line 218 "map_load.ec"
513 _sqibind[13].sqldata = (
char *) &vzday;
514 #line 218 "map_load.ec"
515 _sqobind[0].sqldata = (
char *) &z00;
516 #line 218 "map_load.ec"
517 _sqobind[1].sqldata = (
char *) &z06;
518 #line 218 "map_load.ec"
519 _sqobind[2].sqldata = (
char *) &z12;
520 #line 218 "map_load.ec"
521 _sqobind[3].sqldata = (
char *) &z18;
522 #line 218 "map_load.ec"
523 _sqobind[4].sqldata = qz00;
524 #line 218 "map_load.ec"
525 _sqobind[5].sqldata = qz06;
526 #line 218 "map_load.ec"
527 _sqobind[6].sqldata = qz12;
528 #line 218 "map_load.ec"
529 _sqobind[7].sqldata = qz18;
530 #line 218 "map_load.ec"
531 sqli_slct(ESQLINTVERSION, &_SQ0,sqlcmdtxt,14,_sqibind,8,_sqobind,0,(ifx_literal_t *)0,(ifx_namelist_t *)0,0);
532 #line 218 "map_load.ec"
536 printf(
"%s %s%s%s %s%s%s%s%s%s%s %d %d "
537 "%5.2f/%s %5.2f/%s %5.2f/%s %5.2f/%s "
539 areaid,drain,pos,cgroup,pe1,pe2,dur,t,src,e,p,
540 vmon,vzday,z00,qz00,z06,qz06,z12,qz12,z18,qz18,
545 if(!strcmp(qz00,
"M")) z00=0.;
546 if(!strcmp(qz06,
"M")) z06=0.;
547 if(!strcmp(qz12,
"M")) z12=0.;
548 if(!strcmp(qz18,
"M")) z18=0.;
551 map[num_maps].per[0].amt=z18;
552 strcpy(
map[num_maps].per[0].
qual,qz18);
556 map[num_maps].per[1+4*(
i-1)].amt=z00;
557 strcpy(
map[num_maps].per[1+4*(
i-1)].
qual,qz00);
558 map[num_maps].per[2+4*(
i-1)].amt=z06;
559 strcpy(
map[num_maps].per[2+4*(
i-1)].
qual,qz06);
560 map[num_maps].per[3+4*(
i-1)].amt=z12;
561 strcpy(
map[num_maps].per[3+4*(
i-1)].
qual,qz12);
564 map[num_maps].per[4+4*(
i-1)].amt=z18;
565 strcpy(
map[num_maps].per[4+4*(
i-1)].
qual,qz18);
572 #line 254 "map_load.ec"
574 #line 254 "map_load.ec"
575 sqli_curs_close(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn5, 768));
576 #line 254 "map_load.ec"
581 #line 254 "map_load.ec"
583 #line 254 "map_load.ec"
584 sqli_curs_free(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn5, 770));
585 #line 254 "map_load.ec"
600 #line 264 "map_load.ec"
602 #line 264 "map_load.ec"
603 sqli_curs_close(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn4, 768));
604 #line 264 "map_load.ec"
609 #line 264 "map_load.ec"
611 #line 264 "map_load.ec"
612 sqli_curs_free(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn4, 770));
613 #line 264 "map_load.ec"
620 #line 266 "map_load.ec"
622 #line 266 "map_load.ec"
623 sqli_curs_close(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn3, 768));
624 #line 266 "map_load.ec"
629 #line 266 "map_load.ec"
631 #line 266 "map_load.ec"
632 sqli_curs_free(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn3, 770));
633 #line 266 "map_load.ec"
640 #line 268 "map_load.ec"
642 #line 268 "map_load.ec"
643 sqli_curs_close(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn2, 768));
644 #line 268 "map_load.ec"
649 #line 268 "map_load.ec"
651 #line 268 "map_load.ec"
652 sqli_curs_free(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn2, 770));
653 #line 268 "map_load.ec"
662 #line 274 "map_load.ec"
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)
sprintf(fbuf,"/usr/mapper/nexrad/ngrid.%02d-%02d-%02d-%02d", year, month, day, hour)
printf("fbuf is %s\n", fbuf)
int map_load(struct map_struct *map)
struct fgroup_info fg[20]