summaryrefslogtreecommitdiff
path: root/map65/libm65/tm2.f90
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2026-06-22 12:03:44 +0200
committerChristoph Berg <myon@debian.org>2026-06-22 12:03:44 +0200
commitd83a420f0517d7fc47aeb288a6a0cf4891784fcc (patch)
tree6d9c83527c56458a8360ba080bf5f4ca73d526dc /map65/libm65/tm2.f90
parent4b089ae3f7e9e2d5662f718f663b26a4e8ee63ca (diff)
New upstream version 3.0.2+dfsgupstream/3.0.2+dfsg
Diffstat (limited to 'map65/libm65/tm2.f90')
-rw-r--r--map65/libm65/tm2.f9043
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