! ************************************************************** !
    subroutine envarf(envstring,enviroval)
! ************************************************************** !
    implicit none
    integer, parameter :: slen = 70
    integer, parameter :: elen = 100
    integer :: envlen
    integer :: flg
    integer :: wlen
    character(len=slen) :: envstring
    character(len=slen) :: enviroval
    character(len=elen) :: errorstr
    envlen = len_trim(envstring)
    call envarc( envstring, envlen, enviroval, slen, flg, errorstr, elen )
    wlen = len_trim(enviroval)
    if(enviroval(wlen:wlen).ne."/") enviroval(wlen+1:wlen+1)="/"
    end
