pybacktrack.backstrip_and_write_well
- pybacktrack.backstrip_and_write_well(decompacted_output_filename, well_filename, times=None, *, lithology_filenames=[pybacktrack.DEFAULT_BUNDLE_LITHOLOGY_FILENAME], total_sediment_thickness_filename=pybacktrack.BUNDLE_TOTAL_SEDIMENT_THICKNESS_FILENAME, sea_level_model=None, base_lithology_name=pybacktrack.DEFAULT_BASE_LITHOLOGY_NAME, rotation_filenames=pybacktrack.BUNDLE_RECONSTRUCTION_ROTATION_FILENAMES, static_polygon_filename=pybacktrack.BUNDLE_RECONSTRUCTION_STATIC_POLYGON_FILENAME, anchor_plate_id=0, decompacted_columns=DEFAULT_DECOMPACTED_COLUMNS, well_location=None, well_bottom_age_column=0, well_bottom_depth_column=1, well_min_water_depth_column=2, well_max_water_depth_column=3, well_lithology_column=4, ammended_well_output_filename=None)
Same as
pybacktrack.backstrip_well()but also writes decompacted results to a text file.Also optionally write amended well data (ie, including extra stratigraphic base unit from well bottom to basement) to
ammended_well_output_filenameif specified.- Parameters:
decompacted_output_filename (string) – Name of text file to write decompacted results to.
well_filename (string) – Name of well text file.
times (list of float, optional) – A list of times to decompact sediment. If specified then a
pybacktrack.DecompactedWellis returned (and a row written to text file) for each listed time. And it’s OK to specify times that are outside the period of sediment deposition recorded in the drill site (eg, older than the drill site’s bottom age or younger than its surface age). Defaults to the ages of the top of each stratigraphic unit in the well (in which case there is a decompacted well/row for each top age).lithology_filenames (list of string, optional) – One or more text files containing lithologies.
total_sediment_thickness_filename (string, optional) – Total sediment thickness filename. Used to obtain total sediment thickness at well location.
sea_level_model (string, optional) – Used to obtain sea levels relative to present day. Can be either the name of a bundled sea level model, or a sea level filename. Bundled sea level models include
Miller2024_SealevelCurve,Haq2024_Hybrid_SealevelCurve,Haq2024_Hybrid_SealevelCurve_Longterm,Haq87_SealevelCurveandHaq87_SealevelCurve_Longterm.base_lithology_name (string, optional) – Lithology name of the stratigraphic unit at the base of the well (must be present in lithologies file). The stratigraphic units in the well might not record the full depth of sedimentation. The base unit covers the remaining depth from bottom of well to the total sediment thickness. Defaults to
Shale.rotation_filenames (list of string, optional) – List of filenames containing rotation features (to reconstruct the well location). If not specified then defaults to the built-in global rotations associated with the topological model used to generate the built-in rift start/end time grids.
static_polygon_filename (string, optional) – Filename containing static polygon features (to assign a plate ID to the well location). If not specified then defaults to the built-in static polygons associated with the topological model used to generate the built-in rift start/end time grids.
anchor_plate_id (int, optional) – The anchor plate id used when reconstructing the well location. Defaults to zero.
decompacted_columns (list of columns, optional) –
The decompacted columns (and their order) to output to
decompacted_wells_filename.Available columns are:
pybacktrack.BACKSTRIP_COLUMN_AGE
pybacktrack.BACKSTRIP_COLUMN_PALEO_LONGITUDE
pybacktrack.BACKSTRIP_COLUMN_PALEO_LATITUDE
pybacktrack.BACKSTRIP_COLUMN_COMPACTED_THICKNESS
pybacktrack.BACKSTRIP_COLUMN_COMPACTED_DEPTH
pybacktrack.BACKSTRIP_COLUMN_COMPACTED_DENSITY
pybacktrack.BACKSTRIP_COLUMN_DECOMPACTED_THICKNESS
pybacktrack.BACKSTRIP_COLUMN_DECOMPACTED_DENSITY
pybacktrack.BACKSTRIP_COLUMN_DECOMPACTED_SEDIMENT_RATE
pybacktrack.BACKSTRIP_COLUMN_DECOMPACTED_DEPTH
pybacktrack.BACKSTRIP_COLUMN_AVERAGE_TECTONIC_SUBSIDENCE
pybacktrack.BACKSTRIP_COLUMN_MIN_TECTONIC_SUBSIDENCE
pybacktrack.BACKSTRIP_COLUMN_MAX_TECTONIC_SUBSIDENCE
pybacktrack.BACKSTRIP_COLUMN_AVERAGE_WATER_DEPTH
pybacktrack.BACKSTRIP_COLUMN_MIN_WATER_DEPTH
pybacktrack.BACKSTRIP_COLUMN_MAX_WATER_DEPTH
pybacktrack.BACKSTRIP_COLUMN_SEA_LEVEL
pybacktrack.BACKSTRIP_COLUMN_COMPOSITE_POROSITY
pybacktrack.BACKSTRIP_COLUMN_COMPOSITE_DECAY
pybacktrack.BACKSTRIP_COLUMN_LITHOLOGY
well_location (tuple, optional) – Optional location of well. If not provided then is extracted from the
well_filenamefile. If specified then overrides value in well file. If specified then must be a 2-tuple (longitude, latitude) in degrees.well_bottom_age_column (int, optional) – The column of well file containing bottom age. Defaults to 0.
well_bottom_depth_column (int, optional) – The column of well file containing bottom depth. Defaults to 1.
well_min_water_depth_column (int, optional) – The column of well file containing minimum water depth. Defaults to 2.
well_max_water_depth_column (int, optional) – The column of well file containing maximum water depth. Defaults to 3.
well_lithology_column (int, optional) – The column of well file containing lithology(s). Defaults to 4.
ammended_well_output_filename (string, optional) – Amended well data filename. Useful if an extra stratigraphic base unit is added from well bottom to basement.
- Returns:
well (
pybacktrack.Well) – The well read fromwell_filename. It may also be amended with a base stratigraphic unit from the bottom of the well to basement.decompacted_wells (list of
pybacktrack.DecompactedWell) – The decompacted wells associated with the well. Iftimesis specified, then there is one decompacted well for each listed time (in the same order as the listed times). Otherwise there is one decompacted well for each stratigraphic unit (at its top age) in the same order as the units (youngest to oldest).
- Raises:
ValueError – If
well_lithology_columnis not the largest column number (must be last column).ValueError – If
well_locationis not specified and the well location was not extracted from the well file.
Notes
Each attribute to read from well file (eg, bottom_age, bottom_depth, etc) has a column index to direct which column it should be read from.
The min/max paleo water depths at each age (of decompacted wells) are added as min_water_depth and max_water_depth attributes to each decompacted well returned.
Changed in version 1.5: The following changes were made:
Added optional
timesargument to explicitly specify when to decompact sediment.Added optional
rotation_filenames,static_polygon_filenameandanchor_plate_idarguments for reconstructing the present day well location through time (as newDecompactedWell.paleo_longitudeandDecompactedWell.paleo_latitudeattributes).Added
pybacktrack.BACKSTRIP_COLUMN_PALEO_LONGITUDE,pybacktrack.BACKSTRIP_COLUMN_PALEO_LATITUDE,pybacktrack.BACKSTRIP_COLUMN_SEA_LEVEL,pybacktrack.BACKSTRIP_COLUMN_COMPACTED_DENSITY,pybacktrack.BACKSTRIP_COLUMN_COMPOSITE_POROSITYandpybacktrack.BACKSTRIP_COLUMN_COMPOSITE_DECAYto available columns fordecompacted_columns.Some arguments (after
*) are now keyword-only (ie, can no longer be specified as positional arguments).Now returns tuple (
well,decompacted_wells). Previously returned nothing.