Difference between revisions of "Basin Query Result"

From SCECpedia
Jump to navigationJump to search
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Basin Query Algorithms ==
+
== Basin Query Algorithms in Actual Implementation ==
Both Z1.0 and Z2.5 will use the same algorithms, they will just look for different Vs values Z1.0 = Vs = 1000m/s Z2.5 = Vs = 2500m/s, which we call the Target_Z.
 
 
 
*First Crossing - If the surface Vs is > Target_Z, then depth is 0. Otherwise, query the CVM every 20m depth, until a Vs >= Target_Z is found. Return the depth at which the Vs returned from the model is greater than or equal to the Target-Z.
 
 
 
*Second Crossing -
 
 
 
*Last Crossing -
 
 
 
== Basin Query Algorithms in actual implmentation ==
 
  
 
For each grid point  within the user supplied boundary, a stack of query points is generated
 
For each grid point  within the user supplied boundary, a stack of query points is generated
Line 14: Line 5:
 
backend model for their matching Vs.
 
backend model for their matching Vs.
  
Search of Vs threshold crossings of a grid point starts by looking at
+
We define three terms.
the Vs of this grid point from the first depth layer to the very last
+
*target_vs = This is either 1000m (Z1.0) or 2500m (Z2.5). Our Basin_Query script is trying to determine depth at which this is Vs is observed
depth layer.
+
*model_depth = This is the depth at which we query the velocity model. We start at current-depth=0 which is the surface.
 +
*model_vs = This is the Vs returned by the model under evaluation, and a model_vs always has an associated model_depth.
 +
*crossing = each time we query the velocity_model, we check to determine whether the model_vs is greater than or equal to the target_vs. If this is the first model_vs, or if the previous model_vs was below the target_vs, and now the model_vs is larger than the target_vs, then we consider it a crossing.
  
If the Vs is less than 0.0, it is invalid, just skip it.
+
#Search of Vs threshold crossings of a grid point starts by looking at the Vs of this grid point from the first depth layer to the very last depth layer.
 
+
#If the Vs is less than 0.0, it is invalid, just skip it.
If the Vs is greater than 0.0, check if this is a crossing point. A crossing is found if Vs  
+
#If the Vs is greater than 0.0, check if this is a crossing point. A crossing is found if Vs of the earlier depth layer is lower than the preset threshold and the Vs of the current depth layer is higher than or equal to the preset threshold, ie. an upward sloping crossing.
of the earlier depth layer is lower than the preset threshold and the Vs of the current depth layer is higher than the preset threshold, ie. an upward sloping crossing.
 
  
 
5 different types of result for all the grid points are being collected and outputted into 5 different binary data files. User may selectively collect each or all data files by supplying the matching data file names on command line.
 
5 different types of result for all the grid points are being collected and outputted into 5 different binary data files. User may selectively collect each or all data files by supplying the matching data file names on command line.
Line 44: Line 36:
 
! scope="row" | First Crossing             
 
