C+ C NAME: C WriteLOSD C PURPOSE: C Writes a summary file of observed and modeled g-levels used C in the tomographic reconstruction for Cambridge IPS data C CALLING SEQUENCE: subroutine WriteLOSD(cOut,cCam,iEdt,NL,iMJD,iXP,iYP,XOBS,XMDL0,XMDL,XE,NGOOD) C INPUTS: C cOut character*(*) Output file name C cCam character*(*) Logical pointing to directory where daily Cambridge C files are located C iEdt integer 0 = Unedited data; 1 = Edited data C NL integer # of IPS g-level los observations C C iMJD(NL) integer MJD for original daily Cambridge file C iXP (NL) integer location in original daily Cambridge file (hour angle) C iYP (NL) integer location in original daily Cambridge file (declination) C (iMJD, iXP and iYP are output from href=ReadGIPS=) C C XOBS (NL) real Observed velocities (should match the entry C from the original record) C XMDL0(NL) real Model velocities after 1st iteration ?? C XMDL (NL) real Model velocities C XE (NL) real source elongations (??) C NGOOD(NL) integer 0: bad IPS source; 1: good IPS source C OUTPUTS: C For each of the NL los observations the original record is retrieved from C the appropriate data file. Observed velocity, model velocity, difference C between observed and modeled velocity, and the 'bad source' flag are appended C to the record. The extended records are written to a file 'vipsout.dat' in C the current working directory. C CALLS: C iFreeLun, Int2Str, bOpenFile, itrim C INCLUDE: include 'dirspec.h' include 'openfile.h' C MODIFICATION HISTORY: C NOV-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- character cOut*(*) character cCam*(*) integer iEdt integer NL integer iMJD (*) integer iXP (*) integer iYP (*) real XOBS (*) real XMDL0(*) real XMDL (*) real XE (*) integer NGOOD(*) parameter (NTIME = 72) parameter (NDEC = 14) real GG(NTIME,NDEC) character cAst(0:1) /'*',' '/ character cFmt*16 /'(5F8.3,A,I6,2I3)'/ integer iRecl /53/ ! = 5*8+1+6+2*3 logical bOpenFile iAct = OPN__TRYINPUT+OPN__TEXT+OPN__UNKNOWN+OPN__ONEPASS+OPN__NOMESSAGE if (bOpenFile(iAct,iU,cOut,iRecl)) then do I=NL,1,-1 if (I .eq. 1 .or. iMJD(I) .ne. iMJD(I+1)) iRead = iReadG(cCam,iEdt,iMJD(I),GG) if (iRead .eq. 1) write (iU,cFmt) & XOBS(I),XMDL0(I),XMDL(I),GG(iXP(I),iYP(I)),XE(I),cAst(NGOOD(I)),iMJD(I),iXP(I),iYP(I) end do iU = iFreeLun(iU) end if return end