symba5_helio_drift.f 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. c*************************************************************************
  2. c SYMBA5_HELIO_DRIFT.F
  3. c*************************************************************************
  4. c This subroutine loops thorugh the particles and calls the danby routine
  5. c
  6. c Input:
  7. c nbod ==> number of massive bodies (int scalar)
  8. c ielev ==> Level of particles (int array)
  9. c irec ==> current level of the code
  10. c mass ==> mass of bodies (real array)
  11. c xh,yh,zh ==> initial position in helio coord
  12. c (real arrays)
  13. c vxb,vyb,vzb ==> initial position in bary coord
  14. c (real arrays)
  15. c dt ==> time step
  16. c Output:
  17. c xh,yh,zh ==> final position in helio coord
  18. c (real arrays)
  19. c vxb,vyb,vzb ==> final position in bary coord
  20. c (real arrays)
  21. c
  22. c Remarks: Based on helio_drift.f
  23. c Authors: Hal Levison
  24. c Date: 1/20.97
  25. c Last revision:
  26. subroutine symba5_helio_drift(nbod,ielev,irec,mass,xh,yh,zh,
  27. & vxb,vyb,vzb,dt)
  28. include '../swift.inc'
  29. include 'symba5.inc'
  30. c... Inputs Only:
  31. integer nbod,irec
  32. real*8 mass(nbod),dt
  33. integer*2 ielev(NTPMAX)
  34. c... Inputs and Outputs:
  35. real*8 xh(nbod),yh(nbod),zh(nbod)
  36. real*8 vxb(nbod),vyb(nbod),vzb(nbod)
  37. c... Internals:
  38. integer j,iflg
  39. c----
  40. c... Executable code
  41. c Take a drift forward dth
  42. do j = 2,nbod
  43. if( (ielev(j).eq.irec) .and. (mass(j).ne.0.0d0) ) then
  44. call drift_one(mass(1),xh(j),yh(j),zh(j),
  45. & vxb(j),vyb(j),vzb(j),dt,iflg)
  46. if(iflg.ne.0) then
  47. write(*,*) ' Planet ',j,' is lost !!!!!!!!!'
  48. write(*,*) mass(1),dt
  49. write(*,*) xh(j),yh(j),zh(j),' H '
  50. write(*,*) vxb(j),vyb(j),vzb(j),' B '
  51. write(*,*) ' STOPPING '
  52. call util_exit(1)
  53. endif
  54. endif
  55. enddo
  56. return
  57. end
  58. c--------------------------------------------------------------------------