Code:
if (z == zmin - dz) {
# z 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28
# 30 32 34 36 38 40 42 44 46 48 50
# 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80
print $1,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,
c1,c1,c1,c1,c1,c1,c1,c1,c1,c1,c1,
$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2
}
if (z == zmin) {
# z 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28
# 30 32 34 36 38 40 42 44 46 48 50
# 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80
print $1,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,c1,
c2,c2,c2,c2,c2,c2,c2,c2,c2,c2,c2,
c1,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2
}
if (z == zmin + dz) {
# z 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28
# 30 32 34 36 38 40 42 44 46 48 50
# 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80
print $1,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,c1,c2,
c3,c3,c3,c3,c3,c3,c3,c3,c3,c3,c3,
c2,c1,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2
}
# -------------------------------------------------------------
# 5. Full negative or positive anomaly
if ((zmin + dz < z) && (z < zmax - dz)) {
# z 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28
# 30 32 34 36 38 40 42 44 46 48 50
# 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80
print $1,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,c1,c2,c3,
ca,ca,ca,ca,ca,ca,ca,ca,ca,ca,ca,
c3,c2,c1,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2,$2
}