1 subroutine da_set_ps(proj)
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.
10 type(proj_info), intent(inout) :: proj
17 if (trace_use) call da_trace_entry("da_set_ps")
19 ! To define the cone factor for polar stereographic projection
22 reflon = proj%stdlon + 90.0
24 ! Compute numerator term of map scale factor
25 scale_top = 1.0 + proj%hemi * Sin(proj%truelat1 * rad_per_deg)
27 ! Compute radius to lower-left (SW) corner
28 ala1 = proj%lat1 * rad_per_deg
29 proj%rsw = proj%rebydx*COS(ala1)*scale_top/(1.0+proj%hemi*Sin(ala1))
32 alo1 = (proj%lon1 - reflon) * rad_per_deg
33 proj%polei = proj%knowni - proj%rsw * COS(alo1)
34 proj%polej = proj%knownj - proj%hemi * proj%rsw * Sin(alo1)
35 if (print_detail_map) then
36 write(unit=stdout,fmt='(A,2F10.1)') 'Computed (I,J) of pole point: ',proj%polei,proj%polej
39 if (trace_use) call da_trace_exit("da_set_ps")
41 end subroutine da_set_ps