Difference between revisions of "New BBP Validation Package"
From SCECpedia
Jump to navigationJump to search (Created page with "This page outlines the process to create a new BBP validation package and use it to produce goodness-of-fit results <ol> <li>Copy over an already-existing validation package...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | This page outlines the process to create a new BBP validation package and use it to produce goodness-of-fit results | + | This page outlines the process to create a new BBP validation package and use it to produce CyberShake goodness-of-fit results. |
+ | |||
+ | == Create BBP Validation Package == | ||
<ol> | <ol> | ||
Line 5: | Line 7: | ||
<li>Copy the .src file and the .stl file that were used for the validation simulation.</li> | <li>Copy the .src file and the .stl file that were used for the validation simulation.</li> | ||
<li>Edit the validation_config.txt file, if needed. Possibly modify EVENT_VELOCITY_MODEL, P_CODEBASE_ALL_source, and P_CODEBASE_ALL_stations.</li> | <li>Edit the validation_config.txt file, if needed. Possibly modify EVENT_VELOCITY_MODEL, P_CODEBASE_ALL_source, and P_CODEBASE_ALL_stations.</li> | ||
− | <li>Create the .acc files. There should be 1 file per station per component with the filename <station>_<comp>.acc. These files use the following format: | + | <li>Create the .acc files. There should be 1 file per station per component with the filename <station>_<comp>.acc. These files use the following format: |
<pre>Rotated Accelerogram to <direction> | <pre>Rotated Accelerogram to <direction> | ||
H1 for rotation: <station name> <original angle 1> | H1 for rotation: <station name> <original angle 1> | ||
Line 14: | Line 16: | ||
<values, 6 per row in %.6e format> | <values, 6 per row in %.6e format> | ||
</pre> | </pre> | ||
+ | You can use the script on Summit in ~callag/scripts/convert_bbp_to_acc.py to convert an acceleration BBP file into 3 .acc files. | ||
+ | </li> | ||
+ | </ol> | ||
+ | |||
+ | == Perform goodness-of-fit with CyberShake results == | ||
+ | |||
+ | <ol> | ||
+ | <li>Create a working directory to assemble the CyberShake output files.</li> | ||
+ | <li>Copy CyberShake *.vel.bbp and *.acc.bbp files to the working directory.</li> | ||
+ | <li>Run bbp/utils/misc/import_bbp_simulation.py to copy the files into the outdata directory with the correct filenames. You can make up any sim id. The script creates the filenames using "<prefix><station name><suffix>.<vel|acc>.bbp", so you may need to change the CyberShake filename to have the entire station name in them. Sample invocation: | ||
+ | <pre> | ||
+ | bbp/utils/misc/import_bbp_simulation.py --sim_id 202108120 --src_file bbp_val/NorthridgeBBP/common/nr_v14_02_1.src --station_list bbp_val/NorthridgeBBP/common/nr_v19_02_1.stl --input_dir . --prefix "Seismogram_" --suffix "_0_0_0_bb.0"</pre> | ||
+ | </li> | ||
+ | <li>Create a BBP run which contains the stages we need to perform GoF. The easiest way to do this is to run the BBP scripts in -g mode, which generates the XML representation of the BBP workflow but doesn't execute it. Sample invocation: | ||
+ | <pre>run_bbp.py --expert -g</pre> | ||
+ | When prompted, select 'validation simulation', the validation simulation created in the first part from the list, 'GP', no custom source, yes rupture generator, all stations, yes site response, yes velocity seismogram plots, yes acceleration seismogram plots, no GMPE comparisons, yes goodness-of-fit, 'GP', no additional metrics. This will generate an XML file.</li> | ||
+ | <li>Run the BBP, but skip all simulation stages and start with the plot_map module. To do this, run: | ||
+ | <pre>run_bbp.py -x <XML file> --sim-id <sim id used with import_bbp_simulation.py> -r Plot_Map</pre> | ||
+ | This will generate plots and GoF results in the outdir/<sim id> directory. | ||
+ | </li> | ||
+ | </ol> |
Latest revision as of 16:59, 13 August 2021
This page outlines the process to create a new BBP validation package and use it to produce CyberShake goodness-of-fit results.
Create BBP Validation Package
- Copy over an already-existing validation package in $BBP_VAL_DIR.
- Copy the .src file and the .stl file that were used for the validation simulation.
- Edit the validation_config.txt file, if needed. Possibly modify EVENT_VELOCITY_MODEL, P_CODEBASE_ALL_source, and P_CODEBASE_ALL_stations.
- Create the .acc files. There should be 1 file per station per component with the filename <station>_<comp>.acc. These files use the following format:
Rotated Accelerogram to <direction> H1 for rotation: <station name> <original angle 1> H2 for rotation: <station name> <original angle 2> rotation angle - n/a Acceleration in g <npts> <dt> NPTS, DT <values, 6 per row in %.6e format>
You can use the script on Summit in ~callag/scripts/convert_bbp_to_acc.py to convert an acceleration BBP file into 3 .acc files.
Perform goodness-of-fit with CyberShake results
- Create a working directory to assemble the CyberShake output files.
- Copy CyberShake *.vel.bbp and *.acc.bbp files to the working directory.
- Run bbp/utils/misc/import_bbp_simulation.py to copy the files into the outdata directory with the correct filenames. You can make up any sim id. The script creates the filenames using "<prefix><station name><suffix>.<vel|acc>.bbp", so you may need to change the CyberShake filename to have the entire station name in them. Sample invocation:
bbp/utils/misc/import_bbp_simulation.py --sim_id 202108120 --src_file bbp_val/NorthridgeBBP/common/nr_v14_02_1.src --station_list bbp_val/NorthridgeBBP/common/nr_v19_02_1.stl --input_dir . --prefix "Seismogram_" --suffix "_0_0_0_bb.0"
- Create a BBP run which contains the stages we need to perform GoF. The easiest way to do this is to run the BBP scripts in -g mode, which generates the XML representation of the BBP workflow but doesn't execute it. Sample invocation:
run_bbp.py --expert -g
When prompted, select 'validation simulation', the validation simulation created in the first part from the list, 'GP', no custom source, yes rupture generator, all stations, yes site response, yes velocity seismogram plots, yes acceleration seismogram plots, no GMPE comparisons, yes goodness-of-fit, 'GP', no additional metrics. This will generate an XML file. - Run the BBP, but skip all simulation stages and start with the plot_map module. To do this, run:
run_bbp.py -x <XML file> --sim-id <sim id used with import_bbp_simulation.py> -r Plot_Map
This will generate plots and GoF results in the outdir/<sim id> directory.