![]() |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
A few days ago, the JPL posted ASCII versions of the DE406 data files.
Finally, us non-Unix people should now have access to the DE406 long span ephemeris. ftp://ssd.jpl.nasa.gov/pub/eph/export/ascii/ But there's one big problem: I can't get it to work under Windows XP Home. When I run the concatenated text file (header.406 + 100-year ephemeris file) through asc2eph, it reports 0 records written (but no error message), and the JPLEPH output file is only a few k. It seems to have the header info only. I have no trouble running the same process with DE200 and DE405 ASCII files. My binary output files pass the testeph test routine beautifully. (I compiled all the Fortran code with MinGW, a Windows port of the free GCC GNU compiler.) So I don't understand why I can't get DE406 to work. Has anyone successfully performed the DE406 ASCII to binary conversion? -- Paul Hirose To reply by email remove INVALID |
#2
|
|||
|
|||
![]()
Paul Hirose wrote:
A few days ago, the JPL posted ASCII versions of the DE406 data files. Finally, us non-Unix people should now have access to the DE406 long span ephemeris. ftp://ssd.jpl.nasa.gov/pub/eph/export/ascii/ Curious -- I downloaded the DE-406 from JPL many years ago. Converted, it's a 200MB file, which was a mind-boggling amount of data at the time. Just the other day, though, I pulled the Fedora Core 4 ISO images ... 2.7GB in a few hours. Spooky. Has anyone successfully performed the DE406 ASCII to binary conversion? I wrote my own conversion program, so it worked fine. How much is this "asc2eph" program dependent on the presence of nutation/libration data in a 'full' ephemeris? The DE-406 (or at least the version I downloaded) doesn't have this data. |
#3
|
|||
|
|||
![]()
I wrote in message
ink.net... But there's one big problem: I can't get it to work under Windows XP Home. I found the problem. It's the format of the ephemeris text files. The column widths and number of decimal places in the DE406 files are different from the DE200 and DE405 files. This formatting is hardwired into the Fortran code, so the program fails when it doesn't find the numbers in the expected columns. The temporary solution is to change a few lines in ASC2EPH. 1. In the main routine, right before the big do-loop, change READ (*,'(3D26.18)',IOSTAT =IN) (DB(K),K=1,NCOEFF) to READ (*,'(3D23.15)',IOSTAT =IN) (DB(K),K=1,NCOEFF) The only difference is 3D23.15 instead of 3D26.18. 2. At the bottom of the do-loop, change READ (*,'(2I6,3000(/3D26.18))',IOSTAT =IN) .. NRW, NCOEFF, (DB(K),K=1,NCOEFF) to READ (*,'(2I6,3000(/3D23.15))',IOSTAT =IN) .. NRW, NCOEFF, (DB(K),K=1,NCOEFF) After those changes, I got a clean conversion from ASCII to binary. The resulting ephemeris gave a perfect run with the TESTEPH program. I think a better solution is for JPL to make the DE406 ASCII file format compatible with ASC2EPH. Or, modify ASC2EPH so its input column positions aren't hard-wired. -- Paul Hirose To reply by email remove INVALID |
#4
|
|||
|
|||
![]()
After successfully converting DE406 ASCII files to binary, I ran into
another difficulty. To merge the 1900-1999 and 2000-2099 binaries, I needed the BINMERGE utility. But the GCC compiler said in this line of the Fortran source code was illegal: READ(nfil,REC=NREC,END=6,ERR=98)(DATA(K),K=1,NDATA ) Not knowing Fortran, I had to do some research on the web. It seems the compiler is right. The END= isn't allowed when reading a direct-access file. My solution was to delete that part, and use ERR= to exit the loop: READ(nfil,REC=NREC,ERR=6)(DATA(K),K=1,NDATA) I commented out these lines: 98 write(*,'(/a18,i3)')'read error on unit',nfil stop After that, the program compiled and executed ok. The merged 1900-2099 binary output ran through the TESTEPH test program perfectly on my Windows machine. -- Paul Hirose To reply by email remove INVALID |
#5
|
|||
|
|||
![]()
In a private communication, someone at JPL suggested a better fix for
the nonstandard Fortran in BINMERGE. Replace READ(nfil,REC=NREC,END=6,ERR=98)(DATA(K),K=1,NDATA ) with READ(nfil,REC=NREC,IOSTAT=ISTAT)(DATA(K),K=1,NDATA ) IF (ISTAT .EQ. -1) THEN GO TO 6 ELSE IF (ISTAT .NE. 0) THEN GO TO 98 END IF Leave the rest of the program unchanged. My correspondent said the BINMERGE source code online at the FTP site will be rewritten to eliminate this problem. The other problem, the modification needed by the ASCII conversion program in order to process DE406 files, seems to be history. An improved ASC2EPH now available for download seems to be a universal converter. At least, it checks out ok with DE405 and DE406 on my Windows system. -- Paul Hirose To reply by email remove INVALID |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
guide star catalogue for cartes du ciel? | Passero | Amateur Astronomy | 6 | July 28th 04 05:39 PM |
free software for JPL's ephemeris data | Paul | Astronomy Misc | 0 | May 22nd 04 03:28 PM |
Reading floating point FITS files | John Green | FITS | 34 | November 29th 03 12:31 AM |
SETI@home data (.sah) files in different directory than the program files? | Heiko Baums | SETI | 12 | November 28th 03 03:14 AM |
Merging MPG Files | boka_do | Misc | 5 | July 23rd 03 11:58 AM |