GithubHelp home page GithubHelp logo

sceccode / ucvmc Goto Github PK

View Code? Open in Web Editor NEW
19.0 11.0 8.0 36.03 MB

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

Makefile 1.29% Python 34.91% M4 3.01% Shell 0.14% C 60.66%
velocity-models cvm earth-science seismology

ucvmc's Introduction

UCVM

The current UCVM software version is UCVM 21.10.0 which was released in October 2021. We recommend that users work with this most recent version. https://github.com/sceccode/ucvm

Archived Version of UCVMC Software Release

The version of UCVM in this repository (UCVMC) is now archived. It is available for review, but we do not recommend researchers use this old version of the software.

UCVM is distributed as open-source scientific software. It can be installed compiled and run on most Linux-based computer systems if the system includes software development tools including Python, C, and Fortran compilers, and other software tools. The UCVM v19.4.0 source code is distributed using a github repository. On Github, users can find the source code, installation directions for Linux, and a wiki that provide examples and the expected results from UCVM.

Background

The SCEC Unified Community Velocity Model (UCVM) software is used to access information, including estimated Vp and Vs seismic wave velocities and density, about the earth's crust.

UCVM provides seismic velocity information for several California regions. Seismic velocities of rocks and sediments at shallow depths determine how strongly an area will shake. By assigning velocities to rock types in the 3-D geologic model, geologists can gain an understanding of the extent of areas of low shear velocity that are most likely to experience localized strong shaking and future earthquake damage. An important application for the models accessible through UCVM is for use in computer simulations of California earthquakes.

The Unified Community Velocity Model C-language (UCVMC) software framework is a collection of software tools designed to provide a standard interface to multiple, alternative, California velocity models. UCVMC development is an interdisciplinary research collaboration involving geoscientists, computer scientists, and software developers. UCVMC is used in high resolution 3D wave propagation simulations for California.

The map below shows the coverage regions for currently supported California velocity models that are accessible through UCVMC. Each of the models shown is considered a regional velocity model. Typically the models return values down to about 50km or 100km, but most models are undefined below 100km. For earth material properties below 100km, global seismic velocity models, such as the Preliminary Earth Reference Model (PREM), are possible alternative models.

