# Calculating the Volume of a Stratigraphic Unit within a Polygonal Boundary

A customer recently sent this inquiry to our support staff:
Q: Can I calculate the volume of a stratigraphic unit within an outline that doesn’t match the model extents and is not square?
A: There are a couple of ways to do this.
First, create a Polygon Table in your project database (see the Misc. Project Tables in the Project Manager) that represents the outline of the area you’re interested in.  You can hand-enter the XY coordinates into the Polygon Table, paste them in, or even draw a polygon in RockPlot2D onto a map and save those coordinates to the Table.  Then, here are some options:
1. Isopach Grid Model, Automatic:  Use the Stratigraphy / Stratigraphic Thickness / 2D menu option to interpolate a thickness grid for a selected formation (it does this by gridding the formation top and base, then subtracting the base surface from the top surface). BE SURE to activate the Save Grid Model option and assign the thickness grid model a name (e.g. formation_a_thickness.grd).  Then clip this grid model using your Polygon Table (Utilities Grid / Filters / Polygon Clip), setting the filter type to Exterior with replacement=null.  (e.g. formation_a_thickness_clipped.grd). You can turn on the Create Grid Statistics Report option, and the volume of the grid will be displayed at the bottom of this report:
```Cell Area .............................. 100.0
Map Area (X*Y) ......................... 738,000.0
Grid Area (Sum(Cell Area)).............. 755,300.0
Model Volume (Sum(Cell Area*Z)) ........ 5,493,616.411554  *
Non-Zero node area ..................... 119,600.0```
2. Isopach Grid Model, Manual:  If you don’t want the program to reinterpolate the formation top/base to generate the isopach grid (e.g. you already have top and base surfaces that you’re pleased with), you can use the Utilities Grid / Math / Grid & Grid Math tool to subtract your existing base surface from the top surface, generating a thickness grid.  Then clip this model with the polygon and generate the report, as described above.
3. Solid Model:  You can create a solid block model (MOD) of your surface-based stratigraphy model by running the Stratigraphy / Model option and activating the Save Numeric Model option and entering a name (e.g. strat_solid_model.mod).
NOTE: if you don’t want to re-interpolate the stratigraphic surfaces – you want the program to build the solid using your already-interpolated grids – be sure to turn OFF the Interpolate Surfaces option.  Then RockWorks will just build a block model of your stratigraphy.
ANOTHER NOTE: How well this block model will represent your stratigraphy surfaces (and how good the volume computation will be) will depend on the vertical node spacing defined in your project dimensions.  If you have skinny units, be sure the vertical spacing of the nodes is tight enough to represent them to your satisfaction.  Generally surface-based computations will be more accurate.
Here’s a surface-based strat model (left) and a voxel representation of a solid stratigraphy model (right), for your reference:
Once you have the solid strat model generated, you can clip that solid model using a polygon which represents the outline (Utilities Solid / Filter / Polygon Clip), replacing the nodes outside the polygon with null (e.g. strat_solid_model_clipped.mod).  Then, you can use the Stratigraphy / Volumetrics Based on Solid Model option to generate a report from that clipped model.
Or you can simply view the clipped model in RockPlot3D as a voxel model, adjust the viewing filter for a specific unit, and see the volume there.