iwrk = 1
do i = iwrk, ncvarxmax(grdchkvarindex)
integer iwrk, jwrk, kwrk
iwrk = ilocmem (ichknum-1)
iwrk = iwrk + 1