compaction


Namecompaction JSON
Version 0.2.3 PyPI version JSON
download
home_page
SummaryCompact a column of sediment following Bahr et al., 2001.
upload_time2023-11-22 05:56:35
maintainerEric Hutton
docs_urlNone
authorEric Hutton
requires_python>=3.10
licenseMIT
keywords earth science landlab numerical modeling sediment compaction
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            [![Test][test_badge]][test_workflow]


# compaction: Compact layers of sediment

Compact a column of sediment following Bahr et al., 2001.

Cite as,

```bibtex
@article{bahr2001exponential,
    title={Exponential approximations to compacted sediment porosity profiles},
    author={Bahr, David B and Hutton, Eric WH and Syvitski, James PM and Pratson, Lincoln F},
    journal={Computers \& Geosciences},
    volume={27},
    number={6},
    pages={691--700},
    year={2001},
    publisher={Pergamon}
}
```

## Requirements

*Compaction* requires Python 3.

Apart from Python, *Compaction* has a number of other requirements, all of which
can be obtained through either *pip* or *conda*, that will be automatically
installed when you install *Compaction*.

To see a full listing of the requirements, have a look at the project's
*requirements.txt* file.

If you are a developer of *Compaction* you will also want to install
additional dependencies for running *Compaction*'s tests to make sure
that things are working as they should. These dependencies are listed
in *requirements-testing.txt*.

## Installation

To install *Compaction*, first create a new environment in
which *Compaction* will be installed. This, although not necessary, will
isolate the installation so that there won't be conflicts with your
base *Python* installation. This can be done with *conda* as:

```bash
conda create -n compaction python=3
conda activate compaction
```

## Stable Release

*Compaction*, and its dependencies, can be installed either with *pip*
or *conda*. Using *pip*:

```bash
pip install compaction
```

Using *conda*:

```bash
conda install compaction -c conda-forge
```

### From Source

After downloading the *Compaction* source code, run the following from
*Compaction*'s top-level folder (the one that contains *setup.py*) to
install *Compaction* into the current environment:

```bash
pip install -e .
```

## Input Files

### Configuration File

The main *Compaction* input file is a yaml-formatted text file that lists
constants used by *Compaction*. Running the following will print a sample
*Compaction* configuration file:

```
compact show config
```

```yaml
c: 5.0e-08
porosity_max: 0.5
porosity_min: 0.0
rho_grain: 2650.0
rho_void: 1000.0
```

### Porosity File

The *Compaction* porosity file defines initial porosity of each of the
sediment layers to be compacted as a two-column CSV file. The first
column is layer thickness (in meters) and the second the porosity of
the sediment in that layer. A sample porosity file can be obtained with:

```bash
compact show porosity
```

```
# Layer Thickness [m], Porosity [-]
100.0,0.5
100.0,0.5
100.0,0.5
```

## Output File

The output file of *Compaction* is a porosity file of the same form as
the input porosity file - a CSV file of layer thickness and porosity.

## Examples

To run a simulation using the sample input files described above, you first
need to create a set of sample files:

```
sequence setup example
```

```
example/sequence.yaml
```

You can now run the simulation:

```bash
sequence run example/sequence.yaml
```

```
# Layer Thickness [m], Porosity [-]
100.0,0.5
96.18666488709239,0.4801774231522433
92.78860257194452,0.4611407154102571
```

[test_badge]: https://github.com/mcflugen/compaction/actions/workflows/test.yml/badge.svg
[test_workflow]: https://github.com/mcflugen/compaction/actions/workflows/test.yml

# Credits

## Development Lead

