C+ C NAME: C LOSClean C PURPOSE: C Remove lines of sight flagged by LOSReach (these los fall partially outside C the range [XCbeg,XCend] C CATEGORY: C Data processing C CALLING SEQUENCE: subroutine LOSClean(I__VD,bGCamb,NBS,iXPG,iYPG,iMJDG, IYRF,IREC, & IYRS,DOYS,DIST,XLS,XLL,XDL,XCE,XE,XC,YL,OBS,PPlos) C INPUTS: C I__VD integer TOM__V (velocity data ) or TOM__G (g-level data) C bGCamb integer .TRUE. for Cambridge data (otherwise .FALSE.) C (used only if I__VD = TOM__G) C NBS (NL) integer =0: line of sight is removed C =1: line of sight is retained C iXPG (NL) integer C iYPG (NL) integer C iMJDG (NL) integer C C IYRF (NL) integer C IREC (NL) integer C C IYRS (NL) integer Year and .. C DOYS (NL) real Day of year (incl. fraction for time of day) of observation C DIST (NL) real Sun-Earth distance at time of obs. C XLS (NL) real Geocentric ecliptic longitude of Sun C XLL (NL) real Geocentric ecliptic longitude diff.lng(los)-lng(Sun) C XDL (NL) real Geocentric ecliptic latitude los C XCE (NL) real Carrington variable of sub-Earth point C XE (NL) real Los elongation (deg) (>0: East of Sun; <0: West of Sun) C XC (NL) real Carrington variable of point-P traced back to source C surface at speed VOBS C YL (NL) real Heliographic latitude of point-P (deg) C OBS (NL) real Observed IPS velocities C C PPlos(4,NLOS,NL)real Lng/lat/rad/time of points on los C OUTPUTS: C NBS (NL) integer NBS(i),i=1,NL all set to 1 C C The remaining NL lines of sight are stored in the first NL positions for all arrays. C SIDE EFFECTS: C The t3d entry for NL is updated. C CALLS: C ArrR4Copy, Say, Str2Str, Int2Str, T3D_iget, T3D_iset C INCLUDE: include 't3d_param.h' include 't3d_array.h' include 't3d_index.h' C include 't3d_loc_fnc.h' C PROCEDURE: C MODIFICATION HISTORY: C SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- integer I__VD logical bGCamb integer NBS (*) integer iXPG (*) integer iYPG (*) integer iMJDG (*) integer IYRF (*) integer IREC (*) integer IYRS (*) real DOYS (*) real DIST (*) real XLS (*) real XLL (*) real XDL (*) real XCE (*) real XE (*) real XC (*) real YL (*) real OBS (*) real PPlos (*) logical bGDaily logical bMod integer Str2Str character cStr*80 character cSay*8 /'LOSClean'/ include 't3d_loc_fnc.h' !------- ! No cleaning necessary in mod-360 mode call T3D_iget(T3D__MODE,0,MODE) bMod = iand(MODE,TOM__MOD) .ne. 0 if (bMod) return if (I__VD .eq. TOM__V) call T3D_iget(T3D__NL_V,0,NL) if (I__VD .eq. TOM__G) call T3D_iget(T3D__NL_G,0,NL) call T3D_iget(T3D__NLOS_V,0,NLOS) bGDaily = I__VD .eq. TOM__G .and. bGCamb ! Deconvolving Cambridge g-levels (daily files) J = 0 do I=1,NL if (NBS(I) .eq. 1) then J = J+1 if (J .ne. I) then if (bGDaily) then iXPG (J) = iXPG (I) iYPG (J) = iYPG (I) iMJDG(J) = iMJDG(I) else IYRF (J) = IYRF (I) IREC (J) = IREC (I) end if IYRS(J) = IYRS(I) DOYS(J) = DOYS(I) DIST(J) = DIST(I) XLS (J) = XLS (I) XLL (J) = XLL (I) XDL (J) = XDL (I) XCE (J) = XCE (I) XE (J) = XE (I) XC (J) = XC (I) YL (J) = YL (I) OBS (J) = OBS (I) locI = locPOS(1,1,I) locJ = locPOS(1,1,J) call ArrR4Copy(LOS__N*NLOS,PPlos(locI),PPlos(locJ)) NBS(J) = 1 end if end if end do I = 0 I = I+Str2Str('discarded', cStr(I+1:))+1 I = I+Int2Str(NL-J , cStr(I+1:)) I = I+Str2Str('/' , cStr(I+1:)) I = I+Int2Str(NL , cStr(I+1:))+1 I = I+Str2Str('lines of sight;', cStr(I+1:))+1 I = I+Int2Str(J , cStr(I+1:))+1 I = I+Str2Str('remaining', cStr(I+1:)) call Say(cSay,'W',char(I__VD),cStr) NL = J if (I__VD .eq. TOM__V) call T3D_iset(T3D__NL_V,0,NL) if (I__VD .eq. TOM__G) call T3D_iset(T3D__NL_G,0,NL) return end