Skip to content

bho18/goeew

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goEEW

This repository demonstrates basic Modified Mercalli Intensity (MMI) calculations in Go. The mmi package implements several empirical intensity prediction equations (IPEs) based on published studies, and main.go provides a small example that prints the predicted intensity for a given magnitude and distance.

Implemented IPEs

The mmi package contains Go implementations of the following MMI models:

  • Bakun & Wentworth (1997) – calibrated for Californian events
  • Atkinson & Wald (2007) – recommended for near‑source distances
  • Allen & Wald (2012) – global active‑crust model

A helper function BestEstimate chooses between these equations based on simple distance heuristics.

Building and running

Go modules are used, so Go automatically resolves dependencies. To build the example program run:

go build

This creates an executable named goeew in the current directory. You can then run it directly:

./goeew

Alternatively, you can run the example without building a binary using:

go run .

The program prints the predicted MMI values for each model and a best estimate for the magnitude and distance hard‑coded in main.go.

About

An implementation of MMI estimation equations in Go.

Topics

Resources

Stars

Watchers

Forks

Languages