Back to SIOSEIS Examples.          Go to the list of seismic processes.          Go to SIOSEIS introduction.

SEG-Y Rev 1 specifies four coordinate units (short word 45, bytes 89-90):
1 = length (meters or feet)
2 = seconds of arc
3 = decimal degrees
4 = degrees, minutes, seconds (DDDMMSS.ss) 

Rev 0 only allowed 1 and 2 because 32 bit integers were preferred (the only
floating point allowed was IBM).  Thus, latitude and longitude were expressed
in seconds of arc.

SIOSEIS process header may be used to convert arcseconds to decimal degrees.

From sioseis documentation (segy.header)
Byte        16BIT 32BIT 64BIT pointer    DESCRIPTION OF USE
            WORD  WORD  WORD   name
            INDEX INDEX INDEX  
            ----- ----- ----- -------

  71-72     36                           Scalar to be applied to coordinates
                                         in bytes 73-88.
                                         If positive use as a multiplier.
                                         If negative, use as a divisor.
  73-76             19    19  lsxcoptr   longitude in seconds of arc.
                                         Source X coordinate.
                                         See short word 36 (bytes 31-32) - scalar
  77-80             20    20  lsycoptr   latitude in seconds of arc.
                                         Source Y coordinate.
                                         See short word 36 (bytes 31-32) - scalar
  81-84             21    21  lrxcoptr   Receiver longitude or X coordinate
  85-88             22    22  lrycoptr   Receiver latitude or Y coordinate
  89-90     45                           Coordinate units; 1 = length (meters or feet)
                                         2 = seconds of arc, 3 = decimal degrees,
                                         4 = degrees, minutes, seconds (DDDMMSS.ss)

The easiest method - convert to decimal and set coordinate units

sioseis << eof procs diskin header diskoa end diskin ntodo 1 ipath 0012_2011_155_1053_100212_CHP4.0_RAW_021.sgy end end header r19 = l19 / 3600. ! convert to decimal degrees r20 = l20 / 3600. i45 = 3 ! set coordinate units to decimal degrees end end diskoa opath data end end end eof Overwriting the coordinates and settng the coordinate units correctly makes the output file compliant with the SEG-Y standard.

Harder way - determine units scalar, convert coordinates, apply scalar, reset scalar

If the SEG-Y scalar is not honored by the next program, the scalar must be removed. Use prout parameter indices to print the scalar and units. e.g. SIOSEIS ver 2011.2.15 (16 June 2011) (C) Regents of U.C. procs diskin prout end diskin ntodo 1 ipath 0012_2011_155_1053_100212_CHP4.0_RAW_021.sgy end end prout fno 0 lno 9999999 ftr 0 ltr 999 indices l3 i36 i45 end end end **** 0 ERRORS IN THIS JOB **** 6545.0 -1000.0 2.0000 Scalar -1000 means the arcseconds were multiplied by 1000. before being written as 32 bit integers in the trace header. The scalar probably will never change. Then, convert arcseconds to decimal degress, then divided by the (negated) scalara sioseis << eof procs diskin header diskoa end diskin ntodo 1 ipath 0012_2011_155_1053_100212_CHP4.0_RAW_021.sgy end end header r60 = l19 / 3600. ! convert to decimal degrees r59 = i36 * -1 r19 = r60 / r59 r60 = l20 / 3600. r20 = r60 / r59 i36 = 0 ! set scalar to not used i45 = 3 ! set coordinate units to decimal degrees end end diskoa opath data end end end eof

Checking the results with lsd

the original file in arcseconds

lsd 0012_2011_155_1053_100212_CHP4.0_RAW_021.sgy 1 1 1 SHOT TR RP TR ID RANGE DELAY NSAMPS SI YR DAY HR MIN SEC 6545 1 0 0 1 0 3433 1333 49 2011 155 10 53 45 shot 6545 tr 1 src 0 rp 0 tr 0 id 1 eog -1376256 fold 1 range 0 relev 0.0000000 selev 0.0000000 sdep 0.0000000 wdep 2601.5500 time switch or shot time millisecond 2 source long -126 37 7.3546720 ( 455827.34 arcsecs) source lat. 46 58 58.644539 ( 169138.64 arcsecs) Sweep frequency at start (Hz). 2772 Sweep frequency at end (Hz). 5772 Sweep length: 1

the new file with units scaled the same as the original file

The new file without a SEG-Y units scalar SIOSEIS ver 2011.2.15 (16 June 2011) (C) Regents of U.C. procs diskin header diskoa end diskin ntodo 1 ipath 0012_2011_155_1053_100212_CHP4.0_RAW_021.sgy end end header r60 = l19 / 3600. ! convert to decimal degrees r59 = i36 * -1 r19 = r60 / r59 r60 = l20 / 3600. r20 = r60 / r59 i36 = 0 ! set scalar to not used i45 = 3 ! set coordinate units to decimal degrees end end diskoa opath data end end end **** 0 ERRORS IN THIS JOB **** 55>!lsd lsd data 1 1 1 SHOT TR RP TR ID RANGE DELAY NSAMPS SI YR DAY HR MIN SEC 6545 1 0 0 1 0 3433 1333 49 2011 155 10 53 45 shot 6545 tr 1 src 0 rp 0 tr 0 id 1 eog -1376256 fold 1 range 0 relev 0.0000000 selev 0.0000000 sdep 0.0000000 wdep 2601.5500 time switch or shot time millisecond 2 Source and receiver xy coordinates: -126.61871 46.982956 0.0000000 0.0000000 source long. -126 37 7.3546720 ( 455827.34 arcsecs) source lat. 46 58 58.644539 ( 169138.64 arcsecs) Sweep frequency at start (Hz). -11254 Sweep frequency at end (Hz). -29674 Sweep length: 256 The last step requires lsd updated 21 June 2011