Reference
This section documents the Python functions and classes that make up the public interface of the pybacktrack package.
The pybacktrack package has the __version__ attribute:
import pybacktrack
pybacktrack.__version__
Backtracking
Find decompacted total sediment thickness and water depth through time.
Finds decompacted total sediment thickness and water depth for each age in a well. |
|
Write decompacted parameters as columns in a text file. |
|
Same as |
Backstripping
Find decompacted total sediment thickness and tectonic subsidence through time.
Finds decompacted total sediment thickness and tectonic subsidence for each age in well. |
|
Write decompacted parameters as columns in a text file. |
|
Same as |
Paleobathymetry
Generate paleo bathymetry grids through time.
Generates a global grid of points uniformly spaced in longitude and latitude. |
|
Reconstructs and backtracks sediment-covered crust through time to get paleo bathymetry. |
|
Grid paleo bathymetry into a NetCDF grid for each time step. |
|
Same as |
|
Merge a backtracked paleobathymetry grid with an external paleobathymetry grid and write to a merged output grid file. |
Creating lithologies
Create lithologies or read them from file(s).
Class containing lithology data. |
|
Reads a text file with each row representing lithology parameters. |
|
Reads each lithologies text file in the sequence and merges their lithologies. |
|
Looks up a lithology using a name. |
|
Creates a combined lithology (if necessary) from multiple weighted lithologies. |
Reading and writing well files
Read/write well site files.
Reads a text file with each row representing a stratigraphic unit. |
|
Writes a text file with each row representing a stratigraphic unit. |
|
Writes well metadata to file object |
Compacted well
Query a well and its stratigraphic layers.
Class containing all the stratigraphic units in a well sorted by age (from youngest to oldest). |
|
Class to hold data for a stratigraphic unit. |
Decompacted well
Query decompacted sections at past times.
Class containing the decompacted well data at a specific age. |
|
Class to hold data for a decompacted stratigraphic unit (decompacted at a specific age). |
Converting oceanic age to depth
Convert ocean basin ages (Ma) to basement depth (metres) using different age/depth models.
Convert ocean basin age to basement depth using a specified age/depth model. |
|
Converts age to depth by reading age rows from input file and writing rows containing both age and depth to output file. |
Continental rifting
Continental passive margin initial rifting subsidence and subsequent thermal subsidence. Rifting is assumed instantaneous in that thermal contraction only happens after rifting has ended.
Estimate the stretching factor (beta). |
|
Total subsidence as syn-rift plus post-rift. |
|
Initial subsidence (in metres) due to continental stretching. |
|
Thermal subsidence (in metres) as a function of time. |
Dynamic topography
Sample time-dependent dynamic topography in the mantle reference frame.
Class that reconstructs point location(s) and samples (and interpolates) time-dependent dynamic topography mantle frame grid files. |
|
Class that just samples and interpolates time-dependent dynamic topography mantle frame grid files. |
Average sea level variations
Read a sea level file and compute average sea level variations during time periods.
Class to calculate integrated sea levels (relative to present day) over a time period. |
Converting stratigraphic depth to age
Convert stratigraphic depths (metres) to age (Ma) using an depth-to-age model.
Convert stratigraphic depth to age using a specified depth-to-age model. |
|
Converts stratigraphic depth to age by reading depth rows (in first column) from input file and writing rows containing both age and depth to output file. |
Utilities
Interpolate a sequence of linear segments read from a 2-column file at the values read from a 1-column file.
Read x and y columns from a curve file and return a function y(x) that linearly interpolates. |
|
Interpolate curve_function at x positions, read from input file, and store both x and interpolated y values to output file. |
Constants
This section covers the various pre-defined constants that can be passed to the above functions and classes.
Bundle data
The following bundled data comes included with the pybacktrack package:
a lithologies text file
an age grid
a sediment thickness grid
a crustal thickness grid
a topography grid
a collection of common dynamic topography models
a couple of sea level curves
The following attributes are available to access the bundled data:
pybacktrack.BUNDLE_PATHBase directory of the bundled data.
This is an absolute path so that scripts outside the
pybacktrackpackage can also reference the bundled data. All bundle data paths are derived from this base path.pybacktrack.BUNDLE_LITHOLOGY_FILENAMESA list of bundled lithology filenames.
pybacktrack.DEFAULT_BUNDLE_LITHOLOGY_FILENAMESame as
pybacktrack.PRIMARY_BUNDLE_LITHOLOGY_FILENAME.pybacktrack.PRIMARY_BUNDLE_LITHOLOGY_FILENAMEThe primary lithology filename contains the lithologies covered in Table 1 in the pyBacktrack paper:
Müller, R. D., Cannon, J., Williams, S. and Dutkiewicz, A., 2018, PyBacktrack 1.0: A Tool for Reconstructing Paleobathymetry on Oceanic and Continental Crust, Geochemistry, Geophysics, Geosystems, 19, 1898-1909, doi: 10.1029/2017GC007313.
pybacktrack.EXTENDED_BUNDLE_LITHOLOGY_FILENAMEThe optional extended lithology filename extends the primary lithologies, and mostly contains lithologies in shallow water.
pybacktrack.BUNDLE_AGE_GRID_FILENAMEBundled age grid file.
pybacktrack.BUNDLE_TOPOGRAPHY_FILENAMEBundled topography/bathymetry grid file.
pybacktrack.BUNDLE_TOTAL_SEDIMENT_THICKNESS_FILENAMEBundled total sediment thickness grid file.
pybacktrack.BUNDLE_CRUSTAL_THICKNESS_FILENAMEBundled crustal thickness grid file.
pybacktrack.BUNDLE_DYNAMIC_TOPOGRAPHY_MODELSBundled dynamic topography models.
This is a dict mapping dynamic topography model name to model information 3-tuple of (grid list filenames, static polygon filename and rotation filenames). Each key or value in the dict can be passed to the
dynamic_topography_modelargument ofpybacktrack.backtrack_well()andpybacktrack.backtrack_and_write_well().pybacktrack.BUNDLE_DYNAMIC_TOPOGRAPHY_MODEL_NAMESA list of bundled dynamic topography model names (keys in BUNDLE_DYNAMIC_TOPOGRAPHY_MODELS).
Choices include
terra,M1,M2,M3,M4,M5,M6,M7,ngrand,s20rts,smean,AY18,KM16,D10_gmcm9andgld428.pybacktrack.BUNDLE_SEA_LEVEL_MODELSBundled sea level models.
This is a dict mapping sea level model name to sea level file. Each key or value in the dict can be passed to the
sea_level_modelargument ofpybacktrack.backtrack_well()andpybacktrack.backtrack_and_write_well().pybacktrack.BUNDLE_SEA_LEVEL_MODEL_NAMESA list of bundled sea level model names (keys in BUNDLE_SEA_LEVEL_MODELS).
Choices include
Miller2024_SealevelCurve,Haq2024_Hybrid_SealevelCurve,Haq2024_Hybrid_SealevelCurve_Longterm,Haq87_SealevelCurveandHaq87_SealevelCurve_Longterm.pybacktrack.BUNDLE_RECONSTRUCTION_ROTATION_FILENAMESRotation files of the Zahirovic 2022 default reconstruction model used to reconstruct sediment-deposited crust (at drill sites and for paleobathymetry gridding).
pybacktrack.BUNDLE_RECONSTRUCTION_STATIC_POLYGON_FILENAMEStatic polygon file of the Zahirovic 2022 default reconstruction model used to assign plate IDs to points on sediment-deposited crust (at drill sites and for paleobathymetry gridding).
Backtracking
pybacktrack.BACKTRACK_DEFAULT_DECOMPACTED_COLUMNSDefault list of decompacted columns used for
decompacted_columnsargument ofpybacktrack.backtrack_well()andpybacktrack.backtrack_and_write_well().
List of column types available for the decompacted_columns argument of
pybacktrack.backtrack_well() and pybacktrack.backtrack_and_write_well():
pybacktrack.BACKTRACK_COLUMN_AGEpybacktrack.BACKTRACK_COLUMN_PALEO_LONGITUDEpybacktrack.BACKTRACK_COLUMN_PALEO_LATITUDEpybacktrack.BACKTRACK_COLUMN_COMPACTED_THICKNESSpybacktrack.BACKTRACK_COLUMN_COMPACTED_DEPTHpybacktrack.BACKTRACK_COLUMN_COMPACTED_DENSITYpybacktrack.BACKTRACK_COLUMN_DECOMPACTED_THICKNESSpybacktrack.BACKTRACK_COLUMN_DECOMPACTED_DENSITYpybacktrack.BACKTRACK_COLUMN_DECOMPACTED_SEDIMENT_RATEpybacktrack.BACKTRACK_COLUMN_DECOMPACTED_DEPTHpybacktrack.BACKTRACK_COLUMN_DYNAMIC_TOPOGRAPHYpybacktrack.BACKTRACK_COLUMN_TECTONIC_SUBSIDENCEpybacktrack.BACKTRACK_COLUMN_WATER_DEPTHpybacktrack.BACKTRACK_COLUMN_SEA_LEVELpybacktrack.BACKTRACK_COLUMN_COMPOSITE_POROSITYpybacktrack.BACKTRACK_COLUMN_COMPOSITE_DECAYpybacktrack.BACKTRACK_COLUMN_LITHOLOGY
Backstripping
pybacktrack.BACKSTRIP_DEFAULT_DECOMPACTED_COLUMNSDefault list of decompacted columns used for
decompacted_columnsargument ofpybacktrack.backstrip_well()andpybacktrack.backstrip_and_write_well().
List of column types available for the decompacted_columns argument of
pybacktrack.backstrip_well() and pybacktrack.backstrip_and_write_well():
pybacktrack.BACKSTRIP_COLUMN_AGEpybacktrack.BACKSTRIP_COLUMN_PALEO_LONGITUDEpybacktrack.BACKSTRIP_COLUMN_PALEO_LATITUDEpybacktrack.BACKSTRIP_COLUMN_COMPACTED_THICKNESSpybacktrack.BACKSTRIP_COLUMN_COMPACTED_DEPTHpybacktrack.BACKSTRIP_COLUMN_COMPACTED_DENSITYpybacktrack.BACKSTRIP_COLUMN_DECOMPACTED_THICKNESSpybacktrack.BACKSTRIP_COLUMN_DECOMPACTED_DENSITYpybacktrack.BACKSTRIP_COLUMN_DECOMPACTED_SEDIMENT_RATEpybacktrack.BACKSTRIP_COLUMN_DECOMPACTED_DEPTHpybacktrack.BACKSTRIP_COLUMN_AVERAGE_TECTONIC_SUBSIDENCEpybacktrack.BACKSTRIP_COLUMN_MIN_TECTONIC_SUBSIDENCEpybacktrack.BACKSTRIP_COLUMN_MAX_TECTONIC_SUBSIDENCEpybacktrack.BACKSTRIP_COLUMN_AVERAGE_WATER_DEPTHpybacktrack.BACKSTRIP_COLUMN_MIN_WATER_DEPTHpybacktrack.BACKSTRIP_COLUMN_MAX_WATER_DEPTHpybacktrack.BACKSTRIP_COLUMN_SEA_LEVELpybacktrack.BACKSTRIP_COLUMN_COMPOSITE_POROSITYpybacktrack.BACKSTRIP_COLUMN_COMPOSITE_DECAYpybacktrack.BACKSTRIP_COLUMN_LITHOLOGY
Paleobathymetry
pybacktrack.DEFAULT_PALEO_BATHYMETRY_LITHOLOGY_NAMEDefault name of the lithology of all sediment (for paleo bathymetry gridding the total sediment thickness at all sediment locations consists of a single lithology). This lithology is the average of the ocean floor sediment. This differs from the base lithology of drill sites where the undrilled portions are usually below the Carbonate Compensation Depth (CCD) where shale dominates.
Lithology
pybacktrack.DEFAULT_BASE_LITHOLOGY_NAMEDefault name of the lithology of the stratigraphic unit at the base of a drill site (the undrilled portion). This lithology is shale since the undrilled portions are usually below the Carbonate Compensation Depth (CCD) where shale dominates.
Oceanic subsidence
pybacktrack.AGE_TO_DEPTH_MODEL_RHCW18Richards et al. (2020) Structure and dynamics of the oceanic lithosphere-asthenosphere system.
The parameters of the preferred RHCW18 Plate Model used in pyBacktrack include a potential mantle temperature of 1333 in °C, a plate thickness of 130 km and a zero-age ridge depth of 2500 m, as described in Richards et al. (2020) (updated from Richards et al. (2018) and on the related github repository).
pybacktrack.AGE_TO_DEPTH_MODEL_CROSBY_2007Crosby, A.G., (2007)
Aspects of the relationship between topography and gravity on the Earth and Moon, PhD thesis.The Python source code that implements this age-depth relationship can be found here. And note that additional background information on this model can be found in: Crosby, A.G. and McKenzie, D., 2009. An analysis of young ocean depth, gravity and global residual topography.
pybacktrack.AGE_TO_DEPTH_MODEL_GDH1Stein and Stein (1992) Model for the global variation in oceanic depth and heat flow with lithospheric age.
pybacktrack.AGE_TO_DEPTH_DEFAULT_MODELThe age-to-depth model to use by default.