1 subroutine da_get_reglats( nj, lat, sinlat, coslat, int_wgts)
3 !-----------------------------------------------------------------------
5 !-----------------------------------------------------------------------
9 integer, intent(in) :: nj ! Number of latitudes
10 real, intent(out) :: lat(1:nj) ! Latitude(radians, from south).
11 real, intent(out) :: sinlat(1:nj) ! sin(Latitude).
12 real, intent(out) :: coslat(1:nj) ! cos(Latitude).
13 real, intent(out) :: int_wgts(1:nj) ! Legendre Integration weights.
15 integer :: j ! Loop counter.
16 real :: delta_phi ! Regular latitude interval.
18 if (trace_use) call da_trace_entry("da_get_reglats")
20 delta_phi = pi / real(nj-1)
23 lat(j) = -0.5 * pi + delta_phi * real(j - 1)
24 sinlat(j) = sin(lat(j))
25 coslat(j) = cos(lat(j))
26 int_wgts(j) = coslat(j) * delta_phi
28 ! use symmetry for northern hemisphere:
30 sinlat(nj+1-j) = -sinlat(j)
31 coslat(nj+1-j) = coslat(j)
32 int_wgts(nj+1-j) = int_wgts(j)
35 if ((nj+1) / 2 == nj/2 + 1) then ! Odd, then equator point:
39 int_wgts(nj/2+1) = delta_phi
42 if (trace_use) call da_trace_exit("da_get_reglats")
44 end subroutine da_get_reglats