GeoTessJavaExamples  2.0
Static Public Member Functions | Static Protected Member Functions | List of all members
gov.sandia.geotess.examples.PopulateModel3D Class Reference

An example of how to generate a 3D GeoTessModel and populate it with data. More...

Static Public Member Functions

static void main (String[] args)
 An example of how to generate a 3D GeoTessModel and populate it with data. More...
 

Static Protected Member Functions

static float[] getRadii (double lat, double lon, int layer)
 Returns a 1D profile of monotonically increasing radius values that define the radial positions of nodes along a radial profile through a single layer in the model. More...
 
static float[][] getRawData (double lat, double lon, int layer)
 Retrieve a 2D array of floats with nNodes x nAttributes elements. More...
 

Detailed Description

An example of how to generate a 3D GeoTessModel and populate it with data.

The data are stored on a GeoTessGrid comprised of 3 multi-level tessellations, one for the core, one for the mantle and one for the crust. The GeoTessGrid is not generated by this example. It was previously computed using the GeoTessBuilder software and delivered as part of the GeoTess package in the GeoTessModels directory.

The data used to populate the model come from the ak135 model, which is hardcoded into the source code for the example.

Author
sballar

Definition at line 60 of file PopulateModel3D.java.

Member Function Documentation

◆ getRadii()

static float [] gov.sandia.geotess.examples.PopulateModel3D.getRadii ( double  lat,
double  lon,
int  layer 
)
staticprotected

Returns a 1D profile of monotonically increasing radius values that define the radial positions of nodes along a radial profile through a single layer in the model.

For this example, we will return the radius positions of the nodes in the AK135 model, stretched a little bit so that the top of the model will coincide with the radius of the WGS84 ellipsoid instead of the ak135 value of 6371 km.

Parameters
latthe latitude of the profile
lonthe longitude of the profile
layerthe index of the layer.
Returns
1D array of radius values, in km.

Definition at line 223 of file PopulateModel3D.java.

◆ getRawData()

static float [][] gov.sandia.geotess.examples.PopulateModel3D.getRawData ( double  lat,
double  lon,
int  layer 
)
staticprotected

Retrieve a 2D array of floats with nNodes x nAttributes elements.

The number of attributes is 3, for the vp, vs and rho. nDataArrays varies in the different layers. For core and mantle layers, nNodes will equal the number of radii in the corresponding layers of the AK135 model. For the crustal layers, nNodes will be one, reflecting the fact that the attribute values are constant in the crustal layers of the ak135 model.

In this example, the data returned are independent of latitude and longitude since ak135 is a '1D' model, but this will not generally be true for real 3D models.

Parameters
lat
lon
layer
Returns

Definition at line 261 of file PopulateModel3D.java.

◆ main()

static void gov.sandia.geotess.examples.PopulateModel3D.main ( String[]  args)
static

An example of how to generate a 3D GeoTessModel and populate it with data.

The data are stored on a GeoTessGrid comprised of 3 multi-level tessellations, one for the core, one for the mantle and one for the crust. The GeoTessGrid is not generated by this example. It was previously computed using the GeoTessBuilder software and delivered as part of the GeoTess package in the GeoTessModels directory.

The data used to populate the model come from the ak135 model, which is hardcoded into the source code for the example.

Parameters
argsthis example requires a single command line argument that specifies the full path of the grid file. The file is called small_model_grid.ascii and was delivered with the GeoTess package in the GeoTessModels directory.

Definition at line 77 of file PopulateModel3D.java.


The documentation for this class was generated from the following file: