[SAC-HELP] SAC/SACA file format verification

George Helffrich george at gly.bris.ac.uk
Sat Mar 28 06:30:33 PDT 2009


Dear Dan -

	Some responses to your queries:

On 28 Mar 2009, at 12:28, Daniel Griscom wrote:

...

> At 10:39 AM +0000 3/28/09, George Helffrich wrote:
>> 	1) Undefined character values in the binary file should be padded 
>> with blanks, not trailing zero characters, to their field lengths (8 
>> or 16 characters, as appropriate);
>
> Are you sure? The SACA example I have uses trailing nulls (which 
> surprised me).

Positive.  The binary format is defined by Fortran behavior.  Character 
fields are blank-filled; trailing nulls have no significance in 
Fortran.

> ...
>
>> 	3) I think that you can safely set IDEP to IACC (integer number 8) 
>> to signify that the dependent variable is acceleration.
>
> The values in the data section are in m/s/s, not nm/s/s; would you 
> still suggest IACC ("Acceleration in nm/sec/sec")?

I'm not particularly bothered by the units discrepancy, but you could 
fix it either by 1) multiplying samples by 10**9; 2) setting SCALE to 
be 10**-9 with unchanged samples; 3) go back to setting IDEP to IUNKN 
(but you *do* know, after all).

>
>> 	4) The component naming fields KCMPNM for the traces don't follow 
>> FDSN standards.  (See Appendix A of the SEED manual).  My reading of 
>> the manual suggests that, for the sample rate shown, the channels 
>> should be named with three-letter codes BNx, where x is the 
>> orientation letter.  N (middle character) is the code for an 
>> accelerometer.  ZNE aren't useful because orientation can't be 
>> guaranteed.  XYZ are probably OK for consistent usage with your 
>> program documentation, though they aren't FDSN-endorsed.  FDSN would 
>> prescribe them to be 123 (orthogonal but orientation not guaranteed).
>
> Ah, hadn't seen that reference. Excellent. Letter by letter:
>
> 1: The band code letter. My sample rates can be from 20Hz to 500Hz 
> (user selected). Should I change based on the sample rate? If so then 
> I'd switch between S, E or D, assuming that for accelerometers "corner 
> period" means the native resonance of the detector, which in this case 
> is extremely high.
>
> 2: Instrument code: pretty clearly "N".
>
> 3: Orientation code. I want the vertical samples to be marked 
> vertical, but don't want to imply specific directions for the two 
> horizontal vectors. I'm using "1", "2" and "Z" right now; should I 
> switch to "X", "Y" and "Z"? Or perhaps even "2", "3" and "Z" (with 
> vertical being the primary component of interest)?

Hmmm.  The first character choice depends on the idea of a 
seismometer's corner period, where its response to velocity turns flat. 
  Accelerometers aren't built to be flat to velocity anywhere.  Their 
response is broad band, however, because they are flat to acceleration 
from DC to a very high frequency.  In that spirit, I'd use either B or 
H as appropriate to the sample rate.

My vote for the last character is XYZ, since you'll never be 
FDSN-compliant if you want to use Z (but a laptop on my lap isn't 
guaranteed to have Z up, either).  At least there will be a clear link 
between the trace names and the computer-fixed coordinate system.

> ...
> P.S. For all you Mac-owning seismologists, I'd also be interested in 
> any feedback you may have about the data export process. Right now you 
> choose the axis and name and then save, which means to save all three 
> axes you have to enter three different names. I'm considering going to 
> saving a folder instead of a file, with the folder containing three 
> axis files. Thoughts?

Only this:  Folders don't seem to have any benefit other than reducing 
file name typing.  In the save dialog just provide a choice of a file 
prefix and whether to save X, Y, Z, or all components.  Then generate 
the suffixes like the component names.  Trying to encode too much 
information in a file name leads to quite cumbersome names like what 
rdseed writes!

                                     George Helffrich
                                     george at geology.bristol.ac.uk




More information about the sac-help mailing list