SUBROUTINE OVERMAX(maxlevel,nps,k0,np0,k,np) C OVERMAX CALCULATES THE POSITION OF A READING WHICH C HAS AN INDICES GREATER THAN MAXLEVEL c******************************************************* c c Passed Variables c c maxlevel - maximum allowable index for data array c nps - parameter number for second header. This is c the maximum parameter number (second elemen location). c k0 - original index c np0 - original second element location in data array c k - new index c np - new second element location in data array c c******************************************************* c******************************************************* c c ir2 is the number of requested calculated c parameters. This is needed to figure out the c new second element location. However, calculated c parameters are rarely used. In most cases ir2=0 c c******************************************************* common /extra/ ir2,ireqsecond,ireqbio np=0 k=0 k1=(k0-1)/maxlevel k= k0 - (k1*maxlevel) if ( k0 .gt. maxlevel ) then if ( ir2 .gt. maxlevel ) ir2=0 np= ((nps+ir2+2)*k1)+ np0 else np= np0 endif return end