Commit 41223da3 authored by saeed's avatar saeed

log updated

parent d0508cfd
......@@ -10,12 +10,34 @@ static void log_stn(struct stn_set *stn_set){
for (int i=0; i < stn_set->nt;++i){
log_station(stn_set->stns[i]);
}
printf("here\n");
}
static void log_odbinfo(struct odbinfo *odbinfo){
printf("odbinfo ====> \n\n");
printf("filename %s \n",odbinfo->filename);
printf("ntotal %s \n",odbinfo->ntotal);
printf("cycle %s\n",odbinfo->cycle);
printf("start_date %s\n",odbinfo->start_date);
printf("end_date %s\n",odbinfo->end_date);
printf("reportype %s\n",odbinfo->reportype);
printf("desc %s\n", odbinfo->desc);
printf("group %s\n", odbinfo->group);
printf(" ====> \n\n");
}
static void log_odb(void){
static void log_odb(struct odbinfo_set *odbinfo_set){
printf("here \n");
printf("number of files nt %d\n",odbinfo_set->nt);
printf("current stations icur %d\n",odbinfo_set->icur);
for (int i=0; i < odbinfo_set->nt;++i){
log_odbinfo(odbinfo_set->odb_set[i]);
}
}
static void log_obs(void){
......
......@@ -509,7 +509,6 @@ static void handle_event(struct Vis *vis,struct Vis *vis1, struct dsp_field *dsp
int done = 1;
XEvent e;
obs_set = fill_obs_set(FLD.lon, FLD.lat, NX, NY);
for(;done;){
XNextEvent (vis->dsp,&e);
......
......@@ -28,12 +28,19 @@ static int run_view(int argc,char *argv[]){
scdim.symbol_radius = SYM_SIZE;
struct Colort *scolor = NULL;
stn_set = getstn_set(argc,argv,&odbinfo_set);
log_stn(&stn_set);
get2dfield_binary("landseamask.bin",&FLD);
obs_set = fill_obs_set(FLD.lon, FLD.lat, NX, NY);
log_stn(&stn_set);
log_odb(&odbinfo_set);
return result;
get2dfield_binary("landseamask.bin",&FLD);
struct Vis visu = init_x(width,height);
struct dsp_field dspf = adjusttowindowsize(&visu, &FLD);
......
......@@ -231,6 +231,7 @@ static struct stn_set getstn_set(int argc, char *argv[], struct odbinfo_set *odb
result.nt = argc -1;
result.stns = (struct station **)malloc(sizeof(struct station *) * result.nt);
odbinfo_set->odb_set = (struct odbinfo **)malloc(sizeof(struct odbinfo *) * result.nt);
odbinfo_set->nt = result.nt;
if (result.stns && odbinfo_set->odb_set){
for (int i=0; i< result.nt;++i){
*(odbinfo_set->odb_set + nf) = (struct odbinfo *)malloc(sizeof(struct odbinfo ));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment