sceccode / ucvmc Goto Github PK
View Code? Open in Web Editor NEWSCEC Unified Community Velocity Model C-language (UCVMC) software framework
Home Page: https://github.com/SCECcode/UCVMC/wiki
License: BSD 3-Clause "New" or "Revised" License
SCEC Unified Community Velocity Model C-language (UCVMC) software framework
Home Page: https://github.com/SCECcode/UCVMC/wiki
License: BSD 3-Clause "New" or "Revised" License
Currently, two copies of the ucvm.e file are used in the ucvmc distribution. One copy, staged to UCVMC/work/models/ucvm/ucvm.e is distributed to the model directory in the install path.
Another copy is used by the tests in UCVMC/model/ucvm/ucvm.e. Either change the tests to use the version in the install path, or update the stage_large_files.py script to stage the required second copy so the test pass.
This call of plot_cross_section error. Looks like it should. Figure out why it fails.
-bash-4.2$ ./plot_cross_section.py -b 34.0,-118.75 -u 34.0,-117.5 -s 0 -e 1000 -h 500 -v 5 -d vs -a s -c cvm5
Using parameters:
starting_depth = 0
data_type = vs
ending_depth = 1000
vertical_spacing = 5
lat2 = 34.0
horizontal_spacing = 500
color = s
lon1 = -118.75
lat1 = 34.0
cvm_selected = cvm5
lon2 = -117.5
Retrieving data. Please wait...
Traceback (most recent call last):
File "./plot_cross_section.py", line 204, in
d.plot(data_type)
File "/home/scec-00/maechlin/t1/utilities/pycvm/pycvm/cross_section.py", line 128, in plot
self.getplotvals()
File "/home/scec-00/maechlin/t1/utilities/pycvm/pycvm/cross_section.py", line 90, in getplotvals
data = u.query(point_list, self.cvm)
File "/home/scec-00/maechlin/t1/utilities/pycvm/pycvm/common.py", line 342, in query
properties.append(MaterialProperties.fromUCVMOutput(line))
File "/home/scec-00/maechlin/t1/utilities/pycvm/pycvm/common.py", line 246, in fromUCVMOutput
return cls(new_line[14], new_line[15], new_line[16])
IndexError: list index out of range
Some of the input model tar files (e.g. cvms426) contain Makefile.am with out of date author, version, and email contact info. Update the model tars to be consistent with ucvm Makefile.am
the install/model/ucvm/ucvm.e file is not correctly moved from src directory to install directory in the new ucvm_setup.py script. This should be moved since it is needed for elevation and Vs30 information.
The ucvm_query -h listed installed resource that are not available in the 17.1 version. Also, some models (e.g. bbp1d) are not listed:
Change to show Installed Resources:
1d : crustal model
bbp1d: crustal model
elygtl : gtl
cvms : crustal model
cvmh : crustal model
cencal : crustal model
cvmsi : crustal model
ucvm : map
The following command errors out on color map issue.
-bash-4.2$ ./plot_cross_section.py -b 34.0,-118.0 -u 35.0,-117.0 -h 100 -v 10 -d vs -c cvms -a d -s 0 -e 500
Using parameters:
lat1 = 34.0
data_type = vs
lat2 = 35.0
cvm_selected = cvms
ending_depth = 500
horizontal_spacing = 100
color = d
lon1 = -118.0
vertical_spacing = 10
lon2 = -117.0
starting_depth = 0
Retrieving data. Please wait...
Traceback (most recent call last):
File "./plot_cross_section.py", line 204, in
d.plot(data_type)
File "/home/scec-00/maechlin/t1/utilities/pycvm/pycvm/cross_section.py", line 201, in plot
img = plt.imshow(datapoints, cmap=colormap, norm=norm)
UnboundLocalError: local variable 'colormap' referenced before assignment
One acceptance tests runs, but fails on comparison to reference results. Check what the right answer should be, and fix the code, or the model, or the acceptance test.
Runnning test test_vs30_query
Error: Vs30 expected output not equal to actual output.
Expected output:
-118.0000 34.0000 843.189
-117.0000 35.0000 843.189
Actual output:
-118.0000 34.0000 769.462
-117.0000 35.0000 384.731
[FAIL]
The ucvm repo master branch is a non-working version of UCVM v15.10.0. So users don't mix the UCVM and UCVMC codebases, we should remove the master branch from the UCVM repo, so only the python codebase is distributed through that repo.
model cvm426 updates the ucvm.conf file, but it puts the wrong path into the file, so by default queries of cvmsi fail.
At the end of the successful build, the ucvm_setup.py script prints information to the user which may be lost in the terminal display. This information should be presented to the user in a more permanent form so it is not lost if the terminal window is closed.
-- Done installing UCVM!
Thank you for installing UCVM. Please export the following library paths (note this is in Bash format):
LD_LIBRARY_PATH=/home/scec-00/maechlin/ucvm17/lib/euclid3/lib:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=/home/scec-00/maechlin/ucvm17/lib/proj-4/lib:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=/home/scec-00/maechlin/ucvm17/model/cvms426/lib:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=/home/scec-00/maechlin/ucvm17/model/cencal/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
We recommend adding the above lines to the end of your ~/.bashrc file so that
they are preserved for the next time you login.
To try out ucvm, type the following commands into your shell:
cd /home/scec-00/maechlin/ucvm17/bin
./ucvm_query -f ../conf/ucvm.conf -m [model] < list_of_points.txt
(where model is one of the models you installed: cvms, cvmsi, cvmh, or cencal)
Please try this example:
cd /home/scec-00/maechlin/ucvm17/bin
./ucvm_query -f ../conf/ucvm.conf -m cvms < ../tests/cvms_input.txt
You will then see the following output:
Using Geo Depth coordinates as default mode.
-118.0000 34.0000 0.000 280.896 390.000 cvms 696.491 213.000 1974.976 none 0.000 0.000 0.000 crust 696.491 213.000 1974.976
A copy of all the commands to setup UCVM has been saved at ./setup_log.sh
You can view man pages for each command by typing man -M ./man [command name].
We strongly encourage you to run the UCVM tests by typing 'make check'
without quotation marks.
The UCVM.conf provides cvmh_param=USE_1D_BKG flag. Determine whether this defaults to the 1D model, or whether the optional bbp1d can be used.
Also, determine whether this flag is equivalent to tiling cvmh and 1d, and whether flag false and tiling with 1D is equivalent.
Determine whether this flag false, with tiling of bbp1d is a way to add the bbp1d to cvmh.
The current largefiles script should check the download files for md5sum. Not implemented currently because it will break on Mac installation because md5sum isn't on mac by default. So a solution that works on linux and mac would be best.
Also the get_ucvm_files.py script should keep track of which files were retrieved ok, and should only say success if all files are retrieved ok. Currently is still says success even if it errors out on one or more files.
For the plot_cross_section utilities to work, the user python path must be updated to include the pycvm module. Update installation instructions to include directions on modifying python path.
Like this:
PYTHONPATH=${PYTHONPATH}:/home/scec-00/maechlin/scec172/utilities:/home/scec-00/maechlin/scec172/utilities/pycvm
export PYTHONPATH
The ucvm install process should separate the transfer of large files from the make, build process. The current get_files script in the UCVMC/largefiles directory does not download from a remote site, it only transfer from local file system. Update so that the get files script (a) retrieves from remote location, and (b) runs md5 sum on resulting files to ensure no problems.
Compilation finished successfully on Titan following the instructions, but running commands (e.g. ucvm_query) in "bin" directory failed with the error message:
illegal hardware instruction
Additional information:
It seems something is wrong according to "config.log":
/usr/lib/../lib64/crt1.o: In function _start': /usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to
main'
/usr/bin/ld: link errors found, deleting executable `a.out'
/usr/bin/sha1sum: a.out: No such file or directory
collect2: error: ld returned 1 exit status
configure:3230: $? = 1
configure:3237: cc -V >&5
gcc: error: unrecognized command line option '-V'
I tried to install UCVMC in home directory and /lustre/atlas, but both of them failed in the same way.
Is there any way to fix this issue? Any comments are appreciated!
Thanks!
With certain combinations of tiled models for certain regions, results from one model are moved to another. For example, when using the model combination cencal,cca,cvms426 for a large CyberShake region, the point (-125, 40, 0.0) is first set in cencal, but is then reset in cca, which is incorrect.
The cause of this bug is in ucvm_model_plugin.c . The query code works by assembling all points which have not already been populated into the pointsBuffer. Then the query is run, and the results are copied back into the data array which was passed into the query function, in lines 246-251. However, this copy-back code assumes that the points which were queried were contiguous in the data array. This is not necessarily the case, and if it's not, then points which were already populated by a higher-priority model might be overwritten.
The same bug exists in at least ucvm_model_cvmsi.c , lines 177-180, and may exist in other models as well.
I implemented a fix for cvmsi in 2016, which is to keep track of the mapping between the index in the full data array and the index in the query buffer. In ucvm_model_cvmsi.c, I added the following at line 151:
int* index_mapping = malloc(sizeof(int)*CVMSI_MAX_POINTS);
if (index_mapping==NULL) {
fprintf(stderr, "Memory allocation of index_mapping failed, aborting.\n");
exit(1);
}
Then, I changed lines 177-180 to:
data[index_mapping[j]].crust.source = ucvm_cvmsi_id;
data[index_mapping[j]].crust.vp = dataBuffer[j].prop.vp;
data[index_mapping[j]].crust.vs = dataBuffer[j].prop.vs;
data[index_mapping[j]].crust.rho = dataBuffer[j].prop.rho;
and lines 202-205 to:
data[index_mapping[j2]].crust.source = ucvm_cvmsi_id;
data[index_mapping[j2]].crust.vp = dataBuffer[j2].prop.vp;
data[index_mapping[j2]].crust.vs = dataBuffer[j2].prop.vs;
data[index_mapping[j2]].crust.rho = dataBuffer[j2].prop.rho;
A similar approach works with ucvm_model_plugin.c to fix the issue.
The cvm-s4.26 (aka cvms5) $installation_dir/model/cvms5/data/config files defines a gtl = on flag (by default). This may cause ucvm to add the ely geotechnical layer to cvm-s4.26 models. The default should be no gtl added. Confirm this flag controls application of the gtl. Set the default to no gtl. Add information for user describing the use of the flag and how to edit this file if they want to add a gtl by default.
Create a list of all files in the distribution (a manifest) for each distribution and ship it in the distribution.
UCVMC distribution approach involves the following steps:
(1) clone git repo
(2) cd into UCVMC/largefiles, and edit get_large_files.py, identify which files are needed, then run it
(3) check md5sums for all retrieve large_files
(4) run stage_large_files.py from UCVMC/largefiles directory
(5) cd into UCVMC and run ucvm_setup.py
The get_large_files.py needs to be updated to retrieve all the files needed for the installation.
Earlier list of file (needs to be checked) below:
get_ucvm_files.py
check_md5sum_etrees.py
ucvm_large_files.md5
ucvm.e
ucvm_yong_wald.e
ucvm_utah/ucvm.e
test-grid-lib-1d.ref
test-grid-ucvm_query-1d.ref
check_md5_models.py
cvms5.tar.gz
cvms5.tar.gz.md5
cvms4.tar.gz
cvms4.tar.gz.md5
cvms426.tar.gz
cvms426.tar.gz.md5
cvmh-15.1.0.tar.gz
cvmh-15.1.0.tar.gz.md5
cencal080.tar.gz
cencal080.tar.gz.md5
check_md5_libs.py
proj-4.8.0.tar
proj-4.8.0.tar.md5
fftw-3.3.3.tar
fftw-3.3.3.tar.md5
euclid3-1.3.tar
euclid3-1.3.tar.md5
The ucvmc distribution contains two ucvm.conf files, one defines the installation, one defines the ucvm.e map coordinates. Two files with the same name is likely to confuse users. Modify the distribution so these files have different names.
-bash-4.2$ ./plot_cross_section.py -b 34.0,-118.75 -u 34.0,-117.5 -s 0 -e 500 -h 500 -v 5 -d vs -a d -c cvmh
Using parameters:
starting_depth = 0
data_type = vs
ending_depth = 500
vertical_spacing = 5
lat2 = 34.0
horizontal_spacing = 500
color = d
lon1 = -118.75
lat1 = 34.0
cvm_selected = cvmh
lon2 = -117.5
Retrieving data. Please wait...
/home/scec-00/maechlin/anaconda2/lib/python2.7/site-packages/matplotlib/axes/_base.py:1327: UserWarning: aspect is not supported for Axes with xscale=log, yscale=linear
'yscale=%s' % (xscale, yscale))
/home/scec-00/maechlin/anaconda2/lib/python2.7/site-packages/matplotlib/image.py:375: UserWarning: Images are not supported on non-linear axes.
warnings.warn("Images are not supported on non-linear axes.")
/home/scec-00/maechlin/anaconda2/lib/python2.7/site-packages/matplotlib/transforms.py:2609: RuntimeWarning: divide by zero encountered in double_scalars
x_scale = 1.0 / inw
/home/scec-00/maechlin/anaconda2/lib/python2.7/site-packages/numpy/ma/core.py:4089: UserWarning: Warning: converting a masked element to nan.
warnings.warn("Warning: converting a masked element to nan.")
The following seemingly valid parameters cause plot_cross_section.py to index out of range.
%plot_cross_section.py -b 34.0,-118.0 -u 35.0,-117.0 -h 100 -v 10 -d vs -c cvms -a d -s 0 -e 500
-bash-4.2$ ./plot_cross_section.py -b 34.0,-118.0 -u 35.0,-117.0 -h 100 -v 10 -d vs -c cvms -a d -s 0 -e 500
Using parameters:
lat1 = 34.0
data_type = vs
lat2 = 35.0
cvm_selected = cvms
ending_depth = 500
horizontal_spacing = 100
color = d
lon1 = -118.0
vertical_spacing = 10
lon2 = -117.0
starting_depth = 0
The CVM-H horizontal plot in the plotting example wiki page shows a CVM-H version 11.9. It should say 15.1. Find out where the version is located and update it.
Update documentation to tell users how much disk storage is required for each UCVMC directory.
-bash-4.2$ du -sh largefiles
7.8G largefiles
-bash-4.2$ du -sh test3
25G test3
-bash-4.2$ du -sh /home/scec-00/maechlin/t1
20G /home/scec-00/maechlin/t1
There are several undocumented programs in the current ucvmc distribution. These include DEM.py and others. Typically, these are in the installation scripts directory. As a general principle, every distributed program (file) should have a documented purpose. Review the distribution and document any programs without a clear purpose.
I failed to install UCVMC on Blue Waters. The error message is:
(I used absolute path when configuring, but changed it to ../../ucvm-17.1.0 here for privacy.)
...
Installing UCVM software...
Running aclocal
Running automake
Running autoconf
Running ./configure for UCVM
...
checking for etree_open in -letree... no
configure: error: "Etree library not found; use --with-etree-lib-path"
ERROR:
An error occurred while trying to setup UCVM. Specifically, the error was:
Error executing command.
At step: [./configure --with-etree-include-path=../../ucvm-17.1.0/lib/euclid3/include --with-etree-lib-path=../../ucvm-17.1.0/lib/euclid3/lib --with-proj4-include-path=../../ucvm-17.1.0/lib/proj-4/include --with-proj4-lib-path=../../ucvm-17.1.0/lib/proj-4/lib --with-fftw-include-path=../../ucvm-17.1.0/lib/fftw/include --with-fftw-lib-path=../../ucvm-17.1.0/lib/fftw/lib --enable-model-cvms --with-cvms-include-path=../../ucvm-17.1.0/model/cvms/include --with-cvms-lib-path=../../ucvm-17.1.0/model/cvms/lib --with-cvms-model-path=../../ucvm-17.1.0/model/cvms/src --enable-model-cvms5 --with-cvms5-lib-path=../../ucvm-17.1.0/model/cvms5/lib --with-cvms5-include-path=../../ucvm-17.1.0/model/cvms5/include --enable-model-cvmsi --with-cvmsi-lib-path=../../ucvm-17.1.0/model/cvms426/lib --with-cvmsi-include-path=../../ucvm-17.1.0/model/cvms426/include --with-cvmsi-model-path=../../ucvm-17.1.0/model/cvms426/model/i26 --enable-model-cvmh --with-cvmh-include-path=../../ucvm-17.1.0/model/cvmh1510/include --with-cvmh-lib-path=../../ucvm-17.1.0/model/cvmh1510/lib --with-gctpc-lib-path=../../ucvm-17.1.0/model/cvmh1510/lib --with-cvmh-model-path=../../ucvm-17.1.0/model/cvmh1510/model --enable-model-cencal --with-cencal-lib-path=../../ucvm-17.1.0/model/cencal/lib --with-cencal-include-path=../../ucvm-17.1.0/model/cencal/include/cencalvm/query/ --with-cencal-model-path=../../ucvm-17.1.0/model/cencal/model/USGSBayAreaVM-08.3.0.etree --with-cencal-extmodel-path=../../ucvm-17.1.0/model/cencal/model/USGSBayAreaVMExt-08.3.0.etree --prefix=../../ucvm-17.1.0
]
More details in config.log shows:
configure:5055: cc -c -I../../ucvm-17.1.0/lib/euclid3/include -Wall -O3 -D_LA RGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 conftest.c >&5
237 CC-2119 craycc: ERROR in command line
238 The phase argument or the comma before the phase argument is missing for the -W option.
239 configure:5062: $? = 1
(and a bunch of similar ERRORs for other .h files
)
I checked that the libraries are there, in the correct directory. Why the configuration failed?
Any comments are appreciated!
The CVM-H test for ge and gd uses an input file with errors, including missing 0 value at some points, out of order depths (eg 2000 rather than 200).
Fix the file then re-run the tests.
basin_query's lat/lon input order is lon-lat but basin_query_mpi's -l input order is
lat-lon (the usage printout is conflicting in detail and generic description).
UCVM provides two methods of accessing vs30 values. The statewide topography and vs30 map provides vs30 values based on a wills site type, and vs30 relationship, or from a wald topography relationship.
UCVM also provides scripts for calculating vs30 from specific CVM models.
We should test the difference in vs30 values produced by each source of vs30. It's not clear which source of vs30 is more accurate.
In trying to create a large velocity mesh, I ran into a segmentation fault in UCVM. Specifically, the seg fault was getting thrown around line 350 of cvmsi.c:
q_vp[z][y][x] = cvmsi_buf[offset].vp;
The proximal cause of the seg fault is that offset was negative. Tracking the code back through, offset was negative because some of the longitudes passed into the cvmsi_query() function in cvmsi.c were nonsensical, <-180 or >180. This is because the array used to store the longitudes was being overwritten.
Eventually I discovered that the cause of the problem is a redeclaration of the variable dataBuffer. In ucvm_model_cvmsi.c, the variable dataBuffer is declared in line 22:
cvmsi_data_t *dataBuffer = NULL;
and is allocated as part of the model initialization in the ucvm_cvmsi_model_init() function, to CVMSI_MAX_POINTS * sizeof(cvmsi_data_t). However, a variable with the same name is also declared in ucvm_model_plugin.c, line 35:
basic_properties_t *dataBuffer;
and is allocated as part of the initialization there, in ucvm_plugin_model_init(), to MODEL_POINT_BUFFER * sizeof(basic_properties_t).
Most of the time this redeclaration doesn't actually cause an issue. If only one of the init functions is never called, then the variable is never reallocated. Since at this point the only model which uses the plugin code is CCA, both CCA and CVM-S4.26 must be loaded. Additionally, the allocation done in ucvm_cvmsi_model_init() is much larger than the allocation in ucvm_plugin_model_init(). So if the CCA model is loaded first, then CVM-S4.26, dataBuffer is changed from pointing to a small buffer to a large one. Since both init functions are called before any data is written, having a too-large buffer doesn't cause any issues for CCA, and it's the right size for CVM-S4.26.
However, if CVM-S4.26 is initialized before a plugin model, such as CCA, then dataBuffer is changed to point to a small buffer which is much smaller than what CVM-S4.26 expects. Then, when CVM-S4.26 tries to use it, the array is overrun and the memory used for tracking the longitudes eventually gets clobbered.
The easiest fix is to rename one of the variables. Ideally we would also turn on a compiler flag to warn us of a variable redefinition, in case there are other variables which share names.
Initial testing of basin_query utilities hangs. It's not clear what this should return. Is it average depth to basin. Or are more parameters needed when called.
./basin_query -f ../conf/ucvm.conf -m cvmsi -v 2500
-bash-4.2$ ./plot_horizontal_slice.py -b 33.5,-118.75 -u 34.5,-117.5 -s 0.1 -e 500 -d rho -a s -c cvmh
Using parameters:
lat1 = 33.5
data_type = rho
lat2 = 34.5
color = s
spacing = 0.1
cvm_selected = cvmh
depth = 500
lon1 = -118.75
lon2 = -117.5
Retrieving data. Please wait...
Traceback (most recent call last):
File "./plot_horizontal_slice.py", line 185, in
h.plot(data_type, color_scale=color)
File "/home/scec-00/maechlin/t1/utilities/pycvm/pycvm/horizontal_slice.py", line 179, in plot
datapoints[i][j] = self.materialproperties[i][j].getProperty(property) / 1000.0
File "/home/scec-00/maechlin/t1/utilities/pycvm/pycvm/common.py", line 265, in getProperty
raise ValueError("Parameter property must be a valid material property unit.")
ValueError: Parameter property must be a valid material property unit.
-bash-4.2$ ./plot_horizontal_slice.py -b 33.5,-118.75 -u 34.5,-117.5 -s 0.1 -e 500 -d poission -a s -c cvmh
Using parameters:
lat1 = 33.5
data_type = poission
lat2 = 34.5
color = s
spacing = 0.1
cvm_selected = cvmh
depth = 500
lon1 = -118.75
lon2 = -117.5
Retrieving data. Please wait...
Traceback (most recent call last):
File "./plot_horizontal_slice.py", line 185, in
h.plot(data_type, color_scale=color)
File "/home/scec-00/maechlin/t1/utilities/pycvm/pycvm/horizontal_slice.py", line 179, in plot
datapoints[i][j] = self.materialproperties[i][j].getProperty(property) / 1000.0
File "/home/scec-00/maechlin/t1/utilities/pycvm/pycvm/common.py", line 265, in getProperty
raise ValueError("Parameter property must be a valid material property unit.")
ValueError: Parameter property must be a valid material property unit.
Trying to reproduce the z25 map on wiki at:
https://scec.usc.edu/scecpedia/Study_17.3_Data_Products#Velocity_Maps
using the plot_z25_map.py script, it presents user with choice of cvms, but the names are incosistent. No cvmsi is listed. cvm4 is listed, cvms4.26 is listed. giving cvms4 as model throws an exception. Determine where this script gets its list of models and determine why it does not include cvmsi, and why it presents a choice of invalid models.
UCVM - Unified Community Velocity Model Framework
Release 14.7.0
June 30, 2014
http://scec.usc.edu/scecpedia/UCVM_14.7.0
The system requirements are as follows:
Optional dependencies include any of the following standard velocity models
and packages:
The basic install of UCVM is simple:
$ tar zxvf ucvm-14.7.0.tar.gz
$ cd UCVM
$ ./ucvm_setup.py
Then simply answer all the questions in the script. It will ask you which models
you would like to install (CVM-S5, CVM-S4, CVM-H, and CenCal).
The script will then automatically download and install the models you selected.
The default is to link statically. If you would like to enable dynamic linking, please
use the argument -s. E.g. ./ucvm_setup.py -s
3.1 Quick Start
The steps to install the minimum distribution are as follows:
$ tar zxvf ucvm-14.7.0.tar.gz
$ cd UCVM
$ ./configure --prefix=${UCVM_INSTALL_DIR}
--with-etree-include-path="${ETREE_DIR}/libsrc"
--with-etree-lib-path="${ETREE_DIR}/libsrc"
--with-proj4-include-path="${PROJ4_DIR}/include"
--with-proj4-lib-path="${PROJ4_DIR}/lib"
$ make
$ make check
$ make install
Where ${UCVM_INSTALL_DIR} is the directory where you wish to install UCVM, and
${ETREE_DIR} and ${PROJ4_DIR} are the paths where the Etree and Proj.4
packages are installed. The 'make check' command executes a set of unit and
acceptance tests which confirms that the package was built successfully. All
the tests should pass.
With this setup, only the "1d", "lin-thurber", and "cmrg" standard models
will be available for query. To install support for another standard model,
please see the following section.
3.2 Installation with a Standard Velocity Model
If you wish to link in a external standard velocity model, you must tell the
configure script where it can find the model libraries, headers, and model
files. This is done with the '--with-model_name-lib-path',
'--with-model_name-include-path', '--with-model_name-model-path' (and
optionally '--with-model_name-extmodel-path', '--with-gctpc-lib-path') options.
For example, to link UCVM with the SCEC CVM-H velocity model, run configure
with the following commands:
$ ./configure --prefix=${UCVM_INSTALL_DIR}
--with-etree-include-path="${ETREE_DIR}/libsrc"
--with-etree-lib-path="${ETREE_DIR}/libsrc"
--with-proj4-include-path="${PROJ4_DIR}/include"
--with-proj4-lib-path="${PROJ4_DIR}/lib"
--with-cvmh-include-path="${CVMH_DIR}/include"
--with-cvmh-lib-path="${CVMH_DIR}/lib"
--with-gctpc-lib-path="${CVMH_DIR}/gctpc/lib"
--with-cvmh-model-path="${CVMH_DIR}/bin"
$ make
$ make check
$ make install
Where ${CVMH_DIR} is the directory where SCEC CVM-H is installed. Note that
SCEC CVM-H 11.9.1 has a dependency on the GCTPC projection package (which is
distributed with CVM-H, but UCVM needs to link that library as well). The
configure script is told where to find it with the '--with-gctpc-lib-path'
option. The rest of the make process is generally the same as the quick start
example, except now the package tests will include CVM-H tests to verify that
the linking was successful.
Any number of supported velocity models may be linked into UCVM in this
manner, using the appropriate options. Execute './configure --help' to see the
full list of support models and their options.
4.1 MPI Compilers
If a GNU-based MPI compiler is detected, the MPI version of ucvm2etree are
built. Otherwise, the serial version is built.
4.2 Lustre Filesystems
The IOBUF module must be used when compiling the Etree library and UCVM for
use on a Lustre high-performance filesystem. Please reference the Euclid Etree
documention for instructions on how to do this for that package. For UCVM,
IOBUF is enabled with the following configuration commands:
$ module add iobuf # System dependent
$ ./configure --prefix=${UCVM_INSTALL_DIR} --enable-iobuf
--with-etree-include-path="${ETREE_DIR}/libsrc"
--with-etree-lib-path="${ETREE_DIR}/libsrc"
--with-proj4-include-path="${PROJ4_DIR}/include"
--with-proj4-lib-path="${PROJ4_DIR}/lib"
Note the use of the '--enable-iobuf' option.
4.3 Static Builds
A static build can be forced with the '--enable-static' configure option.
The main application configuration file is ${UCVM_INSTALL_DIR}/conf/ucvm.conf.
This is where the paths to all configured models and maps are specified, as
well as any model flags are defined. The UCVM installer sets up this file
automatically. Yet there are a number of situations where you will want to
modify it, such as to add a new model.
Please see the User Guide for more details on how to edit the UCVM config.
5.1 Standard Models
The standard models are referenced with the following labels:
cvmh SCEC CVM-H
cvms SCEC CVM-S4
cencal USGS Bay Area CenCalVM
cvmnci SCE CVM-NCI
cvmsi SCEC CVM-S4.23
wfcvm WFCVM
1d Hadley-Kanamori 1D (pre-linked)
lt Lin-Thurber California Statewide
cmrg Cape Mendocino Rob Graves
tape Tape SoCal
Note that the model must be linked in at install time if it is to be queried
through UCVM.
5.2 Standard Maps
ucvm USGS NED DEM and Wills-Wald Vs30 (default)
yong USGS NED DEM and Yong-Wald Vs30
Online documentation is available at:
http://scec.usc.edu/scecpedia/UCVM_14.7.0
Please see LICENSE for the distribution license and disclaimers.
ucvm2mesh returns cvms5 results for undefined region. But ucvm2mesh fails on cvmh queries for regions without cvmh properties. Fix it so cvmh queries fail gracefully
basin_query returns 2 depths (first occurance and last occurence) but
fellow basin_query_mpi only returns 1 depth
running ucvm_setup.py on mac (sierra) with xcode builds serveral models (cvmh) but the cvmsi produces only .o and .a files and not the required mac dylid files
Based on config file settings, the current 1D background model is returned to users as layers, without interpolating values between layers. LA Basin model is returned using interpolation between layers.
First, Show evidence of these default values.
Then, ask the science group what the default settings should be for UCVMC.
When ucvm_setup.py is run with -s flag, the build fails when the ucvm system tests for cencal library. However it does not fail when the default dynamic build runs.
Current plot_cross_section.py only plots to an xwindow. Update the scripts to (a) write plot to file, and (b) write the plotted data to file, rarther thatn, or in addition to, the the plot image.
The return from a cvms5 query at depth 100km, deeper than the model is defined, returns values flagged as cvms5. cencal does not return values this deep. Check on why cvms5 does.
-bash-4.2$ ./bin/ucvm_query -f ./conf/ucvm.conf -m cvms5,cvms < input_file_name.txt
Using Geo Depth coordinates as default mode.
-117.0000 34.0000 0.000 1043.367 748.000 cvms5 3697.030 2012.850 2345.347 none 0.000 0.000 0.000 crust 3697.030 2012.850 2345.347
-117.0000 34.0000 100.000 1043.367 748.000 cvms5 3622.903 1948.826 2336.640 none 0.000 0.000 0.000 crust 3622.903 1948.826 2336.640
-117.0000 34.0000 1000.000 1043.367 748.000 cvms5 3560.579 1893.624 2328.927 none 0.000 0.000 0.000 crust 3560.579 1893.624 2328.927
-117.0000 34.0000 100000.000 1043.367 748.000 cvms5 7519.175 4299.575 3127.594 none 0.000 0.000 0.000 crust 7519.175 4299.575 3127.594
utilities in the installed directories including plot_cross_section are installed without execute permissions. Change so that these utilities are installed with execute permissions.
the ucvm_setup.py script prints a user message to screen during the long build process. This is difficult for the user to see this message. It should be moved to a location where the user will be sure to see it.
This information must be copied to user in another way
Libraries have been installed in:
/home/scec-00/maechlin/ucvm17.1/model/cencal/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the -LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the
LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the LD_RUN_PATH' environment variable during linking - use the
-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
Basin_query_mpi returns only one basin depth value. Give user an option which value is returned, first occurence, second, or both. Also give user option of the output format with basin_query_mpi default to binary,
The ucvm_query -h returns unused values. Simplify it to provide more limited options including:
Usage: ucvm_query [-m models] [-c coordtype] [-f config] [-z zmin,zmax] < file.in
Flags:
-h This help message.
-m Comma delimited list of crustal/GTL models to query in order
of preference.
-c Z coordinate mode: geo-depth (gd, default), geo-elev (ge).
-f Configuration file. Default is ./ucvm.conf.
-v Display model version information only.
-z Optional depth range for gtl/crust interpolation.
The stage_large_files.py script assumes that the UCVMC/work/lib and UCVMC/work/model directories exist when it is run. The script errors out if these directories don't exist. The script should check for them, and create them if they don't exist.
The paper says the the plotting scripts can output in data file format. Can we confirm this?
In all cases, the output images are saved to disk in Portable Network Graphics (PNG) format, and as ASCII-based data files.
The distribution currently uses a second ucvm.conf file for test purposes, different from the ucvm.conf constructed during installation for the main. I think the second ucvm.conf has hard coded paths to ensure models to be tests are included, and they may not be in the actual deployed ucvm.conf file. Find a way to combine these ucvm.conf files so that the user is not confused on which one to use.
I removed the test ucvm.conf file. The unit test assume that certain models are installed. If they are run, and the user has not installed the required model(s), the test may fail. Add warning to user to explain this in case their tests fail due to an unistalled model.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.