Added surface meshes with topography.

Added config with station coordindates at including topography.
parent 15bf20ed
la_habra_flat.xml filter=lfs diff=lfs merge=lfs -text
la_habra_topo.xml filter=lfs diff=lfs merge=lfs -text
receivers_flat.xml filter=lfs diff=lfs merge=lfs -text
receivers_topo.xml filter=lfs diff=lfs merge=lfs -text
......@@ -2,3 +2,9 @@ Runtime Configuration for the La Habra Simulations
==================================================
* Stations obtained from: http://hypocenter.usc.edu/research/High-F/merged_lahabra_sites.txt
Generation of station coordinates:
.. code-block:: bash
./receivers.sh 2>&1 | tee ./receivers.sh.log
\ No newline at end of file
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
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 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 stations in lat-lon to their map-projected counterpart together with the respective height.
##
date
# create empy files
echo -n > receivers_flat.xml
echo -n > receivers_topo.xml
while read line
do
projected=$(echo $line | awk '{print $3,$2,$1}' | cs2cs +proj=latlong +datum=WGS84 +to +proj=tmerc +units=m +axis=end +no_defs +ellps=GRS80 +k=0.9996 +lon_0=-117.916 +lat_0=33.933 | awk '{print $1,$2,$4}')
echo "projected coordinates: ${projected}"
height=$(echo ${projected} | gmt grdtrack -V -G../meshes/surface/out_pe/topo.xyz)
if [[ ${height} != "" ]]
then
height=$(echo $height | awk '{print $1,$2,$3,$4}')
echo "writing to xml: ${height}"
# write receiver without topography
echo "<receiver>" >> receivers_flat.xml
echo " <name>$(echo $height | awk '{print $4}')</name>" >> receivers_flat.xml
echo " <coords>" >> receivers_flat.xml
echo " <x>$(echo $height | awk '{print $1}')</x>" >> receivers_flat.xml
echo " <y>$(echo $height | awk '{print $2}')</y>" >> receivers_flat.xml
echo " <z>0.0</z>" >> receivers_flat.xml
echo " </coords>" >> receivers_flat.xml
echo "</receiver>" >> receivers_flat.xml
# write receiver with topography
echo "<receiver>" >> receivers_topo.xml
echo " <name>$(echo $height | awk '{print $4}')</name>" >> receivers_topo.xml
echo " <coords>" >> receivers_topo.xml
echo " <x>$(echo $height | awk '{print $1}')</x>" >> receivers_topo.xml
echo " <y>$(echo $height | awk '{print $2}')</y>" >> receivers_topo.xml
echo " <z>$(echo $height | awk '{print $3}')</z>" >> receivers_topo.xml
echo " </coords>" >> receivers_topo.xml
echo "</receiver>" >> receivers_topo.xml
else
echo "ignoring receiver as it is outside of the domain"
fi
done < merged_lahabra_sites.txt
date
\ No newline at end of file
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
Surface Mesh
============
This directory contains the surface mesh-generation for the La Habra simulations.
Used commands:
.. code-block:: bash
./get_grids.sh 2>&1 | tee get_grids.sh.out
./project_extract.sh 2>&1 | tee project_extract.sh.out
edge_cut -x edge_cut.xml 2>&1 | tee edge_cut.xml.log
./convert.sh 2>&1 | tee convert.sh.log
./compress.sh 2>&1 | tee compress.sh.log
tar -cvJf out_pe.tar.xz out_pe 2>&1 | tee out_pe.tar.xz.log
* Contact: Alexander Breuer
#!/bin/bash
##
# @file This file is part of EDGE.
#
# @author Alexander Breuer (anbreuer 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
# Compresses the off- and stl-files.
##
for type in top left right front back bottom
do
tar -cvJf la_habra_${type}.off.tar.xz la_habra_${type}.off
tar -cvJf la_habra_${type}.stl.tar.xz la_habra_${type}.stl
done
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 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 given off-files to stl.
##
for type in top left right front back bottom
do
meshio-convert la_habra_${type}.off la_habra_${type}.stl
done
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
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