cvm-h v11.1 release in a nutshell distribution of a new version of cvm-h that includes: vs30-based...

13
CVM-H v11.1 Release in a Nutshell Distribution of a new version of CVM-H that includes: Vs30-based arbitrary precision GTL Extended Region using 1D background model Standardized interface for removing topography Use of AWP simulation to evaluate CVM-H performance High performance mesh making tools (if

Upload: martina-dixon

Post on 29-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

CVM-H v11.1 Release in a Nutshell

• Distribution of a new version of CVM-H that includes:

• Vs30-based arbitrary precision GTL

• Extended Region using 1D background model

• Standardized interface for removing topography

• Use of AWP simulation to evaluate CVM-H performance

• High performance mesh making tools (if needed)

Improved CVM-HImproved CVM-H

• Model extended with Hadley-Kanamori 1D and Ely’s Vs30 derived GTL, with smoothing between core model, 1d, and GTL.

• Command-line query tool enhanced to allow query by depth, named vx_lite.

• % vx_lite [-s] [-d] [-v] < input_points > output_mat_props

• Where –s option enables SCEC 1D, -d enables query by depth, and –v enables query by elevation. Default query mode is elevation offset.

• Addition of a C API to the library that programs can link in to query the model directly.

• Programs link in ./lib/libvxapi.a and include the header file ./src/vx_sub.h

CVM-H ArchitectureCVM-H Architecture

VX API Include File (./src/vx_sub.h)VX API Include File (./src/vx_sub.h)

/* Model source of the data */

typedef enum { VX_SRC_NR = 0, VX_SRC_HR, …, VX_SRC_GT} vx_src_t;

/* Z mode selector (depth, elevation, elevation offset */

typedef enum { VX_ZMODE_ELEV = 0, VX_ZMODE_DEPTH, VX_ZMODE_ELEVOFF } vx_zmode_t;

/* Coordinate type, GEO or UTM */

typedef enum { VX_COORD_GEO = 0, VX_COORD_UTM} vx_coord_t;

/* Provenance of the data */

typedef enum { VX_PROV_NONE = 0, …, VX_PROV_GTL} vx_prov_t;

/* Query structure */

typedef struct vx_entry_t {

double coor[3], coor_utm[3];

vx_coord_t coor_type;

float elev_cell[2], topo, mtop, base, moho;

vx_src_t data_src;

float vel_cell[3], provenance, vp, vs;

double rho;

} vx_entry_t;

/* Initializer */

int vx_setup(char* data_dir);

/* Get version number */

void vx_version(char *ver);

/* Set Z mode to either elevation, depth, or elev offset */

void vx_setzmode(vx_zmode_t m);

/* Retrieve data point in LatLon or UTM */

void vx_getcoord(vx_entry_t *entry);

/* Register user-defined background model handler */

void vx_register_bkg( int (*backgrnd)(vx_entry_t *entry,

vx_request_t req_type) );

/* Register SCEC bkg/topo handlers */

void vx_register_scec();

vx_lite application (./src/vx_lite.c)vx_lite application (./src/vx_lite.c)

/* Parse options */

while ((opt = getopt(argc, argv, "sdvh")) != -1) {

switch (opt) { … }

}

if ((use_emulation) && (use_depth)) {

printf("Cannot have vx emulation and depth mode both enabled!\n");

exit(1);

}

/* Perform setup */

if (vx_setup(".") != 0) {

printf("Failed to init vx\n");

exit(1);

}

/* Register SCEC 1D background model */

if (use_scec) {

vx_register_scec();

}

if (use_emulation)

vx_setzmode(VX_ZMODE_ELEV);

else if (use_depth)

vx_setzmode(VX_ZMODE_DEPTH);

else

vx_setzmode(VX_ZMODE_ELEVOFF);

/* Query each point from stdin */

while (!feof(stdin)) {

if (fscanf(stdin,"%lf %lf %lf", &entry.coor[0],&entry.coor[1],&entry.coor[2]) == 3) {

/* Set coordinate type */

if ((entry.coor[0]<360.) && (fabs(entry.coor[1])<90))

entry.coor_type = VX_COORD_GEO;

else

entry.coor_type = VX_COORD_UTM;

/* Query the point */

vx_getcoord(&entry);

… (Print the output to stdout) …

}

}

Generating Meshes with cvm2meshGenerating Meshes with cvm2mesh

• MPI program that has been tested up to 2125 cores

• % mpirun [mpi options] mesh-create-MPI [-i cvm_source_dir] [-o final_output_mesh] –f config_file.conf

• Important C source modules:

• mesh-create-MPI.c: main program

• proj.c: projection module that generates 2D grid in CMU/UTM

• cvm.c: abstract interface for querying CVM-H/CVM-4

• mesh_writer.c: writes meshes using MPI I/O interface

• xy2ll.c: GEO-CMU conversion routines

• utm2geo.f90: Fortran module for GEO-UTM conversion

Visualization ToolsVisualization Tools

• Viz-cvm module provides scripts to produce plots from either CVM-H/CVM-4 or existing meshes:

• Plots of Vp, Vs, Rho at user defined depths

• Plots of Vp, Vs, Rho for vertical slices between two arbitrary lon/lat points

• Plots of Vs30, Z2500

• Comparison plots showing CVM-H and CVM4 side-by-side

• Difference plots showing CVM-H minus CVM4 for the property of interest

Viz Tools – Slice Tool ExamplesViz Tools – Slice Tool Examples

• Horizontal slice, Vp at depth 0.0m

./Slice.py hor hor_0_vp.png 0.0 Vp Both

• Vertical Profile Slice for Vp between two points

./Slice.py prof profile1_vp.png -119.292 34.431 -118.966 34.098 Vp Both

TestingTesting

• CVM-H distribution has unit tests and a simple acceptance test

• Automated Test Framework (cvmtest) used for earthquake scenario GoF testing. Requires components to be installed on a local machine and NICS Kraken.

• Unit tests and GoF testing can be run under CruiseControl or manually on command-line

Improvements/IssuesImprovements/Issues

• Standardize GEO-UTM conversion codes across all CVM-T codes. Currently, CVM-H uses gctpc package, cvm2mesh uses a Fortran module, and viz tools use a Python projection package based on PROJ4.

• Develop standard Unified CVM API for querying CVM-4/CVM-H programmatically.

• Improve cvm2mesh scalability by partitioning meshing region in 3D (currently uses 1D partitioning), and using a programmatic interface to CVM-4 instead of forking a sub-process.

• Current implementation of plotting in the testing framework will not scale to large numbers of simulations since it is run on the NICS Kraken login node. Plot generation may need to be moved to compute nodes (static Python) or to a local machine.

Standardized CVM Interface (SCVMI)

Scientific CVM Application Programs

btest-in cencalvm vx vx-lite

CVM-T Meshing Utilities

CVM-S4 USGS-NC

CVM-H 6.3

CVM-H 11.1.0

For More InformationFor More Information

• CVM-H model source (cvmh) https://source.usc.edu/svn/cvmh

• Mesh generator source (cvm2mesh) https://source.usc.edu/svn/cvm2mesh

• Automated Test Framework (cvmtest) https://source.usc.edu/svn/cvmtest

• Viz tools (viz-cvm) https://source.usc.edu/svn/viz-cvm

• CVM-T Documentation http://scec.usc.edu/scecpedia/CVM_Toolkit

• CVM-T User Guide http://scec.usc.edu/scecpedia/CVM-T_User_Guide

End