Data converter from WIN32 format to SAC format. It also supports BINARY/ASCII outputs.
win2sac_32 winfile ch_no sacfile [outdir] [-p(prmfile)] [-Y] [-e] [-b[BIN]] [-a[ASC]] [-r(RATIO)] [-m(PMAX)]
one win32 file to be converted.
channle numbers to be extracted. It can be:
a channel number (e.g.
a list of channel numbers, separated by commas (e.g.
a file contains channel numbers, see details below
extension of output SAC files
output directory. Default is current directory if not specified or is
-. The output directory must exist.
specify paramerter file. Default name is
win.prm. See details below.
use wild channel code. organization id + network id + channle id.
specify SAC/BIN output to use endian of current machine. Defaults to use big endian.
extension of BIN format. Defaults to
extension of ASC format. Defaults to
the ratio to multiply for BIN/ASC format. Defaults to 1.0.
maximum number of data points. Defaults to
2000000. If you data has more data points, you must increase this value.
win2sac_32 2000082404000101VM.cnt 4c55,4c65 SAC DATA -e > junk.log
The SAC files extracted by
win2sac_32 are always in physical quality,
not in digital counts.
The raw data saved in win32 format is in digital counts. When extracting data
from win32 format,
win2sac_32 always convert digital counts to the
corresponding physical quantity by remove sensitivity from waveform data,
and multiply by 1.0e9 to convert unit from meter to nanometer.
The output SAC files are in
The default filename format is
N.NABC.U.SAC). You can only modify the extensions.
Channel number file format
You can save all channel numbers you want to extract into one file.
line starts with
#is comment line and skipped
blank lines are skipped
channel numbers can be separated by spaces, tabs, or commas
each line can contain no more than 2000 characters
Below is an example:
6034,6035 # 6036 # this line is ignored 6038 6039
Using this feature may result in data loss, as
win2sac_32 will exit
if data of any channel doesn’t exist in the win32 file.
If you still want to use this fearture, you can modify Line 386 of
fprintf(stderr, "Data for channel %x not existed\n", sysch); iRet = 1;
fprintf(stderr, "Data for channel %x not existed\n", sysch);
win32 system need a parameter file to run. This parameter file has many lines.
win2sac_32 only uses the 2nd and 4th lines, and ignores all other lines.
An example of a four line parameter file:
. 0101_20100101.ch . .
The 2nd line is the name of channle table file.
win2sac_32 need to read
this file to extract waveform of specified channels.
The 4th line is the path of pick files. It’s useless for most cases.
The component information is written to SAC header variables
U/Z: CMPAZ = 0.0, CMPINC = 0.0
N/X: CMPAZ = 0.0, CMPINC = 90.0
E/Y: CMPAZ = 90.0, CMPINC = 90.0
Other: CMPAZ = 0.0, CMPINC = 0.0
Azimuths of sensors are NOT accurate.
See https://hinetwww11.bosai.go.jp/auth/direc/?LANG=en for details.