#include <stdio.h> 
#include <string.h> 

int main(){

    /* declare variables */
    float precipRateESurface[7988][49];
    FILE  *fp;
    int   i, j;

    /* binary file declare */ 
    char inputfile[128] ="../data/GPM/DPR/GPMCOR_DPR_2604010211_0345_068594_L2S_DD2_08A.nc.precipRateESurface";

    for(i=0; i<7988; i++){
	    for(j=0; j<49; j++){
	        precipRateESurface[i][j]=0;
        }
    }

    /* binary file open */
    fp = fopen(inputfile, "rb");
    if(fp == NULL ) {
        printf("error:file open error[%s] \n", inputfile);
    }
    else
    { 
        /* file read */
        fread(precipRateESurface, sizeof(precipRateESurface), 1, fp);

        /* precipRateESurface print */
	    printf("filename=%s\n",inputfile);
        printf("precipRateESurface[5210][43]= %f (mm/hr)\n", precipRateESurface[5210][43]);
        printf("precipRateESurface[5210][44]= %f (mm/hr)\n", precipRateESurface[5210][44]);

        /* binary file close   */
        fclose(fp);
    }
    return 0;
}

