Skip to main content

Python package for working with ADCIRC input and output files.

Project description

AdcircPy

Installation notes:

Please use a virtual environment with >=Python3.6. You may use conda or the OS's Python to provide a virtual environment for the application. This is usually developed using the latest Python, but it should work with Python version >=3.6.

You may install the application though pip. This will install the latest tagged version.

pip install adcircpy

Alternatively, you many manually install the repo by cloning it and then running

pip install .

See the examples directory for usage examples.

Additional Notes:

In order to be able to generate the tidal boundary conditions for the model, the TPXO[1] file (h_tpxo9.v1.nc) needs to be available in the system. This file can be obtained by following the registration found here. Once you obtained the h_tpxo9.v1.nc file, you may execute

tpxo_install /path/to/your/h_tpxo9.v1.nc

This will stage the file in the installation directory for AdcircPy. In the future, the requirement for this proprietary file will be dropped in favor of an open source variant.

Command Line:

This program exposes a few commands available from the command line interface. You may pass the -h flag to any of this commands to explore their functionality.

  • plot_mesh
  • tidal_run
  • best_track_run
  • best_track_file
  • plot_maxele
  • plot_fort61
  • plot_fort63

Command line examples:

Hurricane Sandy (AL182012)

To create the ADCIRC input files includes both tides and storm data for Hurricane Sandy (AL182012):

best_track_run \
    /path/to/your/fort.14 \
    AL182012 \
    --fort13=/path/to/your/fort.13 \
    --crs=EPSG:4326 \
    --output-directory=/path/where/you/want/the/files \
    --constituents=all \
    --spinup-days=15.0 \
    --elev=30. \
    --mete=30. \
    --velo=30. \
    --skip-run

Note that the --crs flag is required due to the fort.14 not containing Coordinate Reference System information which is required for correct operation. EPSG:4326 means that the mesh is in WGS84 (lat/lon). Note that the backlash represents "continue on next line" for the shell. You may write the command above on a single line after excluding the backslashes.

Quick plots

These are two examples for doing quick plots with the package. These are given here as illustrative examples only. There is support for more file types than this examples, but the program does not yet support every output input/output file type. As a user, you are encouraged to explore what's available and suggest and contribute your improvements.

plot_fort61 /path/to/fort.61.nc MSL --show --coops-only
plot_mesh /path/to/fort.14 --show-elements

Contact

For questions comments and suggestions, please email me at jreniel@gmail.com

References

[1] Egbert, Gary D., and Svetlana Y. Erofeeva. "Efficient inverse modeling of barotropic ocean tides." Journal of Atmospheric and Oceanic Technology 19.2 (2002): 183-204. https://www.tpxo.net/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adcircpy-1.0.1.tar.gz (70.5 kB view details)

Uploaded Source

Built Distributions

adcircpy-1.0.1-py3.8.egg (207.0 kB view details)

Uploaded Source

adcircpy-1.0.1-py3.6.egg (204.0 kB view details)

Uploaded Source

File details

Details for the file adcircpy-1.0.1.tar.gz.

File metadata

  • Download URL: adcircpy-1.0.1.tar.gz
  • Upload date:
  • Size: 70.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for adcircpy-1.0.1.tar.gz
Algorithm Hash digest
SHA256 762a2aa829b42cbaae83cc32f520731ce301df41ef3a1700a81efd975e9bf587
MD5 4e3e6257bf2310bff0757b18074fe37b
BLAKE2b-256 2ccf0957185118f5fd93c77411f410904c4b1f2c7f379109562f68aa40fc1b86

See more details on using hashes here.

File details

Details for the file adcircpy-1.0.1-py3.8.egg.

File metadata

  • Download URL: adcircpy-1.0.1-py3.8.egg
  • Upload date:
  • Size: 207.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for adcircpy-1.0.1-py3.8.egg
Algorithm Hash digest
SHA256 276645bf73b1b7fb7d00693453ef11e78c17bbf54a184036600934b81e97cce0
MD5 e0a5dcf07e779975b680e9c0fb07383c
BLAKE2b-256 79caae2fdb7931e4f4acbd96b4bea0144afcd43a5a88e9f4fec03b35e3aa502b

See more details on using hashes here.

File details

Details for the file adcircpy-1.0.1-py3.6.egg.

File metadata

  • Download URL: adcircpy-1.0.1-py3.6.egg
  • Upload date:
  • Size: 204.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for adcircpy-1.0.1-py3.6.egg
Algorithm Hash digest
SHA256 71aa20163cab42b86ab6511ea0f428eb08b36cb2e397fdcdf7c5650244190fa4
MD5 07c2c25c1ad0f535ecc0f02ace303783
BLAKE2b-256 a3495bdabbf55c72ea4f18fdc3a858ea2a6a64d690a82f90bf65f71c71133eda

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page