integer res
real(8) jd0
real(8) dt1
real(8) G(6)
TYPE(C_PTR) :: peph
jd0 = 2451419
dt1 = 0.5D0
peph = calceph_open("example2_rotangmom.dat"//C_NULL_CHAR)
if (C_ASSOCIATED(peph)) then
res = calceph_rotangmom_unit(peph,jd0, dt1, NAIFID_EARTH,
& CALCEPH_USE_NAIFID+CALCEPH_UNIT_SEC,
& G)
write(*,*) G
call calceph_close(peph)
endif