1 SUBROUTINE asaps(LI,MI,IPLT,ORBIN,IYR,IDAY,SEC,NSTP,CDRG,
229 IMPLICIT DOUBLE PRECISION (a-h,o-z)
231 dimension tvec(*),xvec(6,*),orbin(6)
232 dimension orb(6),y(6),x(6),x1(6)
233 dimension tint(2),tfin(2),tref(2)
236 common/option/l,m,ires,isun,imoon,iephem,idrag,idens,isrp,iorb
237 1 ,iprint,inode,iplot
238 common/timecmn/ti,tf,tr
239 common/pltcon/ge,
re,rate,pm,aj2,ellip,ratm
240 common/atmcon/rdens,rht,sht,altmax,wt
241 common/spccon/aread,areas,scmass,cdrag,csrp
242 common/suncon/gs,es(7),et(7)
243 common/muncon/gm,em(7),en(7)
244 common/harmon/c(41,41),s(41,41)
247 DATA dtr,dts/.1745329251994330d-1,8.64d4/
248 DATA tpi/6.283185307179586d0/
250 DATA hstart,hlarge/60.d0,1.d99/
259 filnm =
'$ASAP_PARMS/asap_parms.dat'
261 OPEN(5,file=filnm,err=999)
264 READ(5,4000)l,m,ires,isun,imoon,iephem,idrag,idens,isrp,iorb
265 1 ,iprint,inode,iplot
266 READ(5,3000)(orb(i),i=1,6),relerr,abserr,step
267 READ(5,3000)(tint(i),i=1,2),(tfin(i),i=1,2),(tref(i),i=1,2)
268 READ(5,3000)ge,
re,rate,pm,ellip,ratm
269 READ(5,3000)rdens,rht,sht,altmax,wt
270 READ(5,3000)aread,areas,scmass,cdrag,csrp
271 READ(5,3000)gs,(es(i),i=1,7)
272 READ(5,3000)gm,(em(i),i=1,7)
293 READ(5,5000,
END=30)I,J,C(I+1,J+1),S(I+1,J+1)
308 print *,
'ASAPS:',l,m,cdrag
320 IF (ires.EQ.0) ires=1
327 tid =
jd(iyr,1,iday) + sec/dts - 0.5d0
328 tfd = tid + step*(nstp-1)/dts
330 WRITE(*,6000)tid,tfd,trd
364 CALL kepler(y(6),y(2),ea,se,ce)
373 IF (iephem.EQ.1)
THEN
376 IF (isun.EQ.1.OR.isrp.EQ.1)
CALL setthd(es,et)
377 IF (imoon.EQ.1.AND.iephem.EQ.0)
CALL setthd(em,en)
391 WRITE (9,2000) iyr,tdy
398 IF (iplot.EQ.1)
CALL pout(t,x,9)
399 tvec(ivec) = t - ti + sec
405 CALL rk78(
der,t,tout,neq,x,h,relerr,abserr,sp)
407 IF (tout.GE.tf)
GO TO 900
410 IF (iplot.EQ.1)
CALL pout(t,x,9)
411 tvec(ivec) = t - ti + sec
430 2000
FORMAT(i10,f14.8)
431 3000
FORMAT(bn,d30.16)
433 5000
FORMAT(bn,2i5,2d30.16)
435 1 ,5x,
'RUN STARTS ON JULIAN DATE = ',d25.16,/
436 2 ,5x,
'RUN ENDS ON JULIAN DATE = ',d25.16,/
437 3 ,5x,
'REFERENCE JULIAN DATE OF PM AND EPHEM = ',d25.16)
443 999 print *,
'ERROR OPENING FILE 5'