Giter Club home page Giter Club logo

haz's Introduction

HAZ

Build Status

Probabilistic Seismic Hazard Analysis written by Norm Abrahamson.

Compiling

HAZ is written in FORTRAN and may be compiled with Intel's ifort compiler or GNU's gfortran compiler.

Windows

On Windows, the easiest way to get a build system running is via MSYS2. After following the installation instructions, open an MinGW terminal and issue the following commands to install the required dependencies. Note, that these commands install the 64-bit versions. If you prefer to use 32-bit versions replace "x86_64" with "i686".

pacman -S git mingw-w64-x86_64-gcc-libgfortran mingw-w64-x86_64-cmake

After installing the required dependencies, HAZ can be checked out of Git and built using the following:

git clone https://github.com/abrahamson/HAZ.git HAZ
cd  HAZ
mkdir build
cd build
cmake .. -G "MSYS Makefiles"
make

This build will require DLLs provided by MSYS2. A static build that includes the required DLLs, can be built with:

cmake .. -G "MSYS Makefiles" -DSTATIC=ON
make

The HAZ executable can then be found under HAZ/build/HAZ.exe.

haz's People

Contributors

abrahamson avatar arkottke avatar bowmei avatar christiehale avatar njgregor avatar

Stargazers

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

haz's Issues

Y&C more flexible

When calculating the rate, right now it assumes that M0-5 is in the exponential part only. Need to make it more flexible so that it can calculate if M0-5 is in the characteristic part at all (Mmeanchar 5.15 or something).

Travis CI build times out

Travis CI stops the build because no output has been received for 10 minutes:

Running HAZ on: ../tests/Set3/S3Test3/Approach a/Run_S3Test3.txt
At line 526 of file /home/travis/build/arkottke/HAZ/HAZ files/readFlt.f (unit = 10, file = 'Source_S3Test3.txt')
Fortran runtime error: End of file
Running HAZ on: ../tests/Set3/S3Test3/Approach b1/Run_S3Test3.txt
Running HAZ on: ../tests/Set3/S3Test1a/Run_S3Test1a.txt
Running HAZ on: ../tests/Set3/S3Test1b/Run_S3Test1b.txt
Running HAZ on: ../tests/Set3/S3Test2/Fractiles/Run_Fractiles.txt
STOP 99
Running HAZ on: ../tests/Set3/S3Test2/Hazard/Run_S3Test2.txt
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received

additional reference test cases

  1. testing source type 7 (Nick)
  2. testing source type 3 (Christie)
  3. testing WAACY mag pdf (Debra)
  4. testing NGA-W1 GMPEs (Christie)
  5. bilinear TE mag pdf (Debra)
  6. testing epistemic uncer in median and sigma (Christie)
  7. testing segmentation for faults (Christie)
  8. testing all four rate methods for faults (SR, Act rate, Rec Int, Moment rate) (Debra)
  9. Run Option 1 (Christie)
  10. Run Option 2 (Christie)

SWUS_PhiSS_Global_R50 inconsistency

Some of the calls to this subroutine in MED_ATT.F have five arguments while the subroutine itself in SIGMA.f only has three arguments. Need to clean up sigma models, run verification tests, and add identifying numbers to jcalc list.

CY14

Check for limit on Ztor (20 km)

Sloppy array allocation prevents compiler optimizations

In many instances, arrays are initialized using a single length (e.g., wa_pmag(1)), but the actual length is known and not 1. This manner of programming prevents the compiler from performing optimizations and should be addressed.

Deaggregation and gm_wt

There is an issue with the deaggregation bins (out4) in that the gm_wt is not accounted for in the variable HazBins. The likely fix is to modify the file HAZ_MAIN2.f line 543 to add dble(mHaz wt gm_wt(iProb,jType,iAtten)) to HazBins. This issue does not affect the average deaggregation values (Mbar, Dbar, etc.), and was not caught in verification test 2.1 because that test only had one ground motion model. Also noticed that the subroutine output_HazBins passes in the variable jcalc but this is never used - should clean this up.

override mag option

The override mag option does not work (and no one has used this for years)
Remove this option and remove the input in the fault file

GC2

  1. Test more fault orientations (make sure to test ones with straight horizontal and vertical segments)
  2. Need to make robust so that if only 1 grid cell down-dip or along strike it still works, or at least gives an error

Deaggregation mag bin output format

In Run_S1Test1.txt, the magnitude deaggregation values are defined as 4.75, 5.75, 6.25, 6.75, and 7.0. The Set1Test1_Site1.out4 file lists these magnitude ranges to one decimal place as 4.8, 5.8, 6.3, 6.8, and 7.0. These input and output values should be consistent. Additionally, when the code is compiled and run using gfortran via msys2 the Set1Test1_Site1.out4 file lists these magnitude ranges as 4.8, 5.8, 6.2, 6.8, 7.0 (code = develop branch Feb 9). This is likely a compiler compatibility issue but it should be checked that it is not a change to the code. Possible fix is to change the formatting such that two decimal places are written to the output file.

HAZ45.2 distributed executables Run Option 1

The HAZ45.2 executables that were distributed on box were compiled with array conformance options. Ref Test 9 will not run on these executables as the code will produce an array conformance error. The error is coming from the variable period1(jType,iProb) at the very end of the meanInten subroutine. The issue is that iProb is not needed with run option 1, never set, and is therefore given a value of zero. A zero index is not a valid index. If the code is compiled without array conformance options then there is no issue, but the code should be fixed to run with array conformance options. Possible fix is to set iProb = 1 in the determ subroutine for Run Option 1.

SourceType 4

Think about how to rework. grid_top should be based on iflt and j. Second array identifier shouldn't always be 1.

Haversine

in SetFltBottom subroutine use the haversine formula instead of flat earth

HypoDepth errors

Hypodepth error fixed for SourceType=1 - need to fix other SourceTypes

Condense out SourceType 6

delete sourcetype 6 and create an option to run non-uniform weighting of rupture locations with sourcetype 5

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.