Help with Fortran90

(Difference between revisions)
Jump to: navigation, search
(compiling FORTAN90 Neptunian satellite ephemeris)
 
Line 63: Line 63:
  
 
== Summary ==
 
== Summary ==
The file ./data/Nsat-fd.dat exists, maybe the error refers to the file /DATA/DE403/de403.unx, which is indeed missing on my system, And I do not know from where to get it. At ftp://ssd.jpl.nasa.gov/pub/eph/planets/bsp/DE403.BSP I found the file for Sparc architecture, for i386 it seems not to be available any more, but it could be created from DE403.BSP.
+
The file ./data/Nsat-fd.dat exists, maybe the error refers to the file /DATA/DE403/de403.unx, which is indeed missing on my system. And I do not know from where to get it. At ftp://ssd.jpl.nasa.gov/pub/eph/planets/bsp/DE403.BSP I found the file for Sparc architecture, for i386 it seems not to be available any more, but it could be created from DE403.BSP.
  
But before doing further investigation I would like to ask a FORTRAN programmer about
+
But before doing further investigation I would like to ask a FORTRAN programmer about this software. My understanding is as follows, please correct me when I am wrong:
 +
 
 +
1) The software is a numerical integrator for the physical model of the Nepunian system. For as a period as long as the planet positions are provided, the Neptunian satellites position can be computed by numerical integration. Especially dates outside the interval 1800-2050 are no problem, when the DE403 planet positions are replaced by VSOP87 or similar.
 +
 
 +
2) Therefore it is possible to produce a large table of each satellites position and velocities for a long period, lets say 1500-2500. In fact this is the main goal. When I have this table, I will try frequency analysis techniques in order to create poisson series or similar, that can be included into stellarium.
 +
 
 +
My problem is that I can speak neigther french nor FORTRAN, so I really do not know what is going on in this software, and I would really appreciate your help. You can contact be by:
 +
 
 +
- email
 +
 
 +
- posting into the forum
 +
 
 +
- writing something in this wiki page
 +
 
 +
Yours,
 +
 
 +
[[User:Johannes|Johannes]] 14:38, 1 May 2007 (PDT)

Revision as of 21:38, 1 May 2007

This page is dedicated to conversation and mutual help on creating Neptunian satellite ephemeris using Le Guyader's and Jerome Berthier's ftp://ftp.imcce.fr/pub/ephem/satel/neptuno/


First approach: f77

In Config.mk replace FC = xlf with FC = f77 and type 'make'. You will see lots of errors like

isat_d.f: In subroutine `isatd':
isat_d.f:1353: 
   210     format(8x,' Dernier pas:',d23.16)'
                                           ^
Invalid form for FORMAT statement at (^)

In my opinion the reason is that the code is not FORTRAN77 conform. I tried to overcome this problem by fixing the source code, there is an awful lot of wrong format statements. For finding the input files I changed in fs2fd.f:

infile  = trim(dir_s)//trim(fil_s)
outfile = trim(dir_d)//trim(fil_d)

into

infile  = './data/Nsat-fs.dat'
outfile = './data/Nsat-fd.dat'

Same in ins_d.f:

theofile = './data/Nsat-fd.dat'

Additionally in ins_d.f I had to move the passage

LOGICAL FIRST
DATA FIRST/.TRUE./

after the COMMON block:

COMMON/STCOMX/KM,BARY,PVSUN
LOGICAL FIRST
DATA FIRST/.TRUE./

FORTRAN77 seem not to support variable size arrays, so in isat_d.f I had to replace

dimension tp(np),up(np),cp(3,np),aia(4)

in line 183 with

dimension tp(100000),up(100000),cp(3,100000),aia(4)

The same for lines 2455 and 2456. In line I removed the definition of w(3,np,0:nd). After that the source compiled into an executable called 'ilgs_d', which is ought to be the double precision version. The quad precision version would be called 'ilgs_q'. Anyway, the executable failed with the following output:

       ________________________________________
                                               
          Fichier ./data/Nsat-fd.dat              
       ________________________________________

open: No such file or directory
apparent state: unit 12 named /DATA/DE403/de403.unx
last format: list io
lately reading direct unformatted external IO
Aborted

Second approach: f2c

Using f2c gives the same results as using f77. I hoped to get more insight from reading the C-code, but I did not.

Summary

The file ./data/Nsat-fd.dat exists, maybe the error refers to the file /DATA/DE403/de403.unx, which is indeed missing on my system. And I do not know from where to get it. At ftp://ssd.jpl.nasa.gov/pub/eph/planets/bsp/DE403.BSP I found the file for Sparc architecture, for i386 it seems not to be available any more, but it could be created from DE403.BSP.

But before doing further investigation I would like to ask a FORTRAN programmer about this software. My understanding is as follows, please correct me when I am wrong:

1) The software is a numerical integrator for the physical model of the Nepunian system. For as a period as long as the planet positions are provided, the Neptunian satellites position can be computed by numerical integration. Especially dates outside the interval 1800-2050 are no problem, when the DE403 planet positions are replaced by VSOP87 or similar.

2) Therefore it is possible to produce a large table of each satellites position and velocities for a long period, lets say 1500-2500. In fact this is the main goal. When I have this table, I will try frequency analysis techniques in order to create poisson series or similar, that can be included into stellarium.

My problem is that I can speak neigther french nor FORTRAN, so I really do not know what is going on in this software, and I would really appreciate your help. You can contact be by:

- email

- posting into the forum

- writing something in this wiki page

Yours,

Johannes 14:38, 1 May 2007 (PDT)

Personal tools
Namespaces
Variants
Actions
in this wiki
other languages
Toolbox