rossyeperez
Technical User
I have the following kind of file
DEPTH DEPTH .FT
dTim description-less DateTimeTVA Tank Volume (active) m3
MFOP Mud Flow Out % %
SPR2 SPARE 2 degC
TQA Rotary Torque (surf,avg) A
RPMA Rotary Speed (surf,avg) rpm
MDIA Mud Density In (avg) gr/cm3
ROPA Rate of Penetration (avg) min/m
WOBA Weight-on-Bit (surf,avg) tonne
HKLA Hookload (avg) tonne
SPPA Standpipe Pressure (avg) psi
ECDT ECD at Total Depth gr/cm3
MFIA Mud Flow In (avg) galus/min
SPR7 SPARE 7 spm
SPR8 SPARE 8 spm
SPR5 SPARE 5 unitless
SPR6 SPARE 6 spm
SPR3 SPARE 3 degC
SPR4 SPARE 4 unitless
SPR1 SPARE 1 gr/cm3
DMEA Depth Hole (meas) m
ActivityCode description-less UnitLess
ActivitySubCode description-less UnitLess
dTimReceived description-less UnitLess
dTimSent description-less UnitLess
DEPTH dTim TVA MFOP SPR2 TQA RPMA MDIA ROPA WOBA HKLA SPPA ECDT MFIA SPR7 SPR8 SPR5 SPR6 SPR3 SPR4 SPR1 DMEA ActivityCode ActivitySubCode dTimReceived dTimSent
1009.46 2007-01-24T21:46:43.534-06:00 89.13 0 39.1 0.18 0 1.33 0.03 23.04 48.32 0.39 1.34 17.36 0 0 0 0 0.1 0 -0.03 1009 TRIPPING TRIP IN (from s 2007-01-24T21:46:43.534-06:00 2007-01-24T21:46:43.534-06:00
1015.72 2007-01-24T21:46:54.612-06:00 89.29 0 39.09 0.18 0 1.34 0.01 23.76 49.03 0.19 1.34 17.36 0 0 0 0 0.1 0 -0.03 1015 TRIPPING TRIP IN (from s 2007-01-24T21:46:54.612-06:00 2007-01-24T21:46:54.612-06:00
1015.96 2007-01-25T20:13:11.722-06:00 150.01 86.5 40.2 0.28 0 1.29 0.03 18.42 53.58 921.46 1.29 18.74 0 0 0 0 45.62 0 1.26 1015 TRIPPING TRIP OUT (to su 2007-01-25T20:13:11.722-06:00 2007-01-25T20:13:11.722-06:00
I need to get formating a file as the following:
~VERSION INFORMATION
VERS. 2.0: CWLS Log Ascii Standard
WRAP. YES: Multiple Lines per Depth
~WELL INFORMATION
#MNEM.UNIT DATA DESCRIPTION OF MNEMONIC
#--------- ---- -----------------------
STRT .m 1009.46 :Top Depth
STOP .m 1015.96 :Bottom Depth
STEP .m .00 :Increment
NULL . -99999.00 :Null Value
COMP . Threshold Development :Company
FLD . WILDCAT :Field
STAT . TEXAS :State
SRVC . SCHLUMBERGER :Service Company
WELL . B YATES 18D :Well
UWI . B YATES18D :Unique Well ID
~CURVE INFORMATION
#MNEM.UNIT API Code Curve Description
#--------- ------------- --------------------------
DEPT .M : Bit Depth 2hz
dTim .m3 : description-less DateTimeTVA Tank Volume (active)
.
.
.
~A Log Data Section - Number of Curves = 5
1009.46 2007-01-24T21:46:43.534-06:00 89.13 0 39.1 0.18 0 1.33 0.03 23.04 48.32 0.39 1.34 17.36 0 0 0 0 0.1 0 -0.03 1009 TRIPPING TRIP IN (from s 2007-01-24T21:46:43.534-06:00 2007-01-24T21:46:43.534-06:00
1015.72 2007-01-24T21:46:54.612-06:00 89.29 0 39.09 0.18 0 1.34 0.01 23.76 49.03 0.19 1.34 17.36 0 0 0 0 0.1 0 -0.03 1015 TRIPPING TRIP IN (from s 2007-01-24T21:46:54.612-06:00 2007-01-24T21:46:54.612-06:00
1015.96 2007-01-25T20:13:11.722-06:00 150.01 86.5 40.2 0.28 0 1.29 0.03 18.42 53.58 921.46 1.29 18.74 0 0 0 0 45.62 0 1.26 1015 TRIPPING TRIP OUT (to su 2007-01-25T20:13:11.722-06:00 2007-01-25T20:13:11.722-06:00
where in well information are in the fields
STRT .m and STOP .m get the top of the values and last value insede the column DEPTH reference in this case
STRT .m 1009.46
STOP .m 1015.96
in curve information get from the original Header:
$1 . last column and description is the midle data insede of each of line
and then print the values table without the line where is the second DEPTH word
please if some body can help me I don't have really good experience with awk
Thanks
Rossy
DEPTH DEPTH .FT
dTim description-less DateTimeTVA Tank Volume (active) m3
MFOP Mud Flow Out % %
SPR2 SPARE 2 degC
TQA Rotary Torque (surf,avg) A
RPMA Rotary Speed (surf,avg) rpm
MDIA Mud Density In (avg) gr/cm3
ROPA Rate of Penetration (avg) min/m
WOBA Weight-on-Bit (surf,avg) tonne
HKLA Hookload (avg) tonne
SPPA Standpipe Pressure (avg) psi
ECDT ECD at Total Depth gr/cm3
MFIA Mud Flow In (avg) galus/min
SPR7 SPARE 7 spm
SPR8 SPARE 8 spm
SPR5 SPARE 5 unitless
SPR6 SPARE 6 spm
SPR3 SPARE 3 degC
SPR4 SPARE 4 unitless
SPR1 SPARE 1 gr/cm3
DMEA Depth Hole (meas) m
ActivityCode description-less UnitLess
ActivitySubCode description-less UnitLess
dTimReceived description-less UnitLess
dTimSent description-less UnitLess
DEPTH dTim TVA MFOP SPR2 TQA RPMA MDIA ROPA WOBA HKLA SPPA ECDT MFIA SPR7 SPR8 SPR5 SPR6 SPR3 SPR4 SPR1 DMEA ActivityCode ActivitySubCode dTimReceived dTimSent
1009.46 2007-01-24T21:46:43.534-06:00 89.13 0 39.1 0.18 0 1.33 0.03 23.04 48.32 0.39 1.34 17.36 0 0 0 0 0.1 0 -0.03 1009 TRIPPING TRIP IN (from s 2007-01-24T21:46:43.534-06:00 2007-01-24T21:46:43.534-06:00
1015.72 2007-01-24T21:46:54.612-06:00 89.29 0 39.09 0.18 0 1.34 0.01 23.76 49.03 0.19 1.34 17.36 0 0 0 0 0.1 0 -0.03 1015 TRIPPING TRIP IN (from s 2007-01-24T21:46:54.612-06:00 2007-01-24T21:46:54.612-06:00
1015.96 2007-01-25T20:13:11.722-06:00 150.01 86.5 40.2 0.28 0 1.29 0.03 18.42 53.58 921.46 1.29 18.74 0 0 0 0 45.62 0 1.26 1015 TRIPPING TRIP OUT (to su 2007-01-25T20:13:11.722-06:00 2007-01-25T20:13:11.722-06:00
I need to get formating a file as the following:
~VERSION INFORMATION
VERS. 2.0: CWLS Log Ascii Standard
WRAP. YES: Multiple Lines per Depth
~WELL INFORMATION
#MNEM.UNIT DATA DESCRIPTION OF MNEMONIC
#--------- ---- -----------------------
STRT .m 1009.46 :Top Depth
STOP .m 1015.96 :Bottom Depth
STEP .m .00 :Increment
NULL . -99999.00 :Null Value
COMP . Threshold Development :Company
FLD . WILDCAT :Field
STAT . TEXAS :State
SRVC . SCHLUMBERGER :Service Company
WELL . B YATES 18D :Well
UWI . B YATES18D :Unique Well ID
~CURVE INFORMATION
#MNEM.UNIT API Code Curve Description
#--------- ------------- --------------------------
DEPT .M : Bit Depth 2hz
dTim .m3 : description-less DateTimeTVA Tank Volume (active)
.
.
.
~A Log Data Section - Number of Curves = 5
1009.46 2007-01-24T21:46:43.534-06:00 89.13 0 39.1 0.18 0 1.33 0.03 23.04 48.32 0.39 1.34 17.36 0 0 0 0 0.1 0 -0.03 1009 TRIPPING TRIP IN (from s 2007-01-24T21:46:43.534-06:00 2007-01-24T21:46:43.534-06:00
1015.72 2007-01-24T21:46:54.612-06:00 89.29 0 39.09 0.18 0 1.34 0.01 23.76 49.03 0.19 1.34 17.36 0 0 0 0 0.1 0 -0.03 1015 TRIPPING TRIP IN (from s 2007-01-24T21:46:54.612-06:00 2007-01-24T21:46:54.612-06:00
1015.96 2007-01-25T20:13:11.722-06:00 150.01 86.5 40.2 0.28 0 1.29 0.03 18.42 53.58 921.46 1.29 18.74 0 0 0 0 45.62 0 1.26 1015 TRIPPING TRIP OUT (to su 2007-01-25T20:13:11.722-06:00 2007-01-25T20:13:11.722-06:00
where in well information are in the fields
STRT .m and STOP .m get the top of the values and last value insede the column DEPTH reference in this case
STRT .m 1009.46
STOP .m 1015.96
in curve information get from the original Header:
$1 . last column and description is the midle data insede of each of line
and then print the values table without the line where is the second DEPTH word
please if some body can help me I don't have really good experience with awk
Thanks
Rossy