C+ C NAME: C MkPos C PURPOSE: C To determine line of sight positions and their projections at a given C height above the Sun. C CATEGORY: C Data processing C CALLING SEQUENCE: subroutine MkPos(XCbeg,XCend,RRS,dRR,DLOS,nLng,nLat,nRad,XC3D, & NL,NS1,DIST,XLS,XCE,XP,XD,IYRS,DOYS, & XCproj,XClos,XLlos,RRlos,LON,LAT) C INPUTS: C XC3D(nLng,nLat,nRad) real Shifts to map to height RR (set by MkXCShifts) C nLng integer # longitudes C nLat integer # latitudes C nRad integer # TS MAPS (height begins at 0 AU) C dRR real Heights between individual maps (in AU) C RRS real Distance above Sun for deconvolution maps C DIST(NL) real Distance of Sun to Earth C XLS(NL) real Ecliptic longitude of Sun C XCE(NL) real Carrington variable of Earth C XP(NL) real Longitude diff. relative to Earth-Sun C XD(NL) real Declination of Source C IYRS(NL) integer Year of source observation C DOYS(NL) real Day of year (and fraction) of source observation C NL integer # G-level data points C DLOS real resolution along LOS (in units of DIST) C NS1 integer # segments of length DLOS along LOS + 1 C (the extra element is used to store Point-P info) C OUTPUTS: C XCproj(NS1,NL) real Modified Carrington variables for points on LOS, C after projection to reference surface RR C XClos(NS1,NL) real Modified Carrington variables for points on LOS C XLlos(NS1,NL) real Heliographic latitude for points on LOS C RRlos(NS1,NL) real Height above Sun for points on L.O.S. C LON (NS1,NL) integer Int value of the heliographic longitude C LAT (NS1,NL) integer Int value of the heliographic latitude C INCLUDE: C include 'mapcoordinates.h' C CALLS: C POINT_ON_LOS,ECLIPTIC_HELIOGRAPHIC,XMAP_OBS_POS,FLINT C PROCEDURE: C > XClos and XCproj are on the same scale as XCE. C MODIFICATION HISTORY: C NOV, 1995 B. Jackson (STEL,UCSD) C- real XC3D(nLng,nLat,nRad) ! Map of TS shifts to RR map height real DIST (NL) ! Distance of Sun to Earth real XLS (NL) ! Ecliptic longitude of Sun real XCE (NL) ! Carrington variable of Earth real XP (NL) ! Longitude diff. relative to Earth-Sun real XD (NL) ! Declination of Source integer IYRS(NL) ! Year of source observation real DOYS (NL) ! Day of year (and fraction) of source obs. real XCproj(NS1,NL) ! Projected Carr. rot. value of point on L.O.S. real XClos (NS1,NL) ! Point on L.O.S. Carr. rot. value real XLlos (NS1,NL) ! Heliographic lat. (in deg.) point on L.O.S. real RRlos (NS1,NL) ! Height above Sun of point on L.O.S. integer LON(NS1,NL) ! Nearest longitude index integer LAT(NS1,NL) ! Nearest latitude index parameter (DLOS25 = 0.25) include 'mapcoordinates.h' do I=1,NL iYr = IYRS(I) Doy = DOYS(I) ObsR = DIST(I) ! Heliocentric distance observer ObsLng = XLS(I)-180 ! Heliocentric ecliptic longitude Earth ObsXC = XCE(I) ! Modified Carrington variable Earth do J=1,NS1 ! Loop over all segments along LOS ! Define point P along LOS: P1 = XP(I) ! Topocentric ecliptic longitude diff. with Earth-Sun line P2 = XD(I) ! Topocentric ecliptic latitude P3 = (J-.5)*DLOS ! Distance along LOS (units of ObsR) ! Point-P distance along LOS (units of ObsR) if (J .eq. NS1) P3 = max(DLOS25,cosd(P2)*cosd(P1)) ! Convert to heliocentric coordinates call POINT_ON_LOS(P1,P2,P3,ELO,ELOS,iEorW) P3 = P3*ObsR ! Convert to AU P1 = ObsLng+P1 ! Heliocentric longitude of P call ECLIPTIC_HELIOGRAPHIC(0,iYr,Doy,P1,P2) ! Convert to heliographic coordinates P1 = XMAP_OBS_POS(ObsXC,P1) ! Modified Carrington variable of P P1 = min(XCend,max(XCbeg,P1)) call Get3Dval(XCbeg,XCend,RRS,dRR,nLng,nLat,nRad,XC3D,1,P1,P2,P3,XC) XClos(J,I) = P1 ! Modified Carrington variable of P XLlos(J,I) = P2 ! Heliographic latitude of P RRlos(J,I) = P3 ! Heliocentric distance of P (AU) XCproj(J,I) = P1+XC ! Projected modified Carrington variable LON(J,I) = nint(XCvar(XCproj(J,I)))! Nearest longitude index LON(J,I) = max(1,min(nLng,LON(J,I))) LAT(J,I) = nint(XLindx(XLlos (J,I)))! Nearest latitude index end do end do return end