C------------------------------------------------------------------------ subroutine ftupi2(i2vals,nvals,temp) C unpack array of 2-byte integers into 4-integers C This routine is only currently used on the SUN Solaris F90 C which does not directly support integer*2 variables and instead C maps them into integer*4 variables. integer nvals,ii,jj integer*2 temp character*1 i2vals(nvals*4),zero,neg,pos zero = char(0) C neg is use to extend the sign bit if the value is negative neg = char(255) pos = char(127) jj=nvals*4 do 10 ii = nvals*2,2,-2 i2vals(jj)=i2vals(ii) i2vals(jj-1)=i2vals(ii - 1) C fill in the 2 most-significant bytes if (i2vals(jj-1) .le. pos)then i2vals(jj-2)=zero i2vals(jj-3)=zero else i2vals(jj-2)=neg i2vals(jj-3)=neg end if jj=jj-4 10 continue end