<HTML> <BODY BGCOLOR=#ccccdd LINK=#0000aa VLINK=#0000ff ALINK=#ff0000 ><BASE TARGET="bottom_target"><PRE>
<A NAME='DA_LC_CONE'><A href='../../html_code/tools/da_lc_cone.inc.html#DA_LC_CONE' TARGET='top_target'><IMG SRC="../../gif/bar_red.gif" border=0></A>

subroutine da_lc_cone(truelat1, truelat2, cone) 2,2

   !------------------------------------------------------------------------
   ! Purpose: compute the cone factor of a Lambert Conformal projection
   !------------------------------------------------------------------------

   implicit none
    
   real, intent(in)             :: truelat1  ! (-90 -&gt; 90 degrees N)
   real, intent(in)             :: truelat2  !   "   "  "   "     "
   real, intent(out)            :: cone

   if (trace_use_dull) call da_trace_entry("da_lc_cone")

   ! First, see if this is a secant or tangent projection.  For tangent
   ! projections, truelat1 = truelat2 and the cone is tangent to the 
   ! Earth's surface at this latitude.  For secant projections, the cone
   ! intersects the Earth's surface at each of the distinctly different
   ! latitudes
   if (abs(truelat1-truelat2) &gt; 0.1) then
      cone = alog10(cos(truelat1*rad_per_deg)) - &amp;
             alog10(cos(truelat2*rad_per_deg))
      cone = cone /(alog10(tan((45.0 - abs(truelat1)/2.0) * rad_per_deg)) - &amp;
             alog10(tan((45.0 - abs(truelat2)/2.0) * rad_per_deg)))        
   else
      cone = sin(abs(truelat1)*rad_per_deg)  
   end if

   if (trace_use_dull) call da_trace_exit("da_lc_cone")

end subroutine da_lc_cone