C+ C NAME: C writelosmapvg_in C PURPOSE: C To write a line of sight source surface map C C CATEGORY: C Data processing C CALLING SEQUENCE: C call writelosmapvg_in(mvg,NLOSGP1,NLG,N_IN,NTG,NBS,ITIM,ITIM_in,XLON,XLON_in,XLAT,XLAT_in) 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 N_IN integer Number of in-situ points 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 ITIM_in(N_IN) real Integer time map in which the in-situ point belongs C XLON(NLOSGP1,NLG) real Projected longitude of the line of sight C XLON_in(N_IN) real Projected longitude of the in-situ point C XLAT(NLOSGP1,NLG) real Projected latitude of the line of sight C XLAT_in(N_IN) real Projected latitude of the in-situ point 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_in(mvg,NLOSGP1,NLG,N_IN,NTG,NBS,NCOFF,ITIM,ITIM_in,XLON,XLON_in,XLAT,XLAT_in) real XLON(NLOSGP1,NLG), & XLON_in(N_IN), & XLAT(NLOSGP1,NLG), & XLAT_in(N_IN) integer ITIM(NLOSGP1,NLG), & ITIM_in(N_IN), & 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') JJ = 1 do I=1,NLG+N_IN if(I.le.NLG) then do N=1,NTG 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 else do N=1,NLG if(ITIM_in(I-NLG).eq.N) then if(NBS(I).ne.0) then write (13,'(3I10,2f15.7)') I,JJ,ITIM_in(I-NLG),float(NCOFF)+XLON_in(I-NLG),XLAT_in(I-NLG) end if end if end do end if end do close (13) return end