00001
00002
00003 MODULE trigonometry_grav_theta
00004 use phys_constant, only : nntg, long
00005 use grid_parameter, only : ntg
00006 use coordinate_grav_theta, only : thg, hthg
00007 implicit none
00008 real(long) :: sinthg(0:nntg),costhg(0:nntg)
00009 real(long) :: cosecthg(0:nntg),cotanthg(0:nntg)
00010 real(long) :: hsinthg(nntg), hcosthg(nntg)
00011 real(long) :: hcosecthg(nntg), hcotanthg(nntg)
00012 contains
00013
00014
00015
00016 subroutine trig_grav_theta
00017 IMPLICIT NONE
00018 INTEGER :: it
00019 DO it = 0, ntg
00020 sinthg(it) = SIN(thg(it))
00021 costhg(it) = COS(thg(it))
00022 END DO
00023 cosecthg( 0) = 0.0e0
00024 cotanthg( 0) = 0.0e0
00025 DO it = 1, ntg - 1
00026 cosecthg(it) = 1.0e0/SIN(thg(it))
00027 cotanthg(it) = 1.0e0/TAN(thg(it))
00028 END DO
00029 cosecthg(ntg) = 1.0e0
00030 cotanthg(ntg) = 0.0e0
00031
00032 DO it = 1, ntg
00033 hsinthg(it) = SIN(hthg(it))
00034 hcosthg(it) = COS(hthg(it))
00035 END DO
00036 DO it = 1, ntg
00037 hcosecthg(it) = 1.0e0/SIN(hthg(it))
00038 hcotanthg(it) = 1.0e0/TAN(hthg(it))
00039 END DO
00040
00041 end subroutine trig_grav_theta
00042 end module trigonometry_grav_theta