Sponsor:

Advanced Scientific Computing Research (ASCR) under the U.S. Department of Energy Office of Science (Office of Science)

Project Team Members:

Northwestern University

The HDF Group

Argonne National Laboratory

North Carolina State University






Northwestern University - EECS Dept.



Damsel API Usecase - GCRM write

GCRM geodesic grid as shown below can be described in two ways using DAMSEL API.

Approach 1

The base entity is a vertex, and 6 vertices are used to create a polygon(hexagon) using DMSLentity_define. For the hexagons at interfaces, we also create edges using DMSLentity_define because some solution variables are stored on the edges of hexagons at the interface. For the hexagons at layers, we just use vertices. If a solution variable is stored as "cell-centered", it will defined as a tag on the hexagon entity. If a solution variable is edge-centered, it will be defined as a tag on edge entity, and corner-variables as a tag on vertex entity.

We create two containers; layers and interfaces. The only distinction between the two is that we define explicit edges for the vertices of hexagons in interface.

In the code example we considered the 9 polygons as shown in the Figure above, with 6 polygons on the interfaces and 3 on the layers. We create 13*3 vertices, first 13 vertices are used to create 3 polygons (interface) and 13 edges, and then next vertices are used to create 3 polygon at layer. Then last 13 vertices are used to create 3 poylgons and 13 edges. Each polygon at interface will be tagged with cell-centered variable Each vertex at layer will be tagged with corner variables Each edge at an interface will be tagged with edge-centered variable.

The flow of DAMSEL API calls to describe the above mentioned description is as follows:

The result in the h5 file after looks like

GROUP "/" {

DATASET "cell_centered_variables-100001398" {

DATATYPE H5T_STD_I16LE DATASPACE SIMPLE { ( 6 ) / ( 6 ) } DATA { (0): 500, 501, 502, 503, 504, 505 }

} DATASET "corner_variables-1000013dc" {

DATATYPE H5T_STD_I16LE DATASPACE SIMPLE { ( 26 ) / ( 26 ) } DATA { (0): 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, (13): 0, 0, 0, 0, -21504, 0, 0, 2384, 16544, 0, 0, 500, 501 }

}

.....

DATASET "edge_centered_variables-1000013c1" {

DATATYPE H5T_STD_I16LE DATASPACE SIMPLE { ( 26 ) / ( 26 ) } DATA { (0): 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, (13): 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825 }

}

} }

The code for this test case is in test-gcrm-write.c

Approach 2

This is another option of writing gcrm data in DAMSEL. We define cells, corners and edges (as shown in the figure) as Vertex entities in DAMSEL and treat the geodesic grid as an unstructured grid. In GCRM, there are two types of variables - grid and non-grid (named field variables). We need to tag each vertex entity with corresponding grid/non-grid variables. There are three containers/collections for 1) cells at layers, 2) corners at layers, and 3) edges at interfaces and we represent each as a sequence of vertex handles.

The result in the h5 file after looks like

GROUP "/" {

DATASET "cell_lat-100002b02" {

DATATYPE H5T_IEEE_F32LE DATASPACE SIMPLE { ( 1000 ) / ( 1000 ) } DATA { .....

DATASET "cell_pressure-100002b02" {

DATATYPE H5T_ARRAY { [ 6 ] H5T_IEEE_F32LE } DATASPACE SIMPLE { ( 1000 ) / ( 1000 ) } DATA { ....

DATASET "corner_lat-100002719" {

DATATYPE H5T_IEEE_F32LE DATASPACE SIMPLE { ( 2000 ) / ( 2000 ) } DATA { ....

DATASET "edge_lat-100001f48" { DATATYPE H5T_IEEE_F32LE DATASPACE SIMPLE { ( 3000 ) / ( 3000 ) } DATA { .... }

The code for this test case is in test-gcrm-write-1.c

Northwestern University EECS Home | McCormick Home | Northwestern Home | Calendar: Plan-It Purple
© 2011 Robert R. McCormick School of Engineering and Applied Science, Northwestern University
"Tech": 2145 Sheridan Rd, Tech L359, Evanston IL 60208-3118  |  Phone: (847) 491-5410  |  Fax: (847) 491-4455
"Ford": 2133 Sheridan Rd, Ford Building, Rm 3-320, Evanston, IL 60208  |  Fax: (847) 491-5258
Email Director

Last Updated: $LastChangedDate: 2016-11-06 13:53:06 -0600 (Sun, 06 Nov 2016) $