PRO mkpgm,height hstr=STRING(ROUND(height),FORMAT='(I3.3)') infile='/jasper/cnsr3_data1/pace/pgm2geo_'+hstr+'.dat' outfile='/jasper/cnsr3_data1/pace/pgm2geo.'+hstr PRINT,'Reading data from '+infile rdcols,infile,n,x,y,plong,plat,glong,glat edge=ROUND(SQRT(n)) IF n EQ edge*edge THEN BEGIN estr=STRTRIM(edge,2) PRINT,'Reforming to '+estr+'x'+estr+' arrays' plong=REFORM(plong,edge,edge) plat=REFORM(plat,edge,edge) glong=REFORM(glong,edge,edge) glat=REFORM(glat,edge,edge) ENDIF ELSE MESSAGE,'Coordinate arrays not square!' OPENW,unit,outfile,/GET_LUN PRINT,'Writing data to '+outfile WRITEU,unit,plat,plong,glat,glong CLOSE,unit FREE_LUN,unit STOP,"When you're done having fun, type .CON" RETURN END