You are on page 1of 1

Technical Note

Understanding the IJK Index

Example of model prototype parameters:

 XMORIG: 0

 YMORIG: 0

 ZMORIG: 0

 NX: 4

 NY: 3

 NZ: 3

 XINC: 10

 YINC: 10

 ZINC: 10

IJK = (I-1)*NY*NZ + (J-1)*NZ + (K-1)

I, J & K as a function of a cell (XC,YC,ZC): I, J & K as a function of a cell IJK Index:

 I = INT((XC-XMORIG)/XINC) + 1 I = INT(IJK/(NY*NZ)) + 1

 J = INT((YC-YMORIG)/YINC) + 1 J = INT((IJK – (I-1)*NY*NZ)/NZ) + 1

 K = INT((ZC-ZMORIG)/ZINC) + 1 K = IJK - ((I-1)*NY*NZ) - ((J-1)*NZ) + 1

Cell coordinates as a function of I, J & K:

 XMIN = XMORIG + (I-1)*XINC, XC = XMORIG + (I -.5)*XINC, XMAX = XMORIG + I*XINC

 YMIN = YMORIG + (J-1)*YINC, YC = YMORIG + (J -.5)*YINC, YMAX = YMORIG + J*YINC

 ZMIN = ZMORIG + (K-1)*ZINC, ZC = ZMORIG + (K -.5)*ZINC, ZMAX = ZMORIG + K*ZINC

Author: Original document by Daniel LeBlanc

This documentation is confidential and may not be disclosed to third parties


without the prior written permission of Datamine Corporate Limited.

© Datamine Corporate Limited


1

You might also like