MAPL_ease_convert Subroutine

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

Arguments

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

Calls

proc~~mapl_ease_convert~~CallsGraph proc~mapl_ease_convert MAPL_ease_convert interface~mapl_assert MAPL_Assert proc~mapl_ease_convert->interface~mapl_assert proc~mapl_return MAPL_Return proc~mapl_ease_convert->proc~mapl_return proc~mapl_verify MAPL_Verify proc~mapl_ease_convert->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

Source Code

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

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

    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_convert(): unknown grid projection and resolution: "//trim(EASELabel)//"  STOPPING.")
    endif

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

    _RETURN(_SUCCESS)

  end subroutine MAPL_ease_convert