! scope="row" | First Crossing             
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z1.first data]
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z1.first data]
[http://hypocenter.usc.edu/research/ucvmc_result/ png]
+
[http://hypocenter.usc.edu/research/ucvmc_result/cca_z1_first_map.png png]
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z2.5.first  data]
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z2.5.first  data]
[http://hypocenter.usc.edu/research/ucvmc_result/ png]
+
[http://hypocenter.usc.edu/research/ucvmc_result/cca_z2.5_first_map.png png]
 
|-
 
|-
 
! scope="row" | First Or Second Crossing             
 
! scope="row" | First Or Second Crossing             
Line 52: Line 44:
 
[http://hypocenter.usc.edu/research/ucvmc_result/cca_z1_firstOrSecond_map.png png]
 
[http://hypocenter.usc.edu/research/ucvmc_result/cca_z1_firstOrSecond_map.png png]
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z2.5.firstOrSecond  data]
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z2.5.firstOrSecond  data]
[http://hypocenter.usc.edu/research/ucvmc_result/ png]
+
[http://hypocenter.usc.edu/research/ucvmc_result/cca_z2.5_firstOrSecond_map.png png]
 
|-
 
|-
 
! scope="row" | Last Crossing             
 
! scope="row" | Last Crossing             
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z1.last data]
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z1.last data]
[http://hypocenter.usc.edu/research/ucvmc_result/ png]
+
[http://hypocenter.usc.edu/research/ucvmc_result/cca_z1_last_map.png png]
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z2.5.last  data]
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z2.5.last  data]
[http://hypocenter.usc.edu/research/ucvmc_result/ png]|
+
[http://hypocenter.usc.edu/research/ucvmc_result/cca_z2.5_last_map.png png]|
 
|-
 
|-
 
! scope="row" | Second Only  Crossing         
 
! scope="row" | Second Only  Crossing         
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z1.secondOnly data]
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z1.secondOnly data]
[http://hypocenter.usc.edu/research/ucvmc_result/ png]
+
[http://hypocenter.usc.edu/research/ucvmc_result/cca_z1_secondOnly_map.png png]
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z2.5.secondOnly  data]
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z2.5.secondOnly  data]
[http://hypocenter.usc.edu/research/ucvmc_result/ png]
+
[http://hypocenter.usc.edu/research/ucvmc_result/cca_z2.5_secondOnly_map.png png]
 
|-
 
|-
 
! scope="row" | Last but
 
! scope="row" | Last but
 
not First or Second Crossing           
 
not First or Second Crossing           
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z1.threeLast data]
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z1.threeLast data]
[http://hypocenter.usc.edu/research/ucvmc_result/ png]
+
[http://hypocenter.usc.edu/research/ucvmc_result/cca_z1_threeLast_map.png png]
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z2.5.threeLst data]
+
|| [http://hypocenter.usc.edu/research/ucvmc_result/cca_z2.5.threeLast data]
[http://hypocenter.usc.edu/research/ucvmc_result/ png]|
+
[http://hypocenter.usc.edu/research/ucvmc_result/cca_z2.5_threeLast_map.png png]
 
|-
 
|-
 
|}
 
|}
  
== Basin Query Result ==
+
The basin query command that was used to generate the result,
  
These result were ran on HPC and Blue Waters
+
CCA06: [minLat = 33.35, minLon = -123.0, nx = 1551, ny = 1201, gridSpacing = 0.005 degrees]
  
{| class="wikitable sortable" border="2"
+
mpirun -np 20 ./basin_query_mpi
|-
+
-b ${TEST_TOP_PATH}/RESULT/basin_query_mpi_cca_z2.5_n20.first,
! scope="col" style="width: 30%;"| Model
+
${TEST_TOP_PATH}/RESULT/basin_query_mpi_cca_z2.5_n20.firstOrSecond,
! scope="col" style="width: 35%;"| First Upward Crossing
+
${TEST_TOP_PATH}/RESULT/basin_query_mpi_cca_z2.5_n20.last,
! scope="col" style="width: 35%;"| Last Upward Crossing
+
${TEST_TOP_PATH}/RESULT/basin_query_mpi_cca_z2.5_n20.secondOnly,
|-
+
${TEST_TOP_PATH}/RESULT/basin_query_mpi_cca_z2.5_n20.threeLast
! scope="row" | CVM-S4.26
+
-o ${TEST_TOP_PATH}/RESULT/basin_query_mpi_cca_z2.5_n20.result  
(cvms5)
+
-f ucvm.conf -m cca -i 20 -v 2500 -l 33.35,-123.0 -s 0.005 -x 1551 -y 1201
|| [http://hypocenter.usc.edu/research/ucvmc_result/basin_query_mpi_cvms5_z1.0_n20_first.result threshold = 1000m/s]
+
 
[http://hypocenter.usc.edu/research/ucvmc_result/basin_query_mpi_cvms5_z2.5_n20_first.result threshold = 2500m/s]
+
A plot command that was used to generate one of the png file,
|| [http://hypocenter.usc.edu/research/ucvmc_result/basin_query_mpi_cvms5_z1.0_n20_second.result threshold = 1000m/s]
+
(data file were renamed to simplify the batch script)
[http://hypocenter.usc.edu/research/ucvmc_result/basin_query_mpi_cvms5_z2.5_n20_second.result threshold = 2500m/s]
+
 
|-
+
./plot_z25_map.py -b 33.35,-123.0 -u 39.35,-115.25 -c cca -s 0.005 -f cca_z2.5.first
! scope="row" | CVM-S4.26-M01
+
-o cca_z2.5_first_map.png
(cvmsi)
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/basin_query_mpi_cvmsi_z1.0_n20_first.result threshold = 1000m/s]
 
[http://hypocenter.usc.edu/research/ucvmc_result/basin_query_mpi_cvmsi_z2.5_n20_first.result threshold = 2500m/s]
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/basin_query_mpi_cvmsi_z1.0_n20_second.result threshold = 1000m/s]
 
[http://hypocenter.usc.edu/research/ucvmc_result/basin_query_mpi_cvmsi_z2.5_n20_second.result threshold = 2500m/s]
 
|-
 
|-
 
! scope="row" | CCA06
 
(cca)
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/basin_query_mpi_cca_z1.0_n20_first.result threshold = 1000m/s]
 
[http://hypocenter.usc.edu/research/ucvmc_result/basin_query_mpi_cca_z2.5_n20_first.result  threshold = 2500m/s]
 
|| [http://hypocenter.usc.edu/research/ucvmc_result/basin_query_mpi_cca_z1.0_n20_second.result threshold = 1000m/s]
 
[http://hypocenter.usc.edu/research/ucvmc_result/basin_query_mpi_cca_z2.5_n20_second.result  threshold = 2500m/s]
 
|}
 
  
Here are comparable results from OpenSHA. First crossing results were calculated by David Gill, either in UCVMC or python, I'm not sure (but 4.26 files were provided years ago and are thus likely with the C version). Second crossing results were calculated by Scott Callaghan after modifying the python version of UCVM, Summer 2017. Note that the 3rd column is second crossing, not last.
+
== Southern California Basin Query Result ==
 +
Basin Query results for southern California models are posted here:
  
{| class="wikitable sortable" border="2"
+
*[[Southern California Basin Query Results]]
|-
 
! scope="col" style="width: 30%;"| Model
 
! scope="col" style="width: 35%;"| First Upward Crossing
 
! scope="col" style="width: 35%;"| Second Upward Crossing
 
|-
 
! scope="row" | CVM-S4.26
 
(cvms5)
 
|| None
 
|| None
 
|-
 
! scope="row" | CVM-S4.26-M01
 
(cvmsi)
 
|| [https://github.com/opensha/opensha-commons/tree/5fea7ff95faa3b1ece47fe4c97b5dbcfcd5e8cee/src/resources/data/site/CVM4i26 First crossing in old tree of opensha-commons/master]
 
|| [https://github.com/opensha/opensha-commons/tree/master/src/resources/data/site/CVM4i26 Second crossing on opensha-commons/master, now with metadata]
 
|-
 
|-
 
! scope="row" | CCA06
 
(cca)
 
|| [https://github.com/opensha/opensha-commons/tree/5fea7ff95faa3b1ece47fe4c97b5dbcfcd5e8cee/src/resources/data/site/CCAi6 First crossing in old tree of opensha-commons/master]
 
|| [https://github.com/opensha/opensha-commons/tree/master/src/resources/data/site/CCAi6 Second crossing on opensha-commons/master, now with metadata]
 
|}
 
  
 
== Related Entries ==
 
== Related Entries ==

Latest revision as of 15:28, 7 December 2017

Basin Query Algorithms in Actual Implementation

For each grid point within the user supplied boundary, a stack of query points is generated with different depths in the increment of 20m. This set of query points are submitted to the backend model for their matching Vs.

We define three terms.

  • target_vs = This is either 1000m (Z1.0) or 2500m (Z2.5). Our Basin_Query script is trying to determine depth at which this is Vs is observed
  • model_depth = This is the depth at which we query the velocity model. We start at current-depth=0 which is the surface.
  • model_vs = This is the Vs returned by the model under evaluation, and a model_vs always has an associated model_depth.
  • crossing = each time we query the velocity_model, we check to determine whether the model_vs is greater than or equal to the target_vs. If this is the first model_vs, or if the previous model_vs was below the target_vs, and now the model_vs is larger than the target_vs, then we consider it a crossing.
  1. Search of Vs threshold crossings of a grid point starts by looking at the Vs of this grid point from the first depth layer to the very last depth layer.
  2. If the Vs is less than 0.0, it is invalid, just skip it.
  3. If the Vs is greater than 0.0, check if this is a crossing point. A crossing is found if Vs of the earlier depth layer is lower than the preset threshold and the Vs of the current depth layer is higher than or equal to the preset threshold, ie. an upward sloping crossing.

5 different types of result for all the grid points are being collected and outputted into 5 different binary data files. User may selectively collect each or all data files by supplying the matching data file names on command line.

  • First Crossing -- If there is no crossing, return -1 or else return the first upward crossing's depth
  • Second or First Crossing -- If there is no crossing, return -1. If there are more than one crossing, return the second to the first or else return the depth of the first crossing
  • Last Crossing -- If there is no crossing, return -1 or return the last upward crossing's depth
  • Second only Crossing -- If there is no crossing or less than two crossings, return -1. Return the second crossing depth even if there are more than two crossings.
  • Last but not Second or First Crossing -- If there is no crossing or there are less than or equal to two crossings, return -1, or return the last crossing's depth

Basin Query Algorithm Result for CCA 06

Algorithm Threshold = 1000m/s Threshold = 2500m/s
First Crossing data

png

data

png

First Or Second Crossing data

png

data

png

Last Crossing data

png

data

png|

Second Only Crossing data

png

data

png

Last but

not First or Second Crossing

data

png

data

png

The basin query command that was used to generate the result,

CCA06: [minLat = 33.35, minLon = -123.0, nx = 1551, ny = 1201, gridSpacing = 0.005 degrees]

mpirun -np 20 ./basin_query_mpi -b ${TEST_TOP_PATH}/RESULT/basin_query_mpi_cca_z2.5_n20.first, ${TEST_TOP_PATH}/RESULT/basin_query_mpi_cca_z2.5_n20.firstOrSecond, ${TEST_TOP_PATH}/RESULT/basin_query_mpi_cca_z2.5_n20.last, ${TEST_TOP_PATH}/RESULT/basin_query_mpi_cca_z2.5_n20.secondOnly, ${TEST_TOP_PATH}/RESULT/basin_query_mpi_cca_z2.5_n20.threeLast -o ${TEST_TOP_PATH}/RESULT/basin_query_mpi_cca_z2.5_n20.result -f ucvm.conf -m cca -i 20 -v 2500 -l 33.35,-123.0 -s 0.005 -x 1551 -y 1201

A plot command that was used to generate one of the png file, (data file were renamed to simplify the batch script)

./plot_z25_map.py -b 33.35,-123.0 -u 39.35,-115.25 -c cca -s 0.005 -f cca_z2.5.first -o cca_z2.5_first_map.png

Southern California Basin Query Result

Basin Query results for southern California models are posted here:

Related Entries