      subroutine mpxnam(iopr,name,iproj,ierror)
      character name*80
      ierror=0
      if(iopr.eq.1) then
        if(iproj.lt.0.or.iproj.gt.9) then
          ierror=1
          return
        endif
        goto (1,2,3,4,5,6,7,8,9,10) iproj+1
    1   name='not specified'
        nchnam=13
        return
    2   name='polyconic'
        nchnam=9
        return
    3   name='ellipsoidal transverse mercator'
        nchnam=31
        return
    4   name='mercator'
        nchnam=8
        return
    5   name='lambert (standard U.S. parallels at 33N and 45N)'
        nchnam=48
        return
    6   name='albers us (parallels at 29.5N and 45.5N)'
        nchnam=40
        return
    7   name='albers alaska (parallels at 55N and 65N)'
        nchnam=40
        return
    8   name='albers hawaii (parallels at 8N and 18N)'
        nchnam=39
        return
    9   name='polar stereographic'
        nchnam=19
        return
   10   name='spherical transverse mercator (DNAG)'
        nchnam=36
        return
      else if(iopr.eq.2) then
        if(name(1:1).eq.'n'.or.name(1:1).eq.'N') then
          iproj=0
        else if(name(1:4).eq.'poly'.or.name(1:4).eq.'POLY') then
          iproj=1
        else if(name(1:1).eq.'e'.or.name(1:1).eq.'E') then
          iproj=2
        else if (name(1:1).eq.'m'.or.name(1:1).eq.'M') then
          iproj=3
        else if (name(1:1).eq.'l'.or.name(1:1).eq.'L') then
          iproj=4
        else if (name(1:8).eq.'albers u'.or.
     1    name(1:8).eq.'ALBERS U') then
          iproj=5
        else if (name(1:8).eq.'albers a'.or.
     1    name(1:8).eq.'ALBERS A') then
          iproj=6
        else if (name(1:8).eq.'albers h'.or.
     1    name(1:8).eq.'ALBERS H') then
          iproj=7
        else if(name(1:4).eq.'pola'.or.name(1:4).eq.'POLA') then
          iproj=8
        else if (name(1:1).eq.'s'.or.name(1:1).eq.'S') then
          iproj=9
        else
          ierror=1
        endif
        return
      else
        ierror=1
        return
      endif
      end

