updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / da / da_tools / da_set_merc.inc
blob0da8dfb81f38e3e9f6b5e2afaca48fb47cf72242
1 subroutine da_set_merc(proj)
2   
3    !--------------------------------------------------------------------------
4    ! Purpose: Sets up the remaining basic elements for the mercator projection
5    !--------------------------------------------------------------------------
7    implicit none
9    type(proj_info), intent(inout)       :: proj
11    real :: clain
13    if (trace_use) call da_trace_entry("da_set_merc")
15    !  Preliminary variables
17    clain = COS(rad_per_deg*proj%truelat1)
18    proj%dlon = proj%dx / (earth_radius_m * clain)
20    ! Compute distance from equator to origin, and store in the 
21    ! proj%rsw tag.
23    proj%rsw = 0.0
24    if (proj%lat1 .NE. 0.0) then
25       proj%rsw = (alog(tan(0.5*((proj%lat1+90.)*rad_per_deg))))/proj%dlon
26    end if
28    if (trace_use) call da_trace_exit("da_set_merc")
30 end subroutine da_set_merc