      program CircOmega ! BB June 012017.
c Gravitational units G=c=1.
      implicit real*8 (a-h,o-z)
      logical ltest
      parameter(c=2.998d+08) ! 2.998d+08 [m/s] = 1 -> c.
      parameter(G=6.674d-11) ! 6.674d-11 [m^3 kg^{-1} s^{-2}] = 1 -> G.
      parameter(y=365.d00*24.d00*3600.d0) ! Year in [s].
      parameter(iuo=6,xly=y*c)            ! Light year in [m].
      parameter(em=5.972d24,er=6371.d03) ! Earth mass [kg], radius [m].
      parameter(sm=1.989d30,sr=6957.d05) ! Sun   mass [kg], radius [m].
      parameter(r=149.6d09) ! 1 [au] Distance earth-sun [m]. 
      ltest=.true.
      ltest=.false.
      if(ltest) stop "CircOmega: ltest."
      write(iuo,'(/,"  sm [kg], r [m] =",2g12.4)') sm,r
      write(iuo,'("   y [s], ly [m] =",2g12.4)') y,xly
c
c Everything in seconds:
      s=1.d00
      xm=s/c            ! meter    in seconds.
      xkg=G*xm**3/s**2  ! kilogram in seconds.
      write(iuo,'(/,"  m [s], kg [s] =",2g12.4)') xm,xkg
c
      emsec=em*xkg
      ersec=er*xm
      write(iuo,'(" em [s], er [s] =",2g12.4)') emsec,ersec
      smsec=sm*xkg
      srsec=sr*xm
      write(iuo,'(" sm [s], sr [s] =",2g12.4,/)') smsec,srsec
c
      rsec=r*xm
      write(iuo,'(" r [s]          =",1g12.4)') rsec
      omega=sqrt(smsec/rsec**3)
      write(iuo,'(" omega [1/s]    =",1g12.4)') omega
      phiyear=omega*y
      write(iuo,'(" phiyear [rad]  =",1g12.4)') phiyear
      tpi=2*acos(-1.d00)
      phiyear=360*phiyear/tpi
      write(iuo,'(" phiyear [deg]  =",1g12.4,/)') phiyear
c
      write(iuo,'(" Circular light path for sun mass:",/)') 
      rssec=3*smsec
      rs=rssec*c
      write(iuo,'(" rs [s], [m]    =",2g12.4)') rssec,rs
      omega=sqrt(smsec/rssec**3)
      write(iuo,'(" omega [1/s]    =",1g12.4)') omega
      beta=tpi*rssec*omega
      write(iuo,'(" beta = v/c     =",1g12.4," makes no sense?")') beta
      omega=1.d00/(smsec*sqrt(27.d00))
      write(iuo,'(/," omega [1/s]    =",1g12.4," = 1/(m*sqrt*27)).",/)') 
     &                omega
      stop "CircOmega: all done."
      end
