X-Git-Url: http://pileus.org/git/?p=~andy%2Frsl;a=blobdiff_plain;f=radar_to_uf.c;h=0d3af56a2311e6496895e3bb56b8a4fb7777ff3a;hp=df237f57825888b138bcdebdef363988554904c0;hb=71c71381ace86eb987172b22de55fbb837518b26;hpb=d08a7f8a699a044bc4ac5f93917aa7f6c463923b diff --git a/radar_to_uf.c b/radar_to_uf.c index df237f5..0d3af56 100644 --- a/radar_to_uf.c +++ b/radar_to_uf.c @@ -58,7 +58,8 @@ extern int radar_verbose_flag; */ -typedef short UF_buffer[16384]; /* Bigger than documented 4096. */ +/* Changed old buffer size (16384) for larger dualpol files. BLK 5/20/2011 */ +typedef short UF_buffer[20000]; /* Bigger than documented 4096. */ void swap_uf_buffer(UF_buffer uf); void swap2(short *buf, int n); @@ -308,7 +309,7 @@ void RSL_radar_to_uf_fp(Radar *r, FILE *fp) if (ray->h.azimuth > 0) uf_ma[32] = ray->h.azimuth*64 + 0.5; else uf_ma[32] = ray->h.azimuth*64 - 0.5; uf_ma[33] = ray->h.elev*64 + 0.5; - uf_ma[34] = uf_sweep_mode; + uf_ma[34] = uf_sweep_mode; if (ray->h.fix_angle != 0.) uf_ma[35] = ray->h.fix_angle*64.0 + 0.5; else uf_ma[35] = sweep[k]->h.elev*64.0 + 0.5; @@ -351,18 +352,16 @@ void RSL_radar_to_uf_fp(Radar *r, FILE *fp) /* ---- Begining of LOCAL USE HEADER BLOCK. */ q_lu = 0; - /* Note: Code within "#ifdef LUHDR_VR_AZ" below is retained for testing - * and is not normally compiled. It was used to deal with azimuth - * differences between DZ and VR in WSR-88D split-cuts, now handled in - * ingest routine. - */ + /* TODO: Code within "#ifdef LUHDR_VR_AZ" below should be removed + * once testing of merge_split_cuts is completed. + */ /* 5/18/2010 Temporarily define LUHDR_VR_AZ until merge_split_cuts is completed. */ #define LUHDR_VR_AZ #ifdef LUHDR_VR_AZ /* If DZ and VR azimuths are different, store VR azimuth in Local Use * Header. This is done for WSR-88D split cuts. - */ + */ if (sweep[DZ_INDEX] && sweep[VR_INDEX]) { if (sweep[DZ_INDEX]->ray[j] && sweep[VR_INDEX]->ray[j]) { vr_az = sweep[VR_INDEX]->ray[j]->h.azimuth; @@ -413,15 +412,15 @@ void RSL_radar_to_uf_fp(Radar *r, FILE *fp) uf_dh[2] = nfield; /* 'nfield' indexes the field number. * 'k' indexes the particular field from the volume. - * RSL_ftype contains field names and is defined in rsl.h. + * RSL_ftype contains field names and is defined in rsl.h. */ if (k > max_field_names-1) { - fprintf(stderr, + fprintf(stderr, "RSL_uf_to_radar: No field name for volume index %d\n", k); - fprintf(stderr,"RSL_ftype must be updated in rsl.h for new field.\n"); - fprintf(stderr,"Quitting now.\n"); + fprintf(stderr,"RSL_ftype must be updated in rsl.h for new field.\n"); + fprintf(stderr,"Quitting now.\n"); return; - } + } memcpy(&uf_dh[3+2*(nfield-1)], RSL_ftype[k], 2); if (little_endian()) swap2(&uf_dh[3+2*(nfield-1)], 2/2); if (current_fh_index == 0) current_fh_index = len_ma+len_op+len_lu+len_dh;