diff options
| author | Christoph Berg <myon@debian.org> | 2026-06-22 12:03:55 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-06-22 12:03:55 +0200 |
| commit | de18fc13175a5bf0e2b48a042d2fc06e87c88d24 (patch) | |
| tree | f517074cd603d30eb7ba7e2122d38051e4c1439c /map65/libm65/tm2.f90 | |
| parent | b76e8361909e47f0937d4a64a5a4cb5939f51eb7 (diff) | |
| parent | d83a420f0517d7fc47aeb288a6a0cf4891784fcc (diff) | |
Update upstream source from tag 'upstream/3.0.2+dfsg'
Update to upstream version '3.0.2+dfsg'
with Debian dir 90381fe7be9f5ea84d9b16c9cccf200a3fbe138b
Diffstat (limited to 'map65/libm65/tm2.f90')
| -rw-r--r-- | map65/libm65/tm2.f90 | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/map65/libm65/tm2.f90 b/map65/libm65/tm2.f90 index fb831fab..45fd2aee 100644 --- a/map65/libm65/tm2.f90 +++ b/map65/libm65/tm2.f90 @@ -1,14 +1,39 @@ -subroutine tm2(day,xlat4,xlon4,xl4,b4) +module tm2_mod + implicit none - implicit real*8 (a-h,o-z) - parameter (RADS=0.0174532925199433d0) + interface + subroutine tmoonsub(day, glat, glong, el, rv, xl, b, pax) + real(8), intent(in) :: day, glat, glong + real(8), intent(out) :: el, rv, xl, b, pax + end subroutine tmoonsub + end interface - real*4 xlat4,xlon4,xl4,b4 +contains - glat=xlat4*RADS - glong=xlon4*RADS - call tmoonsub(day,glat,glong,el,rv,xl,b,pax) - xl4=xl - b4=b +subroutine tm2(day, xlat4, xlon4, xl4, b4) + implicit none + + ! Arguments + real(8), intent(in) :: day + real(4), intent(in) :: xlat4, xlon4 + real(4), intent(out) :: xl4, b4 + + ! Locals + real(8), parameter :: RADS = 0.0174532925199433d0 + real(8) :: glat, glong + real(8) :: el, rv, xl, b, pax + + ! Convert to radians + glat = xlat4 * RADS + glong = xlon4 * RADS + + ! Call the external routine + call tmoonsub(day, glat, glong, el, rv, xl, b, pax) + + ! Convert back to real*4 + xl4 = real(xl, 4) + b4 = real(b, 4) end subroutine tm2 + +end module tm2_mod |
