Difference between revisions of "UCVM sfcvm geomodelgrid"

From SCECpedia
Jump to navigationJump to search
 
(80 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== UCVM with SFCVM ==
 
== UCVM with SFCVM ==
 +
 +
Software stack for supporting geomodelgrid based format:
 +
 +
#curl (curl-7.87.0)
 +
#hdf5 (hdf5-1.10.9)
 +
#openssl (openssl-3.0.8)
 +
#proj (proj-8.1.1)
 +
#sqlite (sqlite-autoconf-3400100)
 +
#tiff (tiff-4.5.0)
 +
 +
== SFCVM in UCVM ==
 +
 +
geomodelgrid based SFCVM is set with
 +
 +
<pre> 
 +
    geomodelgrids_squery_setSquashing(sfcvm_geo_query_object, GEOMODELGRIDS_SQUASH_TOPOGRAPHY_BATHYMETRY);
 +
    geomodelgrids_squery_setSquashMinElev(sfcvm_geo_query_object, SFCVM_SquashMinElev);
 +
</pre>
 +
 +
where SFCVM_SquashMinElev is default to -5000m (sfcvm is elevation based, depth is negative value)
 +
 +
NOTE:
 +
For locations that are below water, their geomodelgrids_squery_queryTopoBathyElevation() could return a NA value
 +
and so a grid height is added across the board to always have an usable value.
 +
 +
== Plots from web viewer ==
 +
{|
 +
| [[FILE:sfcvm_region.png|thumb|300px|sfcvm regions]]
 +
|}
 +
 +
{|
 +
| [[FILE:sfcvm_c1.png|thumb|300px|sfcvm cross section]]
 +
|}
 +
 +
{|
 +
| [[FILE:sfcvm_h0.png|thumb|300px|sfcvm depth 0m]]
 +
| [[FILE:sfcvm_h100.png|thumb|300px|sfcvm depth 100m]]
 +
| [[FILE:sfcvm_h1000.png|thumb|300px|sfcvm depth 1000m]]
 +
|}
 +
 +
{|
 +
| [[FILE:sfcvm_h5000.png|thumb|300px|sfcvm depth 5000m]]
 +
| [[FILE:sfcvm_h6000.png|thumb|300px|sfcvm depth 6000m]]
 +
|}
  
 
== New command line option for model specific configuration ==
 
== New command line option for model specific configuration ==
Line 15: Line 59:
  
  
Note:
+
Allows multiple -P options,  
# allows multiple -P options, ie. ucvm_query ... -P cvmh_param:USE_1D_BKG,False -P cvmh_param:USE_GTL,False
+
<pre>
 +
ucvm_query ... -P cvmh_param:USE_1D_BKG,False -P cvmh_param:USE_GTL,False
 +
</pre>
 +
 
 +
 
 +
== More detailed plots from SFCVM ==
 +
 
 +
Internal calls from web viewer, (set e to 0,100,1000,5000,6000)
 +
 
 +
<pre>
 +
PROJ_LIB=/usr/local/share/anaconda2/share/proj PATH=/usr/local/share/anaconda2/bin:/usr/local/share/anaconda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PYTHONPATH=../model/UCVM_TARGET/ucvm_plotting plot_horizontal_slice.py  -d vs -c sfcvm -s 0.010 -a sd -o ../result/UCVM_15167424_h.png -n ../model/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET  -b 36.5416,-123.8269 -u 38.8108,-120.6299 -e 0
 +
 
 +
</pre>
 +
 
 +
{|
 +
| [[FILE:sfcvm_h0_2.png|thumb|300px|sfcvm depth 0m]]
 +
| [[FILE:sfcvm_h100_2.png|thumb|300px|sfcvm depth 100m]]
 +
| [[FILE:sfcvm_h1000_2.png|thumb|300px|sfcvm depth 1000m]]
 +
|}
 +
 
 +
{|
 +
| [[FILE:sfcvm_h5000_2.png|thumb|300px|sfcvm depth 5000m]]
 +
| [[FILE:sfcvm_h6000_2.png|thumb|300px|sfcvm depth 6000m]]
 +
|}
 +
 
 +
== Detail plots from Cencal ==
 +
 
 +
{|
 +
| [[FILE:cencal_h0_2.png|thumb|300px|cencal depth 0m]]
 +
| [[FILE:cencal_h100_2.png|thumb|300px|cencal depth 100m]]
 +
| [[FILE:cencal_h1000_2.png|thumb|300px|cencal depth 1000m]]
 +
|}
 +
 
 +
{|
 +
| [[FILE:cencal_h5000_2.png|thumb|300px|cencal depth 5000m]]
 +
| [[FILE:cencal_h6000_2.png|thumb|300px|cencal depth 6000m]]
 +
|}
 +
 
 +
{|
 +
| [[FILE:cencal_c1.png|thumb|300px|cencal cross section]]
 +
|}
 +
 
 +
 
 +
== High Velocity surface regions in SFCVM ==
 +
 
 +
Horizontal region,
 +
 
 +
{|
 +
| [[FILE:sfcvm_h_yp.png|thumb|300px|horizontal region]]
 +
|}
 +
 
 +
<pre>
 +
plot_horizontal_slice.py  -d vs -c sfcvm,elygtl:taper -s 0.0005 -a sd -o ../result/UCVM_18933492_h.png -n ../model/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET  -L 500,1700,1700 -z 0,700 -b 37.6021,-122.1711 -u 37.7922,-122.0021 -e 500 -A 0.0,4.0
 +
</pre>
 +
 
 +
with sfcvm (only detailed region)
 +
 
 +
{|
 +
| [[FILE:sfcvm_h0_yp.png|thumb|300px|at depth 0m]]
 +
| [[FILE:sfcvm_h500_yp.png|thumb|300px|at depth 500m]]
 +
| [[FILE:sfcvm_h1000_yp.png|thumb|300px|at depth 1000m]]
 +
| [[FILE:sfcvm_h5000_yp.png|thumb|300px|at depth 5000m]]
 +
|}
 +
 
 +
with sfcvm,elygtl:taper (only detailed region)
 +
 
 +
{|
 +
| [[FILE:sfcvm_h0_yp_taper.png|thumb|300px|at depth 0m with taper]]
 +
| [[FILE:sfcvm_h500_yp_taper.png|thumb|300px|at depth 500m with taper]]
 +
| [[FILE:sfcvm_h1000_yp_taper.png|thumb|300px|at depth 1000m with taper]]
 +
|}
 +
 
 +
with sfcvm,elygtl:taper -A 0,2 (only detailed region)
 +
{|
 +
| [[FILE:sfcvm_h0_taper_0_2.png|thumb|300px|at depth 0m with taper]]
 +
| [[FILE:sfcvm_h50_taper_0_2.png|thumb|300px|at depth 50m with taper]]
 +
| [[FILE:sfcvm_h100_taper_0_2.png|thumb|300px|at depth 100m with taper]]
 +
|}
 +
 
 +
== SFCVM(detailed + regional regions) with Gabbro modification ==
 +
 
 +
Upper San Leandro Gabbro region Map,
 +
 
 +
{|
 +
| [[FILE:sfcvm_gabbro_regions.png|thumb|300px|regions]]
 +
|}
 +
 
 +
Rectangle horizontal box,
 +
{|
 +
| [[FILE:sfcvm_no_gabbro_h1.png|thumb|300px|no Gabbro]]
 +
| [[FILE:sfcvm_gabbro_h1.png|thumb|300px|Gabbro]]
 +
|}
 +
 
 +
Lower Cross section,
 +
{|
 +
| [[FILE:sfcvm_no_gabbro_c1.png|thumb|300px|no Gabbro]]
 +
| [[FILE:sfcvm_gabbro_c1.png|thumb|300px|Gabbro]]
 +
|}
 +
 
 +
Diagonal Cross section,
 +
{|
 +
| [[FILE:sfcvm_no_gabbro_c2.png|thumb|300px|no Gabbro]]
 +
| [[FILE:sfcvm_gabbro_c2.png|thumb|300px|Gabbro]]
 +
|}
 +
 
 +
Depth Profile at the blue marker,
 +
{|
 +
| [[FILE:sfcvm_no_gabbro_v.png|thumb|300px|no Gabbro]]
 +
| [[FILE:sfcvm_gabbro_v.png|thumb|300px|Gabbro]]
 +
|}
 +
 
 +
 
 +
Comparing depth profile plot (red=no gabbro, blue=gabbro)
 +
{|
 +
| [[FILE:sfcvm_d_vs.png|thumb|300px|vs comparison]]
 +
| [[FILE:sfcvm_dd_vs.png|thumb|300px|zoomed in vs comparison]]
 +
| [[FILE:sfcvm_d_vp.png|thumb|300px|vp comparison]]
 +
|}
 +
 
 +
 
 +
 
 +
with Gabbro modification (full detailed +regional regions)
 +
{|
 +
| [[FILE:sfcvm_h0_gabbro2.png|thumb|300px|at depth 0m with Gabbro]]
 +
| [[FILE:sfcvm_h500_gabbro2.png|thumb|300px|at depth 500m with Gabbro]]
 +
| [[FILE:sfcvm_h1000_gabbro2.png|thumb|300px|at depth 1000m with Gabbro]]
 +
|}
 +
{|
 +
| [[FILE:sfcvm_h5000_gabbro2.png|thumb|300px|at depth 5000m with Gabbro]]
 +
| [[FILE:sfcvm_h7500_gabbro2.png|thumb|300px|at depth 7500m with Gabbro]]
 +
|}
 +
 
 +
== Vertical Slice ==
 +
 
 +
{|
 +
| [[FILE:sfcvm_v_yp.png|thumb|300px|vertical section]]
 +
|}
 +
 
 +
with sfcvm (detailed region)
 +
 
 +
<pre>
 +
plot_cross_section.py -s 0 -h 48 -d vs -c sfcvm,elygtl:taper -a sd -o ../result/UCVM_23820778_c.png -n ../model/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET -v 25 -L 500,1700,1700 -z 0,700 -b 37.7026,-122.1728 -u 37.701,-121.9984 -e 5000 -A 0.0,4.0
 +
</pre>
 +
 
 +
{|
 +
| [[FILE:sfcvm_v2_yp.png|thumb|300px|vertical slice upto 1k]]
 +
| [[FILE:sfcvm_v1_yp.png|thumb|300px|vertical slice upto 50k]]
 +
|}
 +
 
 +
with sfcvm,elygtl:taper (detailed region)
 +
 
 +
{|
 +
| [[FILE:sfcvm_v2_yp_taper.png|thumb|300px|vertical slice upto 1k]]
 +
| [[FILE:sfcvm_v1_yp_taper.png|thumb|300px|vertical slice upto 50k]]
 +
|}
 +
 
 +
== More Study ==
 +
 
 +
SFCVM (detailed+regional)
 +
 
 +
{|
 +
| [[FILE:sfcvm_area.png|thumb|400px|sfcvm coverage ]]
 +
|}
 +
 
 +
 
 +
With Water-Step1-Step2 modifications
 +
 
 +
  surf = geomodelgrids_squery_queryTopoBathyElevation
 +
  surf < 0:
 +
    call geomodelgrids_squery_query with elevation= N
 +
    if vs<0 || vp<0
 +
        call geomodelgrids_squery_query with elevation= N-25 (first step down grid height)
 +
        if vs < 0 || vp < 0
 +
          call geomodelgrids_squery_query with elevation= N-125 (second step down grid height)
 +
 
 +
<pre>
 +
PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:
 +
/usr/local/share/anaconda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
 +
PYTHONPATH=../model/UCVM_TARGET/ucvm_plotting plot_horizontal_slice.py  -d vs -c sfcvm
 +
-s 0.010 -a sd -o ../result/UCVM_93552953_h.png -n ../model/UCVM_TARGET/conf/ucvm.con
 +
f -i ../model/UCVM_TARGET  -b 34.5541,-126.9141 -u 41.4695,-117.9492 -e 0 -A 0,4
 +
</pre>
 +
 
 +
{|
 +
| [[FILE:sfcvm_gabbro_yes_map.png|thumb|500px | sfcvm gabbro map]]
 +
| [[FILE:sfcvm_gabbro_yes.png|thumb|500px|sfcvm gabbro 0m]]
 +
|}
 +
 
 +
With Water-Step1-Step2-again modification
 +
 
 +
<pre>
 +
  surf = geomodelgrids_squery_queryTopoBathyElevation
 +
 
 +
  surf < 0:
 +
    call geomodelgrids_squery_query with elevation= N
 +
    if vs<0 || vp<0
 +
        call geomodelgrids_squery_query with elevation= N-25 (first step down grid height)
 +
        if vs < 0 || vp < 0
 +
          call geomodelgrids_squery_query with elevation= N-125 (second step down grid height)
 +
 
 +
          while ( vs < 0 || vp < 0 )
 +
            call geomodelgrids_squery_query with elevation= N-125-(25*step)
 +
          until vs>0 && vp>0 || step > 100
 +
 
 +
</pre>
 +
 
 +
{|
 +
| [[FILE:sfcvm_gabbro_yes_water.png|thumb|500px|sfcvm gabbro water 0m]]
 +
|}
 +
 
 +
 
 +
With finer grid, grid step of 0.01
 +
<pre>
 +
DONE:
 +
    total query count=(622314)
 +
    total gabbro count=(78)
 +
    total water count=(89765)
 +
    total water step count=(89180)
 +
    total water loop count=(43286)
 +
    max water loops =(57)
 +
</pre>
 +
 
 +
== With different grid step processing ==
 +
 
 +
With grid step of 0.10
 +
 
 +
<pre>
 +
PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:
 +
/usr/local/share/anaconda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
 +
PYTHONPATH=../model/UCVM_TARGET/ucvm_plotting plot_horizontal_slice.py  -d vs -c sfcvm
 +
-s 0.10 -a sd -o ../result/UCVM_59976096_h.png -n ../model/UCVM_TARGET/conf/ucvm.conf
 +
-i ../model/UCVM_TARGET  -b 34.5541,-126.9141 -u 41.4695,-117.9492 -e 0 -A 0,4
 +
</pre>
 +
 
 +
{|
 +
| [[FILE:sfcvm_water_0.png|thumb|500px|sfcvm less detail plot 0m]]
 +
|}
 +
 
 +
 
 +
Status result,
 +
 
 +
step count is the number of query that needed stepping down
 +
 
 +
max loops is the max number of looping a step-down query needed
 +
ie. there is a location that needs to go down to 125+(22*25) meters before
 +
finding a valid data
 +
 
 +
<pre>
 +
 
 +
DONE:
 +
    total query count=(6461)
 +
    total gabbro count=(0)
 +
    total water count=(894)
 +
    total water step count=(890)
 +
    total water loop count=(435)
 +
    max water loops =(22)
 +
</pre>
 +
 
 +
== With a Different step down processing ==
 +
 
 +
Using Squash Min Elevation of -45000.
 +
 
 +
<pre>
 +
 
 +
surf = geomodelgrids_squery_queryTopoBathyElevation
 +
surf < 0:
 +
    call geomodelgrids_squery_query with elevation= N
 +
    if vs < 0 || vp < 0
 +
      call geomodelgrids_squery_query with elevation= N-25 (first step down grid height)
 +
      if vs < 0 || vp < 0
 +
          cnt=1
 +
          while
 +
            call geomodelgrids_squery_query with elevation= N-(125*cnt)(second step down grid height)
 +
            if vs > 0 && vp > 0
 +
                // FOUND IT... TODO: additional backtrack processing
 +
            else
 +
                try again
 +
     
 +
</pre>
 +
 
 +
{|
 +
| [[FILE:sfcvm_water_3.png|thumb|500px|sfcvm  plot 0m]]
 +
|}
 +
 
 +
<pre> 
 +
 
 +
    total query count=(622314)
 +
    total gabbro count=(82)
 +
    total water count=(89765)
 +
    total water step count=(89180)
 +
    total water 2 step count=(69498)
 +
    max water step =(10)
 +
 
 +
</pre>
 +
 
 +
<pre> 
 +
  In the 2-step while loop, number of query to number of cnt
 +
 +
  61482    done(1)
 +
      1    done(10)
 +
  7997    done(2)
 +
    11    done(3)
 +
      4    done(4)
 +
      1    done(5)
 +
      1    done(6)
 +
      1    done(8)
 +
 
 +
???
 +
WATER: still bad : at -124.824100 40.314100 -127.914481 -- surface -1025.307276 zsquash -1150.307276
 +
WATER: still bad : at -124.824100 40.314100 -255.828962 -- surface -1025.307276 zsquash -1275.307276
 +
WATER: still bad : at -124.824100 40.314100 -383.743443 -- surface -1025.307276 zsquash -1400.307276
 +
WATER: still bad : at -124.824100 40.314100 -511.657924 -- surface -1025.307276 zsquash -1525.307276
 +
WATER: still bad : at -124.824100 40.314100 -639.572405 -- surface -1025.307276 zsquash -1650.307276
 +
WATER: still bad : at -124.824100 40.314100 -767.486886 -- surface -1025.307276 zsquash -1775.307276
 +
WATER: still bad : at -124.824100 40.314100 -895.401367 -- surface -1025.307276 zsquash -1900.307276
 +
WATER: still bad : at -124.824100 40.314100 -1023.315849 -- surface -1025.307276 zsquash -2025.307276
 +
WATER: still bad : at -124.824100 40.314100 -1151.230330 -- surface -1025.307276 zsquash -2150.307276
 +
    done(10) : at -124.824100 40.314100 -1279.144811 -- surface -1025.307276 zsquash -2275.307276  : previous_zsquash -2150.307276 previous_n_entry_elevation -1151.230330
 +
 
 +
</pre>
 +
 
 +
 
 +
For points with cnt of 3+
 +
 
 +
{|
 +
| [[FILE:sfcvm_water_4.png|thumb|500px|sfcvm lagoon with cnt >=3 0m]]
 +
|}
 +
 
 +
For point with cnt of 10
 +
 
 +
{|
 +
| [[FILE:sfcvm_water_5.png|thumb|500px|sfcvm lagoon with cnt == 10 0m]]
 +
|}
 +
 
 +
== With  minimum squashing elevation of 45000==
 +
 
 +
 
 +
double SFCVM_SquashMinElev=-45000.0
 +
 
 +
extended geomodelgrids c-api:
 +
 
 +
<pre>
 +
/** Query for model at point.
 +
*
 +
* @param[inout] handle Handle to query object.
 +
* @param[in] x X coordinate of point (in input CRS).
 +
* @param[in] y Y coordinate of point (in input CRS).
 +
* @returns model index at point.
 +
*/
 +
int geomodelgrids_squery_queryModelContains(void* handle,
 +
                                            const double x,
 +
                                            const double y);
 +
</pre>
 +
 
 +
 
 +
<pre>
 +
PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:/usr/local/share
 +
/anaconda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PYTHONPATH=../model/UCVM_TARGET/
 +
ucvm_plotting plot_horizontal_slice.py  -d vs -c sfcvm -s 0.001 -a sd -o ../result/UCVM_72526857_h.png
 +
-n ../model/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET  -b 37.3249,-122.6129 -u 38.2366,-121.
 +
6187 -e 0
 +
</pre>
 +
 
 +
{|
 +
| [[FILE:sfcvm-45k-0m.png|thumb|400px|0 m]]
 +
| [[FILE:sfcvm-45k-100m.png|thumb|400px|100m ]]
 +
| [[FILE:sfcvm-45k-1000m.png|thumb|400px|1000m ]]
 +
|}
 +
 
 +
{|
 +
| [[FILE:sfcvm-45k-0m-elev.png|thumb|400px|0m elevation ]]
 +
| [[FILE:sfcvm-45k-100m-elev.png|thumb|400px|100m elevation ]]
 +
| [[FILE:sfcvm-45k-1000m-elev.png|thumb|400px|1000m elevation ]]
 +
|}
 +
 
 +
== fixed geomodelgrid's handling of zone-id ==
 +
 
 +
fixed geomodelgrids' handling of interpolating all stored material properties
 +
including type-enumerated data like rock type.
 +
 +
Logic: 
 +
<pre>
 +
if data has no 'units', then use nearest data point
 +
if data has 'units',  then interpolated with surrounding points
 +
</pre>
 +
 
 +
<pre>
 +
PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:/usr/local/share/
 +
anaconda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PYTHONPATH=../model/UCVM_TARGET/uc
 +
vm_plotting plot_horizontal_slice.py  -d vs -c sfcvm -s 0.010 -a sd -o ../result/$FNAME.png -n ../model
 +
/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET  -b 34.5541,-126.9141 -u 41.4695,-117.9492 -e 0 -A
 +
0,4
 +
</pre>
 +
 
 +
 
 +
{|
 +
| [[FILE:sfcvm-gabbro-interpolate-points.png|thumb|400px|79 interpolated gabbro points ]]
 +
| [[FILE:sfcvm-gabbro-nearest-points.png|thumb|400px|28 nearest gabbro pointsm]]
 +
|}
 +
 
 +
{|
 +
| [[FILE:sfcvm-gabbro-interpolate.png|thumb|400px|interpolated gabbro ]]
 +
| [[FILE:sfcvm-gabbro-nearest.png|thumb|400px|nearest gabbro]]
 +
|}
 +
 
 +
<pre>
 +
plot_cross_section.py -s 0 -e 5000 -h 10  -d vs -c sfcvm -a sd -o ../result/UCVM_23820778_c.png -n ../model
 +
/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET -v 25 -b 37.78,-122.17 -u 37.80,-122.141 -A 1.0,4.0
 +
</pre>
 +
 
 +
{|
 +
| [[FILE:sfcvm-gabbro-interpolate-c2.png|thumb|400px|interpolated gabbro]]
 +
| [[FILE:sfcvm-gabbro-nearest-c2.png|thumb|400px|nearest gabbro]]
 +
|}
 +
 
 +
<pre>
 +
PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:/usr/local/share/anac
 +
onda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PYTHONPATH=../model/UCVM_TARGET/ucvm_plott
 +
ing plot_horizontal_slice.py  -d vs -c sfcvm -s 0.0001 -a sd -o ../result/$FNAME.png -n ../model/UCVM_TARGE
 +
T/conf/ucvm.conf -i ../model/UCVM_TARGET  -b 37.7784,-122.17 -u 37.7991,-122.14 -e 0 -A 1,4
 +
</pre>
 +
 
 +
{|
 +
| [[FILE:sfcvm-gabbro-interpolate-h2.png|thumb|400px|interpolated gabbro]]
 +
| [[FILE:sfcvm-gabbro-nearest-h2.png|thumb|400px|nearest gabbro]]
 +
|}
 +
 
 +
== Under the water and near the water step-down search logic ==
 +
 
 +
<pre>
 +
  zSurf from geomodelgrids_squery_queryTopoBathyElevation,
 +
 
 +
  zSquashed is new squashed elevation
 +
 
 +
  make initial geomodelgrids_squery_query call,
 +
 
 +
  do step-down search iterations
 +
      if  (query failed and zSurf < 0)
 +
      or
 +
      if  (zSquashed < zSurf || zSurf < 0) and (vp != NODATA) and (vs == NODATA)
 +
</pre>
 +
 
 +
 
 +
== Gabbro in Sierra ==
 +
 
 +
<pre>
 +
 
 +
  In regional area,
 +
    zone_ids : "GV gabbro":3
 +
 
 +
</pre>
 +
 
 +
From Brad, sfcvm's regional area
 +
{|
 +
| [[FILE:sfcvm-regional-zone.png|thumb|400px| sfcvm region zones]]
 +
|}
 +
 
 +
 
 +
{|
 +
| [[FILE:sfcvm-sierra-gabbro-region2.png|thumb|400px| Sierra region]]
 +
| [[FILE:sfcvm-sierra-no-region.png|thumb|400px| Sierra region]]
 +
|}
 +
 
 +
<pre>
 +
PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:/usr/local/share/anaconda2
 +
/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PYTHONPATH=../model/UCVM_TARGET/ucvm_plotting plot_d
 +
epth_profile.py  -n ../model/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET -d vs,vp,density -c sfcvm -o ../
 +
result/UCVM_66661243_v.png -C 'San Francisco Bay Velocity Model' -v 100 -b 0 -s 36.9082,-119.4763 -e 30000</pre>
 +
 
 +
{|
 +
| [[FILE:sfcvm-sierra-gabbro-depth.png|thumb|400px| gabbro processing depth profile]]
 +
| [[FILE:sfcvm-sierra-no-depth.png|thumb|400px| no gabbro processing depth profile]]
 +
|}
 +
 
 +
<pre>
 +
PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:/usr/local/sha
 +
re/anaconda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PYTHONPATH=../model/UCVM_TAR
 +
GET/ucvm_plotting plot_horizontal_slice.py  -d vs -c sfcvm -s 0.010 -a sd -o ../result/$FNAME.png -n
 +
../model/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET -b 36.5383,-122.234 -u 38.8162,-119.334
 +
-e 0 -A 0,4
 +
</pre>
 +
 
 +
{|
 +
| [[FILE:sfcvm-sierra-gabbro-0m.png|thumb|400px| gabbro processing 0m]]
 +
| [[FILE:sfcvm-sierra-no-0m.png|thumb|400px| no gabbro processing 0m]]
 +
|}
 +
 
 +
 
 +
{|
 +
| [[FILE:sfcvm-sierra-gabbro-1000m.png|thumb|400px| gabbro processing 1000m]]
 +
| [[FILE:sfcvm-sierra-no-1000m.png|thumb|400px| no gabbro processing 1000m]]
 +
|}
 +
 
 +
<pre>
 +
PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:/usr/local/sha
 +
re/anaconda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PYTHONPATH=../model/UCVM_TAR
 +
GET/ucvm_plotting plot_cross_section.py -s 0 -h 1186 -d vs -c sfcvm -a sd -o ../result/$FNAME.png -n
 +
../model/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET -v 50 -b 37.0837,-121.2012 -u 37.0661,-
 +
119.0698 -e 5000
 +
</pre>
 +
 
 +
{|
 +
| [[FILE:sfcvm-sierra-gabbro-slice.png|thumb|400px| gabbro processing]]
 +
| [[FILE:sfcvm-sierra-no-slice.png|thumb|400px| no gabbro processing]]
 +
|}
 +
 
 +
 
 +
And..
 +
{|
 +
| [[FILE:sfcvm-at-0m.png|thumb|400px| sfcvm at 0m]]
 +
|}
 +
 
 +
== Baseline, original CENCAL ==
 +
 
 +
{|
 +
| [[FILE:cencal-o-map.png|thumb|500px|cencal map]]
 +
| [[FILE:cencal-o.png|thumb|500px|cencal plot]]
 +
|}

Latest revision as of 17:31, 10 April 2024

UCVM with SFCVM

Software stack for supporting geomodelgrid based format:

  1. curl (curl-7.87.0)
  2. hdf5 (hdf5-1.10.9)
  3. openssl (openssl-3.0.8)
  4. proj (proj-8.1.1)
  5. sqlite (sqlite-autoconf-3400100)
  6. tiff (tiff-4.5.0)

SFCVM in UCVM

geomodelgrid based SFCVM is set with

   
    geomodelgrids_squery_setSquashing(sfcvm_geo_query_object, GEOMODELGRIDS_SQUASH_TOPOGRAPHY_BATHYMETRY);
    geomodelgrids_squery_setSquashMinElev(sfcvm_geo_query_object, SFCVM_SquashMinElev);

where SFCVM_SquashMinElev is default to -5000m (sfcvm is elevation based, depth is negative value)

NOTE: For locations that are below water, their geomodelgrids_squery_queryTopoBathyElevation() could return a NA value and so a grid height is added across the board to always have an usable value.

Plots from web viewer

sfcvm regions
sfcvm cross section
sfcvm depth 0m
sfcvm depth 100m
sfcvm depth 1000m
sfcvm depth 5000m
sfcvm depth 6000m

New command line option for model specific configuration

UCVM option:

-P Optional model configuration(model_param:key,value)


Example:

ucvm_query -l 37.455000,-121.941,3000 -m sfcvm -f ../../conf/ucvm.conf -P sfcvm_param:SquashMinElev,-5000.0


Allows multiple -P options,

ucvm_query ... -P cvmh_param:USE_1D_BKG,False -P cvmh_param:USE_GTL,False


More detailed plots from SFCVM

Internal calls from web viewer, (set e to 0,100,1000,5000,6000)

PROJ_LIB=/usr/local/share/anaconda2/share/proj PATH=/usr/local/share/anaconda2/bin:/usr/local/share/anaconda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PYTHONPATH=../model/UCVM_TARGET/ucvm_plotting plot_horizontal_slice.py  -d vs -c sfcvm -s 0.010 -a sd -o ../result/UCVM_15167424_h.png -n ../model/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET  -b 36.5416,-123.8269 -u 38.8108,-120.6299 -e 0

sfcvm depth 0m
sfcvm depth 100m
sfcvm depth 1000m
sfcvm depth 5000m
sfcvm depth 6000m

Detail plots from Cencal

cencal depth 0m
cencal depth 100m
cencal depth 1000m
cencal depth 5000m
cencal depth 6000m
cencal cross section


High Velocity surface regions in SFCVM

Horizontal region,

horizontal region
plot_horizontal_slice.py  -d vs -c sfcvm,elygtl:taper -s 0.0005 -a sd -o ../result/UCVM_18933492_h.png -n ../model/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET  -L 500,1700,1700 -z 0,700 -b 37.6021,-122.1711 -u 37.7922,-122.0021 -e 500 -A 0.0,4.0

with sfcvm (only detailed region)

at depth 0m
at depth 500m
at depth 1000m
at depth 5000m

with sfcvm,elygtl:taper (only detailed region)

at depth 0m with taper
at depth 500m with taper
at depth 1000m with taper

with sfcvm,elygtl:taper -A 0,2 (only detailed region)

at depth 0m with taper
at depth 50m with taper
at depth 100m with taper

SFCVM(detailed + regional regions) with Gabbro modification

Upper San Leandro Gabbro region Map,

regions

Rectangle horizontal box,

no Gabbro
Gabbro

Lower Cross section,

no Gabbro
Gabbro

Diagonal Cross section,

no Gabbro
Gabbro

Depth Profile at the blue marker,

no Gabbro
Gabbro


Comparing depth profile plot (red=no gabbro, blue=gabbro)

vs comparison
zoomed in vs comparison
vp comparison


with Gabbro modification (full detailed +regional regions)

at depth 0m with Gabbro
at depth 500m with Gabbro
at depth 1000m with Gabbro
at depth 5000m with Gabbro
at depth 7500m with Gabbro

Vertical Slice

vertical section

with sfcvm (detailed region)

plot_cross_section.py -s 0 -h 48 -d vs -c sfcvm,elygtl:taper -a sd -o ../result/UCVM_23820778_c.png -n ../model/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET -v 25 -L 500,1700,1700 -z 0,700 -b 37.7026,-122.1728 -u 37.701,-121.9984 -e 5000 -A 0.0,4.0
vertical slice upto 1k
vertical slice upto 50k

with sfcvm,elygtl:taper (detailed region)

vertical slice upto 1k
vertical slice upto 50k

More Study

SFCVM (detailed+regional)

sfcvm coverage


With Water-Step1-Step2 modifications

 surf = geomodelgrids_squery_queryTopoBathyElevation
 surf < 0:
    call geomodelgrids_squery_query with elevation= N
    if vs<0 || vp<0
       call geomodelgrids_squery_query with elevation= N-25 (first step down grid height)
       if vs < 0 || vp < 0
          call geomodelgrids_squery_query with elevation= N-125 (second step down grid height)
PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:
/usr/local/share/anaconda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin 
PYTHONPATH=../model/UCVM_TARGET/ucvm_plotting plot_horizontal_slice.py  -d vs -c sfcvm
 -s 0.010 -a sd -o ../result/UCVM_93552953_h.png -n ../model/UCVM_TARGET/conf/ucvm.con
f -i ../model/UCVM_TARGET  -b 34.5541,-126.9141 -u 41.4695,-117.9492 -e 0 -A 0,4
sfcvm gabbro map
sfcvm gabbro 0m

With Water-Step1-Step2-again modification

  surf = geomodelgrids_squery_queryTopoBathyElevation

  surf < 0:
     call geomodelgrids_squery_query with elevation= N
     if vs<0 || vp<0
        call geomodelgrids_squery_query with elevation= N-25 (first step down grid height)
        if vs < 0 || vp < 0
           call geomodelgrids_squery_query with elevation= N-125 (second step down grid height)

           while ( vs < 0 || vp < 0 )
             call geomodelgrids_squery_query with elevation= N-125-(25*step)
           until vs>0 && vp>0 || step > 100

sfcvm gabbro water 0m


With finer grid, grid step of 0.01

DONE:
    total query count=(622314)
    total gabbro count=(78)
    total water count=(89765)
    total water step count=(89180)
    total water loop count=(43286)
    max water loops =(57)

With different grid step processing

With grid step of 0.10

PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:
/usr/local/share/anaconda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin 
PYTHONPATH=../model/UCVM_TARGET/ucvm_plotting plot_horizontal_slice.py  -d vs -c sfcvm
 -s 0.10 -a sd -o ../result/UCVM_59976096_h.png -n ../model/UCVM_TARGET/conf/ucvm.conf
 -i ../model/UCVM_TARGET  -b 34.5541,-126.9141 -u 41.4695,-117.9492 -e 0 -A 0,4
sfcvm less detail plot 0m


Status result,

step count is the number of query that needed stepping down

max loops is the max number of looping a step-down query needed ie. there is a location that needs to go down to 125+(22*25) meters before finding a valid data


DONE:
    total query count=(6461)
    total gabbro count=(0)
    total water count=(894)
    total water step count=(890)
    total water loop count=(435)
    max water loops =(22)

With a Different step down processing

Using Squash Min Elevation of -45000.


 surf = geomodelgrids_squery_queryTopoBathyElevation
 surf < 0:
    call geomodelgrids_squery_query with elevation= N
    if vs < 0 || vp < 0
       call geomodelgrids_squery_query with elevation= N-25 (first step down grid height)
       if vs < 0 || vp < 0
          cnt=1
          while 
             call geomodelgrids_squery_query with elevation= N-(125*cnt)(second step down grid height)
             if vs > 0 && vp > 0
                 // FOUND IT... TODO: additional backtrack processing
             else
                 try again
      
sfcvm plot 0m
   

    total query count=(622314)
    total gabbro count=(82)
    total water count=(89765)
    total water step count=(89180)
    total water 2 step count=(69498)
    max water step =(10)

  
  In the 2-step while loop, number of query to number of cnt
 
  61482     done(1) 
      1     done(10) 
   7997     done(2) 
     11     done(3) 
      4     done(4) 
      1     done(5) 
      1     done(6) 
      1     done(8) 

??? 
WATER: still bad : at -124.824100 40.314100 -127.914481 -- surface -1025.307276 zsquash -1150.307276
WATER: still bad : at -124.824100 40.314100 -255.828962 -- surface -1025.307276 zsquash -1275.307276
WATER: still bad : at -124.824100 40.314100 -383.743443 -- surface -1025.307276 zsquash -1400.307276
WATER: still bad : at -124.824100 40.314100 -511.657924 -- surface -1025.307276 zsquash -1525.307276
WATER: still bad : at -124.824100 40.314100 -639.572405 -- surface -1025.307276 zsquash -1650.307276
WATER: still bad : at -124.824100 40.314100 -767.486886 -- surface -1025.307276 zsquash -1775.307276
WATER: still bad : at -124.824100 40.314100 -895.401367 -- surface -1025.307276 zsquash -1900.307276
WATER: still bad : at -124.824100 40.314100 -1023.315849 -- surface -1025.307276 zsquash -2025.307276
WATER: still bad : at -124.824100 40.314100 -1151.230330 -- surface -1025.307276 zsquash -2150.307276
    done(10) : at -124.824100 40.314100 -1279.144811 -- surface -1025.307276 zsquash -2275.307276  : previous_zsquash -2150.307276 previous_n_entry_elevation -1151.230330


For points with cnt of 3+

sfcvm lagoon with cnt >=3 0m

For point with cnt of 10

sfcvm lagoon with cnt == 10 0m

With minimum squashing elevation of 45000

double SFCVM_SquashMinElev=-45000.0

extended geomodelgrids c-api:

/** Query for model at point. 
 *
 * @param[inout] handle Handle to query object.
 * @param[in] x X coordinate of point (in input CRS).
 * @param[in] y Y coordinate of point (in input CRS).
 * @returns model index at point.
 */
int geomodelgrids_squery_queryModelContains(void* handle,
                                            const double x,
                                            const double y);


PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:/usr/local/share
/anaconda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PYTHONPATH=../model/UCVM_TARGET/
ucvm_plotting plot_horizontal_slice.py  -d vs -c sfcvm -s 0.001 -a sd -o ../result/UCVM_72526857_h.png
 -n ../model/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET  -b 37.3249,-122.6129 -u 38.2366,-121.
6187 -e 0
0 m
100m
1000m
0m elevation
100m elevation
1000m elevation

fixed geomodelgrid's handling of zone-id

fixed geomodelgrids' handling of interpolating all stored material properties including type-enumerated data like rock type.

Logic:

if data has no 'units', then use nearest data point
if data has 'units',  then interpolated with surrounding points
PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:/usr/local/share/
anaconda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PYTHONPATH=../model/UCVM_TARGET/uc
vm_plotting plot_horizontal_slice.py  -d vs -c sfcvm -s 0.010 -a sd -o ../result/$FNAME.png -n ../model
/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET  -b 34.5541,-126.9141 -u 41.4695,-117.9492 -e 0 -A 
0,4


79 interpolated gabbro points
28 nearest gabbro pointsm
interpolated gabbro
nearest gabbro
plot_cross_section.py -s 0 -e 5000 -h 10  -d vs -c sfcvm -a sd -o ../result/UCVM_23820778_c.png -n ../model
/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET -v 25 -b 37.78,-122.17 -u 37.80,-122.141 -A 1.0,4.0
interpolated gabbro
nearest gabbro
PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:/usr/local/share/anac
onda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PYTHONPATH=../model/UCVM_TARGET/ucvm_plott
ing plot_horizontal_slice.py  -d vs -c sfcvm -s 0.0001 -a sd -o ../result/$FNAME.png -n ../model/UCVM_TARGE
T/conf/ucvm.conf -i ../model/UCVM_TARGET  -b 37.7784,-122.17 -u 37.7991,-122.14 -e 0 -A 1,4
interpolated gabbro
nearest gabbro

Under the water and near the water step-down search logic

   zSurf from geomodelgrids_squery_queryTopoBathyElevation,
  
   zSquashed is new squashed elevation

   make initial geomodelgrids_squery_query call,

   do step-down search iterations 
      if  (query failed and zSurf < 0)
      or 
      if  (zSquashed < zSurf || zSurf < 0) and (vp != NODATA) and (vs == NODATA)


Gabbro in Sierra


  In regional area, 
    zone_ids : "GV gabbro":3

From Brad, sfcvm's regional area

sfcvm region zones


Sierra region
Sierra region
PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:/usr/local/share/anaconda2
/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PYTHONPATH=../model/UCVM_TARGET/ucvm_plotting plot_d
epth_profile.py  -n ../model/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET -d vs,vp,density -c sfcvm -o ../
result/UCVM_66661243_v.png -C 'San Francisco Bay Velocity Model' -v 100 -b 0 -s 36.9082,-119.4763 -e 30000
gabbro processing depth profile
no gabbro processing depth profile
PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:/usr/local/sha
re/anaconda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PYTHONPATH=../model/UCVM_TAR
GET/ucvm_plotting plot_horizontal_slice.py  -d vs -c sfcvm -s 0.010 -a sd -o ../result/$FNAME.png -n
 ../model/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET -b 36.5383,-122.234 -u 38.8162,-119.334
 -e 0 -A 0,4
gabbro processing 0m
no gabbro processing 0m


gabbro processing 1000m
no gabbro processing 1000m
PROJ_LIB=../model/UCVM_TARGET/lib/proj/share/proj PATH=/usr/local/share/anaconda2/bin:/usr/local/sha
re/anaconda2/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PYTHONPATH=../model/UCVM_TAR
GET/ucvm_plotting plot_cross_section.py -s 0 -h 1186 -d vs -c sfcvm -a sd -o ../result/$FNAME.png -n
 ../model/UCVM_TARGET/conf/ucvm.conf -i ../model/UCVM_TARGET -v 50 -b 37.0837,-121.2012 -u 37.0661,-
119.0698 -e 5000
gabbro processing
no gabbro processing


And..

sfcvm at 0m

Baseline, original CENCAL

cencal map
cencal plot