Skip to content

nackerley/indian-subcontinent-psha

Repository files navigation

Indian Subcontinent PSHA

This is an implementation in OpenQuake of the probabilistic seismic hazard analysis (PSHA) model of Nath & Thingbaijam (2012).

Versions

Files specific to the first version of the model are subscripted _v0. This model is described in the report by Ackerley (2016).

A revised version, subscripted _v1 and incorporating clarifications from the authors of Nath & Thingbaijam (2012), was included in the initial release of the Global Seismic Seismic Hazard Map, v. 2018.1.

Work is in progress to develop a _v2 model to address outstanding issues.

Zipped job files can be downloaded for various releases.

Installation

Smoothed-gridded model files in Natural hazards’ Risk Markup Language (NRML) format are too big to fit in a github repository but they can be regenerated from smaller input data files and scripts, all included in the repository.

The OpenQuake NRML .xml model files are generated from .csv (source model) and .tsv (logic tree) files using scripts that depend on the OpenQuake Hazard Modeler's Toolikt (HMTK). This is done using python .py and Jupyter Notebook scripts in .ipynb format.

Prerequisites

Ensure that the prerequisites are installed:

  • OpenQuake (2.6 or newer): oq-engine
  • Jupyter Notebook and python environment management: Anaconda
  • lualatex (optional, for conversion of NRML logic trees to PDF): TexLive

Repository

Clone the repository:

cd ~/src
git clone https://github.com/nackerley/indian-subcontinent-psha.git

Create environment

Create an environment with the necessary python packages:

cd ~/src/indian-subcontinent-psha
conda env create --file oq.yml
source activate oq

Make the (oq) kernel accessible to jupyter in the root environment by running the following:

source activate oq
python -m ipykernel install --user --name oq

To open jupyter notebooks which use this environment, run the following in your root environment:

jupyter notebook

and select the appropriate files from the browser window which opens.

Add utilities to Python path

Add ~/src/indian-subcontinent-psha/utilities to your Python path. One way is to append the following to your ~/.bashrc:

export PYTHONPATH=$PYTHONPATH:~/src/indian-subcontinent-psha/utilities

Verify installation

Verify your installation by trying:

import source_model_tools as smt

Usage

Regenerate logic trees

To regenerate the logic tree XML, open and run the following jupyter notebook:

  • "Logic Trees/logic_trees_nt2012.ipynb"

Note that the logic tree model XML files are small, and already included in the repository, so this is only necessary if changes are made to logic tree TSV description files.

Regenerate source models

To regenerate the source model XML, in your (oq) environment run:

cd ~/src/indian-subcontinent-psha/Source\ Models/
python write_source_models_nt2012.py --version VERSION --full

The smooothed-gridded models in particualr are large, so only "thinned" versions are included in the repository for quality control purposes. The version number only refers to the major version. Without the --full argument only a "thinned" version of the smoothed-gridded model is generated; this is quicker and useful for testing.

Investigate source models

The following jupyter notebooks are useful for investigating and visualizing the source models:

  • "Source Models/areal_source_models_nt2012.ipynb"
  • "Source Models/smoothed_source_models_nt2012.ipynb"
  • "Source Models/collapsed_source_models_nt2012.ipynb"

Jobs

Job configuration job.ini files are created manually rather than automatically generated. Symbolic links to data files are include in each folder, to avoid duplication of files.

The key job variants supported are:

  • Jobs/cities_collapsed_v0/
  • Jobs/cities_collapsed_v1/
  • Jobs/cities_full_disaggregation_v1/
  • Jobs/map_collapsed_v1/

Note:

  • collapsed vs. full refers to whether or not frequency-magnitude distributions were collapsed prior to hazard calculation. collapsed source models will give correct results for mean hazard but not for hazard quantiles or deaggregation.
  • cities jobs are site-specific analyses, for the 18 cities listed in Table 3 of Nath & Thingbaijam (2012).
  • map refers to the 0.2° grid of 8102 points used to generate the data in the Figure 7 and the electronic supplement of Nath & Thingbaijam (2012).

The script tar_all.py in Jobs zipped versions of all jobs found in subdirectories.

Mapping

Files for generating maps using QGIS are stored at Maps/. Maps incorporate data which can be downloaded separately from:

Data

This project draws heavily on published work. Portions of some of these publications are included in this repository.

Hazard model development

This model incorporates data from the following publications:

Ground motion prediction equation (GMPE) development

A set of jupyter notebooks in ~/src/indian-subcontinent-psha/GMPEs were used to generate validation data for the following modules of openquake.hazardlib.gsim:

Development

Pull requests are welcome (though not expected, given the nature of the repository).

Useful tools for development:

License

The Indian Subcontinent PSHA model is released under the GNU Affero Public License 3.

Contact

Thanks

About

An OpenQuake implementation of the probabilistic seismic hazard analysis of Nath & Thingbaijam (2012)

Resources

License

Stars

Watchers

Forks

Packages

No packages published