C+ C NAME: C iReadNagoyan C PROCEDURE: C > Structure of Nagoya files: C cSrce string descriptor for radio source C iY,iM,iD integer year, month and day of observation C UT real universal time of day C DP real heliocentric distance point P (AU) C iTHR integer ?? (only from 1990 - 1993) C iHLA integer heliocentric ecliptic latitude point P C iHLO integer heliocentric longitude point P relative to C Sun-Earth direction (i.e. a difference of C ecliptic longitudes) C iGLA,iGLO integer heliographic location point P (degrees) C iROT integer Carrington rotation number C iVEL integer IPS velocity (km/s) C iDVEL integer error in velocity (km/s) C SCINDX/G-VALUE real scintillation index (arbitrary units); C present from 1990 to 1996) or G-value (after 1997) C Record length of original Nagoya files: C 1990-1993: 73 chars C 1994-1996: 68 chars (no THR column) C 1997-1998: 66 chars (no THR, g-value instead of source index C In the processed files, iTHR has been omitted, and the source index has been replaced by C zero (i.e. results in a zero g-value) C- function iReadNagoyan(iU,iFirst) character cMon*3, & cSrce*9,cSrc*9 real*8 JDCar(nCar), & dLngSun, dLatSun, dDisSun character cFmt*40 /'(A9,3I2,F6.2,F5.2,I4,I5,I4,3I5,I4,F8.5)'/ external EARTH include 'sun.h' save cSrce,iY,iM,iD,UT,DP,iHLA,iHLO,iGLA,iGLO,iROT,iVEL,iDVEL,GVAL,iRec iU = iU ! Avoids compiler warning on VMS read (iU,cFmt,iostat=iReadNagoyan) cSrce,iY,iM,iD,UT,DP,iHLA,iHLO,iGLA,iGLO,iROT,iVEL,iDVEL,GVAL if(iY.lt.50) iY = iY + 100 iRec = (1-iFirst)*iRec+1 ! iFirst=1 initializes record counter return C+ C NAME: C iProcessNagoyan C CALLING SEQUENCE: entry iProcessNagoyan(iR,nCar,JDCar,NCoff,XCend,Radius, & cSrc,nYr,Doy,XCsc,XCobs,xLat,xVV,xGG,dRA, & rLngSun,rDisSun,rLngP,rLatP,rEloP) C- if (iVEL .eq. 0) then ! No velocity available: reject iProcessNagoyan = 0 return end if cSrc = cSrce nYr = 1900+iY cMon = ' ' ! Make sure iM is used call DATE_DOY(0,nYr,cMon,iM,iD,iDoy) Doy = iDoy+UT/24. XCsc = XMAP_SC_POS(EARTH,nYr,Doy,-nCar,JDCar) if (XCsc .eq. BadR4()) then ! Time outside JDCar range iProcessNagoyan = 0 return end if ! Sub-Earth position if (XCsc .gt. XCend) then ! Sub-Earth past XCend iProcessNagoyan = 2 return end if iR = iRec XCobs = iROT+(360.0-iGLO)/360.0 ! Point-P at DP XCobs = XCobs+SUN__SPIRAL*(Radius-DP)/iVEL ! Point-P traced to Radius XCobs = XCobs-NCoff ! Subtract offset xLat = iGLA ! Heliographic lat(P) xVV = iVEL ! IPS velocity xGG = GVAL ! Set to 0 if GVAL not available rLng = iHLO ! Heliocentric ecliptic lng(P)-lng(Earth) rLat = iHLA ! Heliocentric ecliptic lat(P) rP = DP ! Distance Sun-P (AU) call POINT_ON_LOS(rLng,rLat,rP,rEloSun,rEloP,i) !call PointOnLos(rLng,rLat,rP,rEloSun,rEloP,i) rLngP = rLng ! Geocentric ecliptic lng(P)-lng(Sun) rLatP = rLat ! Geocentric ecliptic lat(P) rEloP = -i*rEloP ! rEloP>0 : East of Sun ! <0 : West of Sun call SunNewcomb(0,nYr,Doy,dLngSun,dLatSun,dDisSun) rDisSun = dDisSun rLngSun = dLngSun ! Geocentric ecliptic lng(Sun) rSun = rLngSun rLng = rSun+rLng ! Geocentric ecliptic lng(P) call ECLIPTIC_EQUATOR(0,nYr,Doy,rLng,rLat) ! rLng = RA of P rLat = dLatSun ! Geocentric ecliptic lat(Sun) call ECLIPTIC_EQUATOR(0,nYr,Doy,rSun,rLat) ! rSun = RA of Sun dRA = rLng-rSun ! RA(P)-RA(Sun) if (abs(dRA) .gt. 180.0) dRA = dRA-sign(1.0,dRA)*360.0 iProcessNagoyan = 1 return end