program translate c c This program "translates" the WDS-format input file c to the format used in the linear systems programs. c Weights are set equal to 1.0 - they'll be determined c in second program. This one adds the decimal points, c etc. so the second program can read the data properly. c [ linear.2 --> linear.3 ] c character*9 date character*6 theta character*7 rho character*3 dd1,type character*1 c62,c63,c64 character*20 hcode character*100 title character*10 wds c c enter file names for i/o c open(10,file='linear.2',status='UNKNOWN') open(11,file='linear.3',status='UNKNOWN') c c read and write wds title line c 200 read(10,907,end=999,err=999) title 907 format(a100) write(11,907) title c c read wds data, determine method, and write in correct format c 400 read(10,908,end=999,err=999) wds,date,theta,rho,hcode, $ dd1,c62,c63,c64 908 format(a10,t24,a9,1x,a6,1x,a7,t61,a20,t64,a3,t75,3a1) if (wds .eq. ' ') go to 500 if (date .eq. ' . ') go to 400 if (theta .eq. ' . ') go to 400 if (rho .eq. ' . ') go to 400 c type='VIS' if ((c62 .eq. 'G') .or. (c62 .eq. 'H')) type='VPH' if ((c62 .eq. 'O') .or. (C62 .eq. 'L')) type='VPH' c if (c62 .eq. 'E') type='XVI' c if ((c62 .eq. 'J') .or. (c62 .eq. 'K')) type='XSP' if ((c62 .eq. 'P') .or. (c62 .eq. 'Q')) type='XSP' if ((c62 .eq. 'S') .or. (c62 .eq. 'U')) type='XSP' if ((dd1 .eq. 'MKT') .or. (dd1 .eq. 'NOI')) type='XSP' c if ((dd1 .eq. 'McA') .or. (dd1 .eq. 'Hrt')) type='CSP' if ((dd1 .eq. 'Msn') .or. (dd1 .eq. 'Fek')) type='CSP' c if (dd1 .eq. 'HIP') type='HIP' if (dd1 .eq. 'TYC') type='TYC' c weight=1.0 c if(theta .eq. ' . ') weight=0.0 if(rho .eq. ' . ') weight=0.0 write(11,909) date,theta,rho,type,weight,hcode 909 format(6x,a9,4x,a6,7x,a7,10x,a3,f5.1,5x,a20) go to 400 c 500 write(11,910) 910 format(80x,' ') go to 200 999 stop 'data formatting program finished' end