MAPL_ease_inverse Subroutine

public subroutine MAPL_ease_inverse(EASELabel, r, s, lat, lon, rc)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: EASELabel
real, intent(in) :: r
real, intent(in) :: s
real, intent(out) :: lat
real, intent(out) :: lon
integer, intent(out), optional :: rc

Calls

proc~~mapl_ease_inverse~~CallsGraph proc~mapl_ease_inverse MAPL_ease_inverse interface~mapl_assert MAPL_Assert proc~mapl_ease_inverse->interface~mapl_assert proc~mapl_return MAPL_Return proc~mapl_ease_inverse->proc~mapl_return proc~mapl_verify MAPL_Verify proc~mapl_ease_inverse->proc~mapl_verify at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Called by

proc~~mapl_ease_inverse~~CalledByGraph proc~mapl_ease_inverse MAPL_ease_inverse proc~mapl_ease_extent MAPL_ease_extent proc~mapl_ease_extent->proc~mapl_ease_inverse

Source Code

  subroutine MAPL_ease_inverse (EASELabel, r, s, lat, lon, rc)   ! note odd/reversed order of (r,s) and (lat,lon)

    ! Note: Get lat/lon of grid cell borders by using fractional indices.
    !       E.g., s=-0.5 yields northern grid cell boundary of northernmost grid cells.

    character*(*),     intent(in)  :: EASELabel
    real,              intent(in)  :: r, s         ! r = lon index,  s = lat index
    real,              intent(out) :: lat, lon
    integer, optional, intent(out) :: rc

    character(3)  :: grid
    integer       :: status

    if (     index(EASELabel,'M36') /=0 ) then
       grid='M36'
    else if (index(EASELabel,'M25') /=0 ) then
       grid='M25'
    else if (index(EASELabel,'M09') /=0 ) then
       grid='M09'
    else if (index(EASELabel,'M03') /=0 ) then
       grid='M03'
    else if (index(EASELabel,'M01') /=0 ) then
       grid='M01'
    else
       _FAIL("MAPL_ease_inverse(): unknown grid projection and resolution: "//trim(EASELabel)//"  STOPPING.")
    endif

    if(     index(EASELabel,'EASEv2') /=0) then
       call easeV2_inverse(grid,r,s,lat,lon, _RC)
    else if(index(EASELabel,'EASEv1') /=0) then
       call easeV1_inverse(grid,r,s,lat,lon, _RC)
    else
       _FAIL("MAPL_ease_inverse(): unknown grid version: "//trim(EASELabel)//"  STOPPING.")
    endif

    _RETURN(_SUCCESS)

  end subroutine MAPL_ease_inverse