Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

============ BELOW is going to be replaced by a single python script setup.py ===============

Generate a fault list.  The optional  --run_dir will check if all the simulation result in run_dir have a matching fault data in srf_dir. 

 


Code Block
module add Python/2.7.14-gimkl-2017a
Code Block
baes@mahuika02: /nesi/nobackup/nesi00213/RunFolder/Cybershake/v18p6$ python /nesi/project/nesi00213/deploy/seisfinder2/utils/gen_fault_listsetup.py --help 

usage: gen_fault_listsetup.py [-h] [--runn NAME] cybershake_dir RUNempirical_DIR] srf_dir outll_csvfile
positional arguments:
  srfcybershake_dir        Cybershake Root directory eg.
   Source directory
       out_csv            Output CSV filename
optional arguments:
  -h, --help      /nesi/nobackup/nesi00213/RunFolder/Cybershake/v18p6
  empirical_dir         Empirical data root directory eg.
    show this help message and exit
  --run_dir RUN_DIR  Run directory for extra validation


baes@mahuika02: /nesi/nobackup/nesi00213/RunFolder/Cybershake/v18p6$ python /nesi/project/nesi00213/deploy/seisfinder2/utils/gen_fault_list.py Data/Sources  /nesi/nobackup/nesi00213/RunFolder/Cybershake/v18p6/v18p6_fault_list.csv --run_dir /nesi/nobackup/nesi00213/RunFolder/Cybershake/v18p6/Runs
Warning: More faults found than simulated results : Ignoring these
['FiordSZ03', 'FiordSZ09']
Output CSV successfully written: /nesi/nobackup/nesi00213/RunFolder/Cybershake/v18p6/v18p6_fault_list.csv

 

Build the DB out of Cybershake data. Identify where Cybershake Runs directory is located (eg. /nesi/nobackup/nesi00213/RunFolder/Cybershake/v18p6/Runs) and go to the root of Cybershake. (eg. /nesi/nobackup/nesi00213/RunFolder/Cybershake/ ) 

 

Code Block
baes@mahuika02: /nesi/nobackup/nesi00213/RunFolder/Cybershake$ python /nesi/project/nesi00213/deploy/seisfinder2/utils/data_import/create_cybershake_csvs.py -v v18p6 

 

This creates CSV files under v18p6/CSV

 

Code Block
baes@mahuika02: /nesi/nobackup/nesi00213/RunFolder/Cybershake/v18p6/CSV$ ls -ltr
total 4609
-rw-rw-r-- 1 baes nesi00213 4103996 Oct 16 02:50 SimRun.csv
-rw-rw-r-- 1 baes nesi00213  341250 Oct 16 02:50 SimRunMap.csv
-rw-rw-r-- 1 baes nesi00213     236 Oct 19 02:05 SimRunSet.csv

 

Currently, SimRunSet.csv needs to be manually edited. [!!! Should be in the seisfinder root directory as a config file. This needs an overhaul ]

 

empiricals/v18p5
  ll_file               Path to the .ll file
optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  Optional name for Cybershake
 
Code Block
baes@mahuika02: 
Code Block
id,name,type,simRunSetPath,empiricalPath,faultListPath
1,v18p6,1,/nesi/nobackup/nesi00213/RunFolder/Cybershake/v18p6/,/nesi/nobackup/nesi00213/empiricals/v18p5/,/nesi/nobackup/nesi00213/RunFolder/Cybershake/v18p6/v18p6_fault_list.csv

 

...

 

Code Block
v18p6$ python /nesi/project/nesi00213/deploy/seisfinder2/utils/data_import/insert_csvdata_to_dbsetup.py . /nesi/nobackup/nesi00213/RunFolder/Cybershake/v18p6/v18p6.db /nesi/nobackup/nesi00213/RunFolder/Cybershake/v18p6/CSV

 

...

empiricals/v18p5 non_uniform_whole_nz_with_real_stations-hh400_v18p6.ll -n v18p6


Edit  `common/constants.py` [!!! Should be in the seisfinder root directory as a config file. This needs an overhaul ]. You need to specify DB_PATH and TEMP_DIR 

...

Code Block
...
[site]
quakes = v18p6
...

 

Generate a list of locations .csv from a .ll file. 

 

Code Block
bash /nesi/project/nesi00213/deploy/seisfinder2/utils/ll2csv.sh /nesi/nobackup/nesi00213/RunFolder/Cybershake/v18p6/non_uniform_whole_nz_with_real_stations-hh400_v18p6_land.ll

 

...

.

...

.

...

.

 

================= RUN ================

...