calc_lat Function

function calc_lat(i, imax, dy)

Arguments

Type IntentOptional Attributes Name
integer :: i
integer :: imax
real(kind=ESMF_KIND_R8) :: dy

Return Value real(kind=ESMF_KIND_R8)


Source Code

 function calc_lat(i,imax,dy)
   integer :: i, imax
   real(ESMF_KIND_R8) :: calc_lat
   real(ESMF_KIND_R8) :: dy

        if (i .eq. 1) then
           calc_lat = -90.0
        else if (i .eq. imax) then
           calc_lat = 90.0
        else 
           calc_lat = REAL(i-1)*dy - 0.5*dy - 90.0
        endif
 end function calc_lat