Map shows coverage region for California CVMs registered into UCVMC. Coverage region for UCVM 2D maps (yellow) overlayed upon regions of various California 3D velocity models (CVM-S4: red, CVM-S4 geotechnical regions: red polygons, CVM-H high resolution: small light blue square, CVM-H low resolution: larger light blue square, USGS High Resolution Bay Area: small white rectangle, USGS Low Resolution Bay Area: large white rectangle, CVM-S4.26, CVM-S4.26M01: green, CCA 06: small yellow, CS17.3, CS17.3-H: large orange rectangle, Havard San Joaquin Basin Model: small orange rectangle, Havard Santa Maria Basin Model: orange square, CS18.5 Cypershake Study's Tiled Velocity Model: blue) : Coverage.kml

UCVMC software repository contains a software codebase developed by Philip Maechling, Mei-Hui Su, David Gill, Patrick Small, and others at SCEC. UCVMC is released as open-source scientific software under an Apache 2 software license.

UCVM was developed with support from National Science Foundation (NSF), US Geological Survey (USGS), and other sources.

System and Software Requirements

Testing UCVMC on all possible combinations of operating sysetms and software stacks requires more software developer resources than currently available. So, we have defined a UCVMC reference software stack that we use to develop and test the software. This UCVMC distrbution has been shown to work on the following reference software stack. It may work on other software stacks, also, but this is the supported software environment.

  • Linux operating system (e.g. CentOS 7 Linux) x86_64-linux
  • GNU gcc/gfortran compilers version 4.8.5
  • Python 2.7.11 (Anaconda 4.0.0 (64-bit))
  • Autotools build software for Linux
  • Automake, Autoconf build tools for Linux
  • Git client

External Libraries installed by UCVMC

Optional Software for building MPI binaries:

  • openmpi 1.8.8

Installation

Once the target computer has the required software tools installed, the basic install of UCVMC is:

The get_large_files.py and ucvm_setup.py scripts run in a terminal window and print text questions to the user. The user types answers to the questions in the terminal window. The retrieval script asks the user which velocity model they would like to stage into the local system and the install script asks the user which velocity models they would like to install from retrieved model list: ( CVM-H v15.1, CVM-S4, CVM-S4.26, CVM-S4.26.M01, CCA06, CS17.3, CS17.3-H, and USGS CenCal). Several models are very large. CCA06, CS17.3 and CS17.3-H are 9.2G, 72G and 72G respectively. We recommend that the user only retrieve needed models and install all retrieved models.

The script will then automatically compile, build, and install the selected models.

MPI Compilers and UCVM Programs

If a GNU-based MPI compiler is detected, the MPI version of several utilities are created, including ucvm2mesh_mpi, ucvm2mesh_mpi_layer, ucvm2etree_mpi, and basin_query_mpi are built. Otherwise, only the serial versions for these programs are built.

Configuration

The main UCVMC configuration file is ${UCVM_INSTALL_DIR}/conf/ucvm.conf. This file defines the paths to all configured models and maps, and it defines selected model flags, such as CVM-H USE_GTL. The UCVM installer sets up this ucvm.conf file automatically.

In most cases, the user does not need to edit the UCVMC/conf/ucvm.conf. However, in some circumstances, such as if the user wants to move the UCVMC installation directory, or configure the behavior of the CVM-H model, the user might want to edit the ucvm.conf file. Please see the User Guide for more details on how to edit the UCVMC/conf/ucvm.conf configuration file.

Standard Models and Maps

The following California velocity models packages are included as part of a standard UCVMC installation. Each model is assigned an abbreviation, and these abbreviations are used to specify the models when making UCVM queries. The model abbreviations used by UCVM are defined in following tables:

Model Name Description UCVM Abbreviation Size
CVM-H v15.1 Southern California Velocity Model developed by Harvard Structural Geology Group with optional geotechnical layer cvmh 1.6G
CVM-S4 Southern California Velocity Model developed by SCEC, Caltech, USGS Group with geotechnical layer cvms 326M
CVM-S4.26 Tomography improved version of CVM-S4 with optional geotechnical layer(Ely-Jordan GTL, default is off) cvms5 1.2G
CVM-S4.26.M01 CVM-S4.26 with added geotechnical layer cvmsi 1.6G
CCA06 Central California Velocity Model with optional geotechnical layer (Ely-Jordan GTL, default is off) cca 9.2G
CS17.3 Cypershake study 17.3 Central California Velocity Model and optional geotechincal layer (Ely-Jordan GTL, default is off) cs173 72G
CS17.3-H Cypershake study 17.3 Central California Velocity Model with San Joaquin and Santa Maria Basins data from Havard's group and optional geoptechnical layer (Ely-Jordan GTL, default is off) cs173h 72G
USGS Bay Area Velocity Model 0.8.3 USGS developed San Francisco and Central California velocity model cencal 17G
Southern California 1D Modified Hadley Kanamori 1D model based on Hadley-Kanamori model 1d 8k
Northridge Region 1D Los Angeles Region 1D model used in SCEC Broadband Platform bbp1d -

A state-wide California standard topography map is distribued with UCVMC. This is a statewide topography map, that also includes statewide Vs30 values, combined into an etree structure.

Toopgrahy and Vs30 Map Name Description UCVM Abbreviation
USGS NED DEM and Wills-Wald Vs30 California elevation and Vs30 data in etree format ucvm

Documentation

Online UCVMC documentation is available at:

Additional documentation advanced features and previous versions of UCVM are posted at:

More Installation instruction:

Support

Issue Tracking:

Email:

Preferred Reference

If you use the UCVM software in your research, please include a reference to the following publication in your research publications. References help us obtain continued financial support for the development of the software. The preferred reference for the UCVM software is:

Small, P., Gill, D., Maechling, P. J., Taborda, R., Callaghan, S., Jordan, T. H., Ely, G. P., Olsen, K. B., & Goulet, C. A. (2017). The SCEC Unified Community Velocity Model Software Framework. Seismological Research Letters, 88(5). doi:10.1785/0220170082.

License

UCVMC is released under the Apache 2.0 license. Please see the LICENSE file for distribution license and disclaimers.

ucvmc's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ucvmc's Issues

Failed to run any commands on Titan

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!

plot scripts only plot to screen

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.

static build fails on cencal model check

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.

Preserve installation instruction in old README file

The original README (replaced by the README.md) had detailed install instructions. Preserve these for future reference, after removing the README. Text below:==============================================================================
README

UCVM - Unified Community Velocity Model Framework
Release 14.7.0
June 30, 2014
http://scec.usc.edu/scecpedia/UCVM_14.7.0

1.0 Requirements

The system requirements are as follows:

Optional dependencies include any of the following standard velocity models
and packages:

2.0 Installation (Easy Way)

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.0 Installation (Hard Way)

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.0 Technical Notes

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.

5.0 Configuration

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

6.0 Documentation

Online documentation is available at:

http://scec.usc.edu/scecpedia/UCVM_14.7.0

7.0 License

Please see LICENSE for the distribution license and disclaimers.

document required storage

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

Add python path modification to install instructions

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

Results from tiled models in wrong location

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.

depth query for cvm-s4.26 extends beyond model

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

no execute permissions for utilities

utilities in the installed directories including plot_cross_section are installed without execute permissions. Change so that these utilities are installed with execute permissions.

update transfer file scripts

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.

Check file based query output

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.

update model Makefile.am

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

make check fail if model not installed

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.

Seg fault when models loaded in certain orders

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.

plot_cross_section.py errors

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

update get_large_files.py

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

plot_cross_section color map error

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

cvmsi path wrong in ucvm.conf

model cvm426 updates the ucvm.conf file, but it puts the wrong path into the file, so by default queries of cvmsi fail.

cvmh horiztonal plots shows version 11.9

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.

define cvmh background model default behavior

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.

test cvm-s4.16 gtl flag

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.

horizontal slice errors on rho or poisson data types

-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.

Configure failed on Blue Waters

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
)


config.log

I checked that the libraries are there, in the correct directory. Why the configuration failed?
Any comments are appreciated!

remove ucvmc from ucvm repo

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.

plot_cross_section.py index out of range error

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

plot_cross_section.py gives errors when plotting cvmh model

-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.")

stage_large_file.py assume work/lib and work/model exist

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.

updated get_ucvm_files.py to run md5sum on downloaded files

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.

ucvm_setup.py message to user

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.

Update installed resources message

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

undocumented program in distribution

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.

simplify ucvm_query -h

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.

two ucvm.conf files that do different things

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.

two copies of ucvm.e in distribution

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.

mac build missing dylid file for cvmsi

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

Vs30 differences between statewide map (ucvm.e) and CVM vs30 method

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.

basin_query_mpi features

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,

accept test fails on vs30 test

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]

Add manifest to distribution

Create a list of all files in the distribution (a manifest) for each distribution and ship it in the distribution.

basin_query hangs

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

ucvm_setup.py user message hidden in log

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'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.

invalid model listed in plot_z25_map.py

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.

Select default 1D model interpolation setting

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.

remove conf/test/ucvm_template.conf

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.