      subroutine mpsref(opr,iswt,ref,nref,ierror)
      character opr*1
      real ref(2)
      include 'iosys.cmn'
      ierror=0
      if(opr.eq.'r'.or.opr.eq.'R') then
        if(iproj.lt.0.or.iproj.gt.9) then
          ierror=1
          nref=0
          return
        endif
        ref(1)=cmdeg
        ref(2)=bldeg
        nref=2
      else if(opr.eq.'w'.or.opr.eq.'W') then
        cmdeg=ref(1)
        bldeg=ref(2)
      else
        ierror=1
        nref=0
      endif
      return
      end
