Calculating indices of complex blocks for given velocities ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Input: SALTV1... Limit for undefined velocity. \$4 is 0 for velocities less than or equal to SALTV1. SALTV2... Velocity defining surface 1. \$4 is 1 for velocities less than or equal to SALTV2. SALTV5... Velocity defining surface 5. \$4 is 5 for velocities greater than or equal to SALTV5. SALTD3,SALTD4... Data to sort the remaining gridpoints. SALTD3 specifies the free-space zone along surface 2, SALTD4 specifies the free-space zone along surface 4. \$4 is 2 for \$2-SALTD3.ge.0, \$4 is 0 for \$2-SALTD3.lt.0 and \$2+SALTD3.ge.0, \$4 is 3 for \$2+SALTD3.lt.0 and \$3-SALTD4.ge.0, \$4 is 0 for \$3-SALTD4.lt.0 and \$3+SALTD4.gt.0, \$4 is 4 for \$3+SALTD4.le.0. \$1... Given gridded velocities. \$2... Gridded values of the function describing the geopressure horizon GP2. \$3... Gridded values of the function describing the geopressure Output: \$4... Indices of complex blocks relevant to the velocities. Flag whether the index of complex block is to be determined FLAG=1 Free space in place of undefined velocity DIF=SALTV1-\$1 DIF=MAX(-0.1,DIF) DIF=MIN(DIF,0.1) DIF=DIF+FLAG DIF=INT(DIF) FLAG=FLAG-DIF FLAG=MAX(0,FLAG) Complex block 1 DIF=SALTV2-\$1 DIF=MAX(-0.1,DIF) DIF=MIN(DIF,0.1) DIF=DIF+FLAG DIF=INT(DIF) FLAG=FLAG-DIF FLAG=MAX(0,FLAG) ICB=DIF Complex block 5 DIF=\$1-SALTV5 DIF=MAX(-0.1,DIF) DIF=MIN(DIF,0.1) DIF=DIF+FLAG DIF=INT(DIF) FLAG=FLAG-DIF FLAG=MAX(0,FLAG) DIF=5*DIF ICB=ICB+DIF Complex block 4 DIF=\$3+SALTD4 DIF=0-DIF DIF=MAX(-0.1,DIF) DIF=MIN(DIF,0.1) DIF=DIF+FLAG DIF=INT(DIF) FLAG=FLAG-DIF FLAG=MAX(0,FLAG) DIF=4*DIF ICB=ICB+DIF Complex block 2 DIF=\$2-SALTD3 DIF=MAX(-0.1,DIF) DIF=MIN(DIF,0.1) DIF=DIF+FLAG DIF=INT(DIF) FLAG=FLAG-DIF FLAG=MAX(0,FLAG) DIF=2*DIF ICB=ICB+DIF Free space between blocks 2 and 3 DIF=\$2+SALTD3 DIF=MAX(-0.1,DIF) DIF=MIN(DIF,0.1) DIF=DIF+FLAG DIF=INT(DIF) FLAG=FLAG-DIF FLAG=MAX(0,FLAG) Complex block 3 DIF=\$3-SALTD4 DIF=MAX(-0.1,DIF) DIF=MIN(DIF,0.1) DIF=DIF+FLAG DIF=INT(DIF) FLAG=FLAG-DIF FLAG=MAX(0,FLAG) DIF=3*DIF ICB=ICB+DIF \$4=NINT(ICB)