Added source conversion scripts and respective processed data.

parent 5746913d
Kinematic Sources for the La Habra Verification Runs
====================================================
This directory contains the ASCII source input in the Standard Rupture Format (SRF), respective conversions to EDGE's native HDF5-format and a filtered version of the sources.
The SRF-files have been obtained from: http://hypocenter.usc.edu/research/High-F_2020/m5.14-2.5x2.5.tgz
SeisSol version for rconv is 806e9b6990e80007503f882e6fd6c52e135c53c2 with a modified SConstruct file as detailed in SConstruct.diff.
EDGE version for the HDF5-conversions: 26365b349bf4bb529fcface3ef6e758f698e6dc3
EDGE version for the source filter script: 96bbd2622dd612a117499d73ef9b1746c5f88cb1
Used commands:
.. code-block:: bash
bash srf_to_nrf.sh 2>&1 | tee srf_to_nrf.sh.log
bash nrf_to_edge.sh 2>&1 | tee nrf_to_edge.sh.log
bash filter.sh 2>&1 | tee filter.sh.log
diff --git a/preprocessing/science/rconv/SConstruct b/preprocessing/science/rconv/SConstruct
index 6687f7a4..a58d9df2 100644
--- a/preprocessing/science/rconv/SConstruct
+++ b/preprocessing/science/rconv/SConstruct
@@ -121,15 +121,23 @@ elif env['compileMode'] == 'release':
env.Append(CPPDEFINES=['NDEBUG'])
env.Append(CXXFLAGS=['-O2'])
+env.AppendUnique( CPPFLAGS = ['-Ideps/include'] )
+env.AppendUnique( LIBPATH= ['deps/lib'] )
+env.AppendUnique( RPATH=['deps/lib'] )
+
# add pathname to the list of directories which are search for include
-env.Append(CPPPATH=['#/src', '#/../../../src', '#/../../../submodules'])
+env.AppendUnique(CPPPATH=['#/src', '#/../../../src', '#/../../../submodules', '#/../../../submodules/glm',])
+
+conf = env.Configure()
+conf.CheckLibWithHeader('proj', 'proj_api.h', 'cpp')
+conf.CheckLibWithHeader('netcdf', 'netcdf.h', 'cpp')
#
# add libraries
#
# proj
-env.Tool('ProjTool')
-env.Tool('NetcdfTool', required=True)
+#env.Tool('ProjTool')
+#env.Tool('NetcdfTool', required=True)
# build directory
env['execDir'] = env['buildDir']+'/bin'
#!/bin/bash
##
# @file This file is part of EDGE.
#
# @author Alexander Breuer (breuer AT mytum.de)
#
# @section LICENSE
# Copyright (c) 2020, Alexander Breuer
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# @section DESCRIPTION
# Filters the sources.
##
mkdir -p edge_filtered
date
for src in edge/*.h5
do
base=$(basename -- ${src})
base=${base%.*}
echo "working on source ${src} with base ${base}"
filter_source.py -i ${src} -o edge_filtered/${base}.h5 -f 10 -s 750 -d 0.3
done
date
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
#!/bin/bash
##
# @file This file is part of EDGE.
#
# @author Alexander Breuer (breuer AT mytum.de)
#
# @section LICENSE
# Copyright (c) 2020, Alexander Breuer
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# @section DESCRIPTION
# Converts the NRF files to EDGE's HDF5-format.
##
mkdir -p edge
date
for nrf in nrf/*.nc
do
base=$(basename -- ${nrf})
base=${base%.*}
echo "working on nrf ${nrf} with base ${base}"
nrfToHdf5.py -i ${nrf} -o edge/${base}.h5
done
date
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
#!/bin/bash
##
# @file This file is part of EDGE.
#
# @author Alexander Breuer (anbreuer AT ucsd.edu)
#
# @section LICENSE
# Copyright (c) 2020, Alexander Breuer
# Copyright (c) 2017-2018, Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# @section DESCRIPTION
# Converts the SRF files to NRF.
##
# transverse mercator projection with the USGS epicenter as (0,0)
# USGS event: https://earthquake.usgs.gov/earthquakes/eventpage/ci15481673
PROJ="+proj=tmerc +units=m +axis=enu +no_defs +datum=WGS84 +k=0.9996 +lon_0=-117.916 +lat_0=33.933"
mkdir -p nrf xdmf
date
for srf in m5.14-2.5x2.5/Srf/*.srf
do
base=$(basename -- ${srf})
base=${base%.*}
echo "working on srf ${srf} with base ${base}"
# combine third and fourth line in SRF to avoid rconv-confusion
tmp_srf=$(mktemp)
echo "combining lines three and four in ${tmp_srf}"
cat ${srf} | sed -z 's/\n/ /2' > ${tmp_srf}
rconv -i ${tmp_srf} -o nrf/${base}.nc -x xdmf/${base}.xmf -m "${PROJ}" -v "${PROJ}"
rm ${tmp_srf}
done
date
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment