Daily_QC
new_write_qpf_grids.c
Go to the documentation of this file.
1 
2 #include "prototypes.h"
3 
4 void write_qpf_grids(char *fname)
5 
6 {
7 
8 FILE *fp;
9 extern struct hrap_grid *hrap_grid;
10 extern struct pcp *pcp;
11 int i,j;
12 
13 fp=fopen(fname,"w");
14 
15 if(fp==NULL) {
16 
17  printf("could not open %s\n",fname);
18 
19  exit(1);
20 
21  }
22 
23 iflag=1;
24 
25 fprintf(fp,"%d %d %d %d %d\n",
27  iflag);
28 
29 for(i=0;i<hrap_grid->maxi;i++) {
30 
31 for(j=0;j<hrap_grid->maxj;j++) {
32 
33  fprintf(fp," %5d",pcp->value[i][j]/10);
34 
35  }
36 }
37 
38 fclose(fp);
39 
40 return;
41 
42 }
43 
struct pcp * pcp
Definition: daily_qc.c:277
struct hrap_grid * hrap_grid
Definition: daily_qc.c:285
printf("pcp %d\n", pcp_in_use[103])
exit(1)
void write_qpf_grids(char *fname)
short int hrap_miny
Definition: misc.h:510
short int hrap_minx
Definition: misc.h:509
short int maxi
Definition: misc.h:507
short int maxj
Definition: misc.h:508
Definition: misc.h:523
short int ** value
Definition: misc.h:526