da_lc_cone.inc
References to this file elsewhere.
1 subroutine da_lc_cone(truelat1, truelat2, cone)
2
3 !------------------------------------------------------------------------
4 ! Purpose: compute the cone factor of a Lambert Conformal projection
5 !------------------------------------------------------------------------
6
7 implicit none
8
9 real, intent(in) :: truelat1 ! (-90 -> 90 degrees N)
10 real, intent(in) :: truelat2 ! " " " " "
11 real, intent(out) :: cone
12
13 ! First, see if this is a secant or tangent projection. For tangent
14 ! projections, truelat1 = truelat2 and the cone is tangent to the
15 ! Earth's surface at this latitude. For secant projections, the cone
16 ! intersects the Earth's surface at each of the distinctly different
17 ! latitudes
18 if (ABS(truelat1-truelat2) > 0.1) then
19 cone = ALOG10(COS(truelat1*rad_per_deg)) - &
20 ALOG10(COS(truelat2*rad_per_deg))
21 cone = cone /(ALOG10(TAN((45.0 - ABS(truelat1)/2.0) * rad_per_deg)) - &
22 ALOG10(TAN((45.0 - ABS(truelat2)/2.0) * rad_per_deg)))
23 else
24 cone = Sin(ABS(truelat1)*rad_per_deg)
25 end if
26
27 end subroutine da_lc_cone
28
29