* [Eric Hutton](https://github.com/mcflugen)

# Contributors

None yet. Why not be the first?

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "compaction",
    "maintainer": "Eric Hutton",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "mcflugen@gmail.com",
    "keywords": "earth science,landlab,numerical modeling,sediment compaction",
    "author": "Eric Hutton",
    "author_email": "mcflugen@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/25/c1/2af0bba45cf6396f4024b70688114c16d35af39564f4f6f0c0cc876ecf63/compaction-0.2.3.tar.gz",
    "platform": null,
    "description": "[![Test][test_badge]][test_workflow]\n\n\n# compaction: Compact layers of sediment\n\nCompact a column of sediment following Bahr et al., 2001.\n\nCite as,\n\n```bibtex\n@article{bahr2001exponential,\n    title={Exponential approximations to compacted sediment porosity profiles},\n    author={Bahr, David B and Hutton, Eric WH and Syvitski, James PM and Pratson, Lincoln F},\n    journal={Computers \\& Geosciences},\n    volume={27},\n    number={6},\n    pages={691--700},\n    year={2001},\n    publisher={Pergamon}\n}\n```\n\n## Requirements\n\n*Compaction* requires Python 3.\n\nApart from Python, *Compaction* has a number of other requirements, all of which\ncan be obtained through either *pip* or *conda*, that will be automatically\ninstalled when you install *Compaction*.\n\nTo see a full listing of the requirements, have a look at the project's\n*requirements.txt* file.\n\nIf you are a developer of *Compaction* you will also want to install\nadditional dependencies for running *Compaction*'s tests to make sure\nthat things are working as they should. These dependencies are listed\nin *requirements-testing.txt*.\n\n## Installation\n\nTo install *Compaction*, first create a new environment in\nwhich *Compaction* will be installed. This, although not necessary, will\nisolate the installation so that there won't be conflicts with your\nbase *Python* installation. This can be done with *conda* as:\n\n```bash\nconda create -n compaction python=3\nconda activate compaction\n```\n\n## Stable Release\n\n*Compaction*, and its dependencies, can be installed either with *pip*\nor *conda*. Using *pip*:\n\n```bash\npip install compaction\n```\n\nUsing *conda*:\n\n```bash\nconda install compaction -c conda-forge\n```\n\n### From Source\n\nAfter downloading the *Compaction* source code, run the following from\n*Compaction*'s top-level folder (the one that contains *setup.py*) to\ninstall *Compaction* into the current environment:\n\n```bash\npip install -e .\n```\n\n## Input Files\n\n### Configuration File\n\nThe main *Compaction* input file is a yaml-formatted text file that lists\nconstants used by *Compaction*. Running the following will print a sample\n*Compaction* configuration file:\n\n```\ncompact show config\n```\n\n```yaml\nc: 5.0e-08\nporosity_max: 0.5\nporosity_min: 0.0\nrho_grain: 2650.0\nrho_void: 1000.0\n```\n\n### Porosity File\n\nThe *Compaction* porosity file defines initial porosity of each of the\nsediment layers to be compacted as a two-column CSV file. The first\ncolumn is layer thickness (in meters) and the second the porosity of\nthe sediment in that layer. A sample porosity file can be obtained with:\n\n```bash\ncompact show porosity\n```\n\n```\n# Layer Thickness [m], Porosity [-]\n100.0,0.5\n100.0,0.5\n100.0,0.5\n```\n\n## Output File\n\nThe output file of *Compaction* is a porosity file of the same form as\nthe input porosity file - a CSV file of layer thickness and porosity.\n\n## Examples\n\nTo run a simulation using the sample input files described above, you first\nneed to create a set of sample files:\n\n```\nsequence setup example\n```\n\n```\nexample/sequence.yaml\n```\n\nYou can now run the simulation:\n\n```bash\nsequence run example/sequence.yaml\n```\n\n```\n# Layer Thickness [m], Porosity [-]\n100.0,0.5\n96.18666488709239,0.4801774231522433\n92.78860257194452,0.4611407154102571\n```\n\n[test_badge]: https://github.com/mcflugen/compaction/actions/workflows/test.yml/badge.svg\n[test_workflow]: https://github.com/mcflugen/compaction/actions/workflows/test.yml\n\n# Credits\n\n## Development Lead\n\n* [Eric Hutton](https://github.com/mcflugen)\n\n# Contributors\n\nNone yet. Why not be the first?\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Compact a column of sediment following Bahr et al., 2001.",
    "version": "0.2.3",
    "project_urls": {
        "changelog": "https://github.com/mcflugen/compaction/blob/master/NEWS.md",
        "documentation": "https://compaction.readthedocs.io",
        "homepage": "https://github.com/mcflugen/compaction",
        "repository": "https://github.com/mcflugen/compaction"
    },
    "split_keywords": [
        "earth science",
        "landlab",
        "numerical modeling",
        "sediment compaction"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "25c12af0bba45cf6396f4024b70688114c16d35af39564f4f6f0c0cc876ecf63",
                "md5": "6b47dd58eb9bfc8f217fb5de80fbc878",
                "sha256": "10f60279bb7980b6ee07dcfb499c2b00ae0b1837d2b02f685e471619fd077051"
            },
            "downloads": -1,
            "filename": "compaction-0.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "6b47dd58eb9bfc8f217fb5de80fbc878",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 15003,
            "upload_time": "2023-11-22T05:56:35",
            "upload_time_iso_8601": "2023-11-22T05:56:35.648554Z",
            "url": "https://files.pythonhosted.org/packages/25/c1/2af0bba45cf6396f4024b70688114c16d35af39564f4f6f0c0cc876ecf63/compaction-0.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-22 05:56:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mcflugen",
    "github_project": "compaction",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "compaction"
}
        
Elapsed time: 0.16507s