da_set_ps.inc

References to this file elsewhere.
1 subroutine da_set_ps(proj)
2 
3    ! Initializes a polar-stereographic map projection from the partially
4    ! filled proj structure. This routine computes the radius to the
5    ! southwest corner and computes the i/j location of the pole for use
6    ! in llij_ps and ijll_ps.
7 
8    implicit none
9  
10    type(proj_info), intent(inout)    :: proj
11 
12    real                              :: ala1
13    real                              :: alo1
14    real                              :: reflon
15    real                              :: scale_top
16 
17    ! To define the cone factor for polar stereographic projection 
18    proj%cone = 1.0
19 
20    reflon = proj%stdlon + 90.0
21 
22    ! Compute numerator term of map scale factor
23    scale_top = 1. + proj%hemi * Sin(proj%truelat1 * rad_per_deg)
24 
25    ! Compute radius to lower-left (SW) corner
26    ala1 = proj%lat1 * rad_per_deg
27    proj%rsw = proj%rebydx*COS(ala1)*scale_top/(1.+proj%hemi*Sin(ala1))
28 
29    ! Find the pole point
30    alo1 = (proj%lon1 - reflon) * rad_per_deg
31    proj%polei = proj%knowni - proj%rsw * COS(alo1)
32    proj%polej = proj%knownj - proj%hemi * proj%rsw * Sin(alo1)
33    if (print_detail_map) then
34       print '(A,2F10.1)', 'Computed (I,J) of pole point: ',proj%polei,proj%polej
35    end if
36 
37 end subroutine da_set_ps
38 
39