ut-beg-texnet/NonLinLoc

Question: Vel2Grid to generate 3D model

Opened this issue · 6 comments

Dear Anthony,

I am trying to use Vel2Grid and the commands VERTEX, EDGE and POLYGON2 to generate a 3D grid model. If I understand correctly from the documentation, it is possible to produce a 2D velocity model which will then be transformed to a 3D model with 2DTO3DTRANS (I suspect this will be an extrapolation of the 2D model to the 3rd dimension).

My question is, is it possible to manually produce a 3D model with VERTEX, EDGE and POLYGON2 and not simply a "2.5D" model?

Best regards,
C.

EDIT: In the California Bay example I see additionally the options POLYGON3 and SOLID, which were used to create a model with more complex geometry. Are they still available in the latest version of NonLinLoc and only not documented or are they not available anymore?

Hello Cthuulhaa,

Correct, 2DTO3DTRANS only extrudes the 2D model horizontally, with a specified azimuth.

The 2D or 3D polygon construction for Vel2Gird is very difficult to use.
To construct 3D polygons you can use the POLYGON3 and SOLID commands.
Here : sfbay3Dmodel.include.txt are the commands to make a 3D model of the San Francisco Bay Area, from
Lomax, A., & Bolt, B. A. (1992). Broadband waveform modelling of anomalous strong ground motion in the 1989 Loma Prieta Earthquake using three-dimensional geologic structures. Geophysical Research Letters, 19(19), 1963–1966.
And yes, these commands should still work, though I have not tested them in a few years...

Assuming you have polygonal zones in map view (different tectonic regions, etc) each containing a horizontally layered model :

You can define 2 or more POLYGON3 for each zone in map view (one at the top and one at the bottom of the model, and one for each interface between constant gradient velocity layers; so you have a POLYGON3 to define the top and bottom of each layer).

Then define all needed vertical POLYGON3 to form the vertical boundaries around each layer.

Then construct a SOLID for each layer in each zone, the gradient velocity model is defined in the SOLID specification:
# 3-D solid
# (SOLID id_num,n_poly,ref,Vp_ref,Vp_grad,Vs_ref,Vs_grad,p_ref,p_grad
# [newline] poly 1, poly 2, ...)

POLYGON3's can be re-used if they are identical for defining a SOLID (e.g. two SOLID's share an identical POLYGON3 side).
You have to, of course, define all the VERTEX's and EDGE's needed for the POLYGON3's.

Note that you also define a background VGLAYER model which will be used where there are no SOLID's defined - use this for some large zone in your model.

Grid2GMT (also confusing to use!) is helpful to see what the model looks like. For this, you need all the required Generic NLL control file statements.

An alternative is that you use your own code or scripts or GIS software to create the model into the format used by NLL-Grid2Time (in fact, this is the format used by the previously existing Podvin-Lecomte FD travel-time program).
The NLL grid format is explained at http://alomax.free.fr/nlloc/soft7.00/formats.html#grid

Also see: https://github.com/alomax/NonLinLoc/blob/dev/doc/Gempa_ALomax__Use_of_3D_models_within_NLL_05.pdf

I hope this helps some...

Best regards,
Anthony

Dear @Cthuulhaa,

As an alternative, you might consider building the 3D model with your preferred tool and using the NLLGrid python library to convert it to a NonLinLoc SLOW_LEN grid.

Claudio

Thanks Anthony and Claudio for responding so quickly!

In my case it is not a complex geometry: I took a 3x3 slice of the 3D CRUST1 model (that is, 9 1D velocity profiles), so in principle it would not be difficult to do it with edges and polygons, although it could take a while in comparison to using the NLLGrid class. Thanks for the tip, Claudio!

@alomax : what is the difference between POLYGON2 and POLYGON3? And what is the ref parameter in the SOLID syntax?

@claudiodsf : I assume that the grid step when transforming velocities to SLOW_LEN is the same as the value stored in grd.dx? And must the velocities array in grd.array have a particular structure/shape?

Cheers!
C.

@alomax : what is the difference between POLYGON2 and POLYGON3? And what is the ref parameter in the SOLID syntax?

POLYGON2 is a 2D, x,y description of a polygon for working in 2D.
POLYGON3 is a 3D, x,y,z description for working in 3D space.

The ref parameter in the SOLID syntax is the reference depth for defining a (vertical) gradient velocity model.

Anthony

@claudiodsf : I assume that the grid step when transforming velocities to SLOW_LEN is the same as the value stored in grd.dx?

Yes, and, to my knowledge, dx, dy and dz must be the same.

And must the velocities array in grd.array have a particular structure/shape?

The shape is (nx, ny, nz)

I took a 3x3 slice of the 3D CRUST1 model (that is, 9 1D velocity profiles)

Oh, I gave as an exercise in my Python class to write a Python class (pun intended) to read the CRUST1 model.
In case you're interested, the exercise, with solution, is here: https://pyclass.surge.sh/task05/index.html