CVM-T User Guide: Difference between revisions

From SCECpedia
Jump to navigationJump to search
Patrices (talk | contribs)
No edit summary
Patrices (talk | contribs)
No edit summary
Line 9: Line 9:


=== Requirements ===
=== Requirements ===
*SCEC CVM-H https://source.usc.edu/svn/cvmh
*SCEC CVM-4 [Optional] http://earth.usc.edu/~gely/coseis/www/index.html Set ibig var in newin.h to 9,000,000+ and recompile using the following Makefile.
integer, parameter :: ibig = 10000000
# CVM-4 Makefile
all: cvm4_txt cvm4_bin cvm4_mpi
cvm4_txt: cvm4.f iotxt.f
        gfortran -Wall -O3 cvm4.f iotxt.f -o cvm4_txt
cvm4_bin: cvm4.f iobin.f
        gfortran -Wall -O3 cvm4.f iobin.f -o cvm4_bin
cvm4_mpi: cvm4.f iompi.f
        gfortran -Wall -O3 cvm4.f iobin.f -o cvm4_mpi
clean:
        rm *.o *~ cvm4_txt cvm4_bin cvm4_mpi
=== Installation ===
=== Installation ===
*If you wish to extract meshes from CVM-4, it must be installed (see requirements).
*Update ./src/Makefile with paths to the CVM-H library libvxapi.a and system compilers. Execute 'make' to build all meshing executables.
=== Usage ===
=== Known Issues ===
=== Known Issues ===


Line 27: Line 53:
=== Requirements ===
=== Requirements ===
*Python 2.6+, with numpy, matplotlib, and basemap modules
*Python 2.6+, with numpy, matplotlib, and basemap modules
*SCEC CVM-4 [Optional]
*SCEC CVM-4 [Optional] http://earth.usc.edu/~gely/coseis/www/index.html Set ibig var in newin.h to 9,000,000+ and recompile using the following Makefile.
*SCEC CVM-H [Optional]
integer, parameter :: ibig = 10000000
 
# CVM-4 Makefile
all: cvm4_txt cvm4_bin cvm4_mpi
cvm4_txt: cvm4.f iotxt.f
        gfortran -Wall -O3 cvm4.f iotxt.f -o cvm4_txt
cvm4_bin: cvm4.f iobin.f
        gfortran -Wall -O3 cvm4.f iobin.f -o cvm4_bin
cvm4_mpi: cvm4.f iompi.f
        gfortran -Wall -O3 cvm4.f iobin.f -o cvm4_mpi
clean:
        rm *.o *~ cvm4_txt cvm4_bin cvm4_mpi
*SCEC CVM-H [Optional] https://source.usc.edu/svn/cvmh




=== Installation ===
=== 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.
*If you wish to plot slices from CVM-H/CVM-4, the CVMs must be installed (see requirements).
*Within your CVM-4 installation directory, install the following shell script, run_cvm4_gely.sh
*Within your CVM-4 installation directory, install the following shell script, run_cvm4_gely.sh:
  #!/bin/bash
  #!/bin/bash
# CVM-4 helper script that abstracts stdin, stdout redirection
  IN_FILE=$1
  IN_FILE=$1
  OUT_FILE=$2
  OUT_FILE=$2
Line 44: Line 83:
  fi
  fi
  exit 0
  exit 0
An equivalent script for CVM-H is already present in the official CVM-H distribution.
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
*Update CVM-H/CVM-4 installation paths in Slice.py

Revision as of 22:23, 28 October 2010

CVM-H

Requirements

Installation

Known Issues

cvm2mesh

Requirements

integer, parameter :: ibig = 10000000
# CVM-4 Makefile
all: cvm4_txt cvm4_bin cvm4_mpi
cvm4_txt: cvm4.f iotxt.f
       gfortran -Wall -O3 cvm4.f iotxt.f -o cvm4_txt
cvm4_bin: cvm4.f iobin.f
       gfortran -Wall -O3 cvm4.f iobin.f -o cvm4_bin
cvm4_mpi: cvm4.f iompi.f
       gfortran -Wall -O3 cvm4.f iobin.f -o cvm4_mpi
clean:
       rm *.o *~ cvm4_txt cvm4_bin cvm4_mpi


Installation

  • If you wish to extract meshes from CVM-4, it must be installed (see requirements).
  • Update ./src/Makefile with paths to the CVM-H library libvxapi.a and system compilers. Execute 'make' to build all meshing executables.


Usage

Known Issues

cvmtest

Requirements

Installation

Known Issues

viz-cvm

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


Requirements

integer, parameter :: ibig = 10000000
# CVM-4 Makefile
all: cvm4_txt cvm4_bin cvm4_mpi
cvm4_txt: cvm4.f iotxt.f
       gfortran -Wall -O3 cvm4.f iotxt.f -o cvm4_txt
cvm4_bin: cvm4.f iobin.f
       gfortran -Wall -O3 cvm4.f iobin.f -o cvm4_bin
cvm4_mpi: cvm4.f iompi.f
       gfortran -Wall -O3 cvm4.f iobin.f -o cvm4_mpi
clean:
       rm *.o *~ cvm4_txt cvm4_bin cvm4_mpi


Installation

  • If you wish to plot slices from CVM-H/CVM-4, the CVMs must be installed (see requirements).
  • Within your CVM-4 installation directory, install the following shell script, run_cvm4_gely.sh:
#!/bin/bash
# CVM-4 helper script that abstracts stdin, stdout redirection
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.