aux_organisecubefiles {eseis} | R Documentation |
Convert Omnirecs/Digos Datacube files to mseed or sac files and organise in directory structure.
Description
This function converts Omnirecs/Digos Datacube files to hourly mseed or sac files and organises these in a coherent directory structure, by year, Julian day, (station, hour and channel). It depends on the cubetools or gipptools software package (see details).
Usage
aux_organisecubefiles(
stationfile,
input_dir,
output_dir,
format = "sac",
channel_name = "bh",
cpu,
fringe = "constant",
verbose = FALSE,
gipptools,
heapspace,
mseed_manual = FALSE,
mseed_keep = FALSE
)
Arguments
stationfile |
|
input_dir |
|
output_dir |
|
format |
|
channel_name |
|
cpu |
|
fringe |
|
verbose |
|
gipptools |
|
heapspace |
|
mseed_manual |
|
mseed_keep |
|
Details
The function converts seismic data from the cube file format to either
mseed (cf. read_mseed
) or sac (cf. read_sac
) and cuts the
daily cube files to hourly files. These hourly files are organised in a
coherent directory structure which is organised by year and Julian day.
In each Julian day directory the hourly files are placed and named after
the following scheme:
STATIONID.YEAR.JULIANDAY.HOUR.MINUTE.SECOND.CHANNEL.
The function requires that the software cubetools
(http://www.omnirecs.de/documents.html
) or gipptools
(http://www.gfz-potsdam.de/en/section/geophysical-deep-sounding/infrastructure/geophysical-instrument-pool-potsdam-gipp/software/gipptools/
)
are installed.
Specifying an input directory
(input_dir
) is mandatory. This input directory must only contain the
subdirectories with the cube files to process, each set of cube files must
be located in a separate subdirectory and these subdiretories must
have the same name as specified by the logger IDs (logger_ID
). An
appropriate structure would be something like:
input
A1A
file1.A1A
file2.A1A
A1B
file1.A1B
file2.A1B
With one of the latest updates of either R or Java the cache size for
converting cube files to mseed files has been reduced.
Thus, in several cases the conversion
stops due to buffer overruns. This effect has been particularly observed
when trying to convert more than about 20 consecutive days of cube files
at once. In such a case, it is appropriate to set the function argument
mseed_manual to TRUE
. This will stop the function just at the point
where the function would call the GIPPtools function cube2mseed. The user
will see a confirmation command line in the R console, which asks
to first copy all manually converted mseed files to the directory
mseed_raw
before confirming to continue with the R function. To
convert all cube files to mseed files it is advised to open a terminal and
run the function GIPPtools/bin/cube2mseed
with the following
parameters: GIPPtools/bin/cube2mseed --verbose --output-dir=./mseed_raw/ ./input_dir/
without further adjustments, except for the fringe sample option, as
specified in aux_organisecubefiles
. Please also see the documentation
of the cube2mseed program from the gipptools for further information.
Alternatively, increasing the heap space of the Java Runtime Environment,
required for converting the cube files, can solve the above mentioned
issue. To increase the heap space, use the argument heapspace
. By
default, this argument is set to 4096.
Value
A set of hourly seismic files written to disk.
Author(s)
Michael Dietze
Examples
## Not run:
## basic example with minimum effort
aux_organisecubefiles(stationfile = "output/stationinfo.txt",
input_dir = "input",
gipptools = "software/gipptools-2015.225/")
## End(Not run)