C+ C NAME: C writelosmapvg C PURPOSE: C To write a line of sight source surface map C C CATEGORY: C Data processing C CALLING SEQUENCE: C call writelosmapvg(mvg,NLOSGP1,NLG,NTG,NBS,ITIM,XLON,XLAT) C INPUTS: C mvg integer 0 - Velocity LOS C 1 - G-level or density LOS C NLOSGP1 integer Number of line of sight segments plus 1 C NLG integer Number of lines of sight C NTG integer Number of time steps C NBS(NLG) integer Is the source line of sight used? 1 - yes 0 - no C ITIM(NLOSGP1,NLG) real Integer time map in which the line of sight belongs C XLON(NLOSGP1,NLG) real Projected longitude of the line of sight C XLAT(NLOSGP1,NLG) real Projected latitude of the line of sight C OUTPUTS: C a file C FUNCTIONS/SUBROUTINES: C INCLUDE: C PROCEDURE: C MODIFICATION HISTORY: C July-2002, B. Jackson (UCSD; bvjackson@ucsd.edu) C Feb.-2009. B. Jackson (UCSD; bvjackson@ucsd.edu) Modified to output both velocity and g-level files C- subroutine writelosmapvg(mvg,NLOSGP1,NLG,NTG,NBS,NCOFF,ITIM,XLON,XLAT) real XLON(NLOSGP1,NLG), & XLAT(NLOSGP1,NLG) integer ITIM(NLOSGP1,NLG), & NBS(NLG) if(mvg.eq.0) open (13,file='v_los.txt',status='new',recl=120,access='sequential',form='formatted') if(mvg.eq.1) open (13,file='g_los.txt',status='new',recl=120,access='sequential',form='formatted') do N=1,NTG do I=1,NLG do J=1,NLOSGP1-1 if(ITIM(J,I).eq.N) then if(NBS(I).ne.0) then write (13,'(3I10,2F15.7)') I,J,ITIM(J,I),float(NCOFF)+XLON(J,I),XLAT(J,I) end if end if end do end do end do close (13) return end