Difference between revisions of "CVM-T User Guide"

From SCECpedia
Jump to navigationJump to search
(Created page with '== CVM-H == == cvm2mesh == == cvmtest == == viz-cvm ==')
 
Line 6: Line 6:
  
 
== viz-cvm ==
 
== viz-cvm ==
 +
 +
The viz-cvm package contains scripts for plotting slices and profiles from either CVM-H, CVM-4, or 3D meshes.
 +
 +
 +
=== Requirements ===
 +
*Python 2.6+, with numpy, matplotlib, and basemap modules
 +
*SCEC CVM-4 [Optional]
 +
*SCEC CVM-H [Optional]
 +
 +
 +
=== Installation ===
 +
 +
*If you wish to plot slices from CVM-H/CVM-4, the CVMs must be installed. CVM-H can be checked out from https://source.usc.edu/svn/cvmh. CVM-4 can be downloaded from Geoff Ely's Coseis http://earth.usc.edu/~gely/coseis/www/index.html.
 +
*Within your CVM-4 installation directory, install the following shell script, run_cvm4_gely.sh
 +
#!/bin/bash
 +
IN_FILE=$1
 +
OUT_FILE=$2
 +
CVMBIN=cvm_txt
 +
./${CVMBIN} < ${IN_FILE} > ${OUT_FILE}
 +
if [ $? -ne 0 ]; then
 +
    exit 1
 +
fi
 +
exit 0
 +
An equivalent script for CVM-H is already present in the official CVM-H distribution.
 +
*Update CVM-H/CVM-4 installation paths in Slice.py
 +
# CVM Constants
 +
cvmh_dir = '/home/rcf-104/patrices/cvmh/trunk/bin'
 +
cvmh_bin = './run_vx_lite.sh'
 +
cvm4_dir = '/home/rcf-104/patrices/utils/cvm4_gely'
 +
cvm4_bin = 'run_cvm4_gely.sh'
 +
 +
 +
=== Plotting from a CVM ===
 +
 +
Supported plot types include horizontal slices from either CVM, horizontal difference (CVM-H - CVM-4) slice, and profile slices from either CVM or both.
 +
./Slice.py <map_type> <outfile> <map_parameters>
 +
 +
where:
 +
*map_type: hor/prof/hordiff
 +
*outfile: Name of PNG plot
 +
*hor map_parameters: depth, value_type, source (CVM-H, CVM-4, Both)
 +
*hordiff map_parameters: depth, value_type
 +
*prof map_parameters: lon1, lat1, lon2, lat2, value_type, source (CVM-H, CVM-4, Both)
 +
**value_type: Vp, Vs, Rho, Topo, Vs30, Z2500
 +
 +
 +
=== Plotting from a mesh ===
 +
 +
Supported plot types include horizontal slices and profile slices from either SORD or AWP formatted meshes.
 +
./PlotGrid.py <map_type> <mesh_file> <outfile> <title> <map_params>
 +
 +
where:
 +
*map_type: hor, prof
 +
*mesh_file: Name of the SORD or AWP formatted mesh.
 +
*outfile: name of PNG plot
 +
*title: Title for the plot
 +
*hor map_parameters: k_offset, imax, jmax, kmax, decimation, source, value_type
 +
*prof map_parameters: imax, jmax, kmax, p1_x, p1_y, p2_x, p2_y, depth, decimation, source, value_type
 +
**value_type: Vp, Vs, Rho
 +
**source: IJK-32, IJK-20, IJK-12, SORD
 +
 +
 +
=== Known Issues ===
 +
 +
Small scale slices or highly decimated slices may take on a pixellated look. This is due to a low pixel density in the plots. The work-around is to reduce the decimation factor or increase the size of the slice.

Revision as of 20:33, 28 October 2010

CVM-H

cvm2mesh

cvmtest

viz-cvm

The viz-cvm package contains scripts for plotting slices and profiles from either CVM-H, CVM-4, or 3D meshes.


Requirements

  • Python 2.6+, with numpy, matplotlib, and basemap modules
  • SCEC CVM-4 [Optional]
  • SCEC CVM-H [Optional]


Installation

#!/bin/bash
IN_FILE=$1
OUT_FILE=$2
CVMBIN=cvm_txt
./${CVMBIN} < ${IN_FILE} > ${OUT_FILE}
if [ $? -ne 0 ]; then
    exit 1
fi
exit 0

An equivalent script for CVM-H is already present in the official CVM-H distribution.

  • Update CVM-H/CVM-4 installation paths in Slice.py
# CVM Constants
cvmh_dir = '/home/rcf-104/patrices/cvmh/trunk/bin'
cvmh_bin = './run_vx_lite.sh'
cvm4_dir = '/home/rcf-104/patrices/utils/cvm4_gely'
cvm4_bin = 'run_cvm4_gely.sh'


Plotting from a CVM

Supported plot types include horizontal slices from either CVM, horizontal difference (CVM-H - CVM-4) slice, and profile slices from either CVM or both.

./Slice.py <map_type> <outfile> <map_parameters>

where:

  • map_type: hor/prof/hordiff
  • outfile: Name of PNG plot
  • hor map_parameters: depth, value_type, source (CVM-H, CVM-4, Both)
  • hordiff map_parameters: depth, value_type
  • prof map_parameters: lon1, lat1, lon2, lat2, value_type, source (CVM-H, CVM-4, Both)
    • value_type: Vp, Vs, Rho, Topo, Vs30, Z2500


Plotting from a mesh

Supported plot types include horizontal slices and profile slices from either SORD or AWP formatted meshes.

./PlotGrid.py <map_type> <mesh_file> <outfile> <title> <map_params>

where:

  • map_type: hor, prof
  • mesh_file: Name of the SORD or AWP formatted mesh.
  • outfile: name of PNG plot
  • title: Title for the plot
  • hor map_parameters: k_offset, imax, jmax, kmax, decimation, source, value_type
  • prof map_parameters: imax, jmax, kmax, p1_x, p1_y, p2_x, p2_y, depth, decimation, source, value_type
    • value_type: Vp, Vs, Rho
    • source: IJK-32, IJK-20, IJK-12, SORD


Known Issues

Small scale slices or highly decimated slices may take on a pixellated look. This is due to a low pixel density in the plots. The work-around is to reduce the decimation factor or increase the size of the slice.