Tutorials - SCECcode/ucvm GitHub Wiki
This is the basic UCVM interface that queries velocity model of interest.
*A command line query
ucvm_query -f /usr/local/opt/ucvm/conf/ucvm.conf -m cvmh -l 33.84007,-117.95683,0.0 Using Geo Depth coordinates as default mode. -117.9568 33.8401 0.000 34.438 293.500 cvmh 1238.170 120.690 1450.659 none 0.000 0.000 0.000 crust 1238.170 120.690 1450.65
- Review input file as:
-bash-4.2$ cat ./tests/inputs/test_latlons.txt -118.0 34.0 0.0 -118.0 34.0 50.0 -118.0 34.0 100.0 -118.0 34.0 500.0 -118.0 34.0 1000.0
- Invoke basic ucvm_query, specifying CVM-S4.26.M01 (as cvmsi):
-bash-4.2$ ./bin/ucvm_query -f ./conf/ucvm.conf -m cvmsi < ./tests/inputs/test_latlons.txt > ./ucvm_query_results.txt
cat ucvm_query_results.txt
The results are in a column oriented format. Abbreviations are like this:
tput format is: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 lon lat Z surf vs30 crustal cr_vp cr_vs cr_rho gtl gtl_vp gtl_vs gtl_rho cmb_algo cmb_vp cmb_vs cmb_rho
The first three colums are input values, the remaining columns are information about the velocity model used provide the material properties. Crustal models, and Geotechnical Models can be stored and used seperately in UCVM. The contributions of each model are shown in columns 5-8 and 10-12, but the combined results returned in 14-16 are typically used by modelers.
-118.0000 34.0000 0.000 280.896 390.000 cvmsi 696.491 213.000 1974.976 none 0.000 0.000 0.000 crust 696.491 213.000 1974.976 -118.0000 34.0000 50.000 280.896 390.000 cvmsi 1669.540 548.000 2128.620 none 0.000 0.000 0.000 crust 1669.540 548.000 2128.620 -118.0000 34.0000 100.000 280.896 390.000 cvmsi 1683.174 603.470 2130.773 none 0.000 0.000 0.000 crust 1683.174 603.470 2130.773 -118.0000 34.0000 500.000 280.896 390.000 cvmsi 2701.217 1475.609 2354.105 none 0.000 0.000 0.000 crust 2701.217 1475.609 2354.105 -118.0000 34.0000 1000.000 280.896 390.000 cvmsi 3330.909 1945.594 2443.042 none 0.000 0.000 0.000 crust 3330.909 1945.594 2443.042
During UCVM installation, the user is asked which velocity models they want installed. As a result, UCVM users need to know which velocity models are installed in their local system. The UCVM executable program, called ucvm_query, can be used to determine which velocity models are installed, as in this following example.
$ ucvm_query -H
returns
(base) [maechlin@discovery1 ~]$ ucvm_query -H Usage: ucvm_query [-m models<:ifunc>] [-p user_map] [-c coordtype] [-f config] [-z zmin,zmax] [-b] < file.in Flags: -h This help message. -H Detail help message. -m Comma delimited list of crustal/GTL models to query in order of preference. GTL models may optionally be suffixed with ':ifunc' to specify interpolation function. -c Z coordinate mode: geo-depth (gd, default), geo-elev (ge). -f Configuration file. Default is ./ucvm.conf. -p User-defined map to use for elevation and vs30 data. -v Display model version information only. -z Optional depth range for gtl/crust interpolation. -b Optional output in json format -l Optional input lon,lat,Z(depth/elevation) Input format is: lon lat Z Output format is: lon lat Z surf vs30 crustal cr_vp cr_vs cr_rho gtl gtl_vp gtl_vs gtl_rho cmb_algo cmb_vp cmb_vs cmb_rho Notes: - If running interactively, type Cntl-D to end input coord list. Version: 21.10.0 Installed Resources: 1d : crustal model bbp1d : crustal model cmuetree : crustal model 1dgtl : gtl elygtl : gtl cvms5 : crustal model cca : crustal model cs173 : crustal model cs173h : crustal model linear : ifunc ely : ifunc ucvm : map yong : map model_etree : model i/f model_patch : model i/f map_etree : map i/f