Skip to main content

AdcircPy

A Python interface for handling inputs and outputs for the ADCIRC hydrodynamic model.

Basic Installation:

You can install this software through conda or through pip.
The dependecies of Python packages installed through pip must be satisfied by the operating system (see Method 2 for details). On a normal user's computer, the recommended method of installation is through conda. Whether you are using the pip method or the conda method, it is generally good practice to always make use of a virtual environment for your project. If you are a Python newcomer, make sure to read upon Python environments and their usage as you dive more into Python development.

If you are doing development on a Windows machine it is highly recommended to use the Windows Subsystem for Linux, and run this software from a Widows-Subsystem-for-Linux shell. MingW64, Cygwin, the git-shell-for-windows, or any other off-the-shelf POSIX layer on Windows should work.

Method 1: Conda

The advantage of using conda is that it provides the necessary dependencies as precompiled binaries, therefore no local compilations are required, and cuts the installation time substantially. This is the recommended method to use.

Install Miniconda3 (recommended) or Anaconda3 on your system. Rememeber to make this installation on the POSIX layer when using Windows.

Create a new conda environment for your project, and inside the environment run:

conda update -n base -c defaults conda
conda install -c conda-forge gdal
pip install AdcircPy

Method 2: Pip-only (requires compilation of system libraries).

Pip requires that some system libraries are precompiled and installed before running pip install command. It is highly recommended that you use the system packge manager to satisfy these dependencies, or, they may be compiled from source. The .docker directory contains a full piecewise build on an Alpine distribution, which may be used for reference in case further guidance is required with respect to the full compilation procedure. Note that "dev" versions mean that the headers are required along with the compiled library. Also note that some of these libraries you may already have in your system.

Full system dependency list:

  • g++
  • gcc
  • m4
  • make
  • autoconf
  • zlib-dev
  • libc-dev
  • curl-dev
  • linux-headers
  • hdf5-dev
  • netcdf-c-dev
  • python3-dev
  • sqlite-dev
  • Proj4-dev
  • GDAL-dev
  • openblas-dev (for scipy)
  • freetype-dev (for matplotlib)
  • py3-pip

Once these dependencies have been met, you may simply do

pip install AdcircPy

NOTE: If you are developer and would like to debug the package, you may install this package on developer mode by first cloning the package, and then doing:

pip install -e .

Usage

CLI interface

After installation a few new commands are available on the command line interface.

A few of the available commands are:

  • PlotMesh
  • GenerateTidalRun
  • GenerateBestTrackFile
  • PlotMaxele
  • HighWaterMarkValidation
  • PlotTidalStationsOutput

Since this package is in development, the list above may not be up to date, therefore you may check setup.py, where the entrypoints for the present release are listed.

As an API

This package is an API to handle input and output files for the ADCIRC hydrodynamic model. You can load an Adcirc mesh and plot it by doing:

from AdcircPy import read_mesh
mesh = read_mesh('/path/to/fort.14')
# The most basic you can do with this software is create plots:
mesh.make_plot(show=True)

Example of fort.15 generation:

Tidal only run:

from AdcircPy import read_mesh
from datetime import datetime, timedelta
mesh = read_mesh('/path/to/fort.14', epsg=4326, vertical_datum='LSML')
start_date = datetime.now()
end_date = start_date + timedelta(days=5)
tidal_run = mesh.TidalRun(start_date, end_date, spinup_days=7)
tidal_run.dump()  # will write to stdout if no output path is given.

Example where global outputs are requested:

from AdcircPy import read_mesh
from AdcircPy import ElevationGlobalOutput as EGO
from datetime import datetime, timedelta
mesh = read_mesh('/path/to/fort.14')
start_date = datetime.now()
end_date = start_date + timedelta(days=5)
tidal_run = mesh.TidalRun(
            start_date, end_date,
            ElevationGlobalOutput=EGO(sampling_frequency=15))
tidal_run.dump()

* Examples will be updated as development continues. *

Please report bugs to jreniel@gmail.com

Metadata

Release files for adcircpy 0.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adcircpy 0.9.1
File Size Uploaded
AdcircPy-0.9.1.tar.gz 74.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for adcircpy 0.9.1
File Interpreter ABI Platform
AdcircPy-0.9.1-py3-none-any.whl Python 3 none any Details

Total release size: 180.4 kB

Release files / AdcircPy-0.9.1.tar.gz

Download URL AdcircPy-0.9.1.tar.gz
Size 74.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4efa7a00e3ff8e32b7f5e815d450feae44b6e38fbf7bcaf5cdfa1a1fb7a7d8e4
BLAKE2b-256 checksum
How to use checksums
7b8b7e9d1ac564ae3c7bcd899984c03dc7d7e39769a9e48086cbf36639cb561f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

Release files / AdcircPy-0.9.1-py3-none-any.whl

Download URL AdcircPy-0.9.1-py3-none-any.whl
Size 106.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b9a0804e5cf3023d094506619b6a0bfc734028d85b9c387c623661b5d381397
BLAKE2b-256 checksum
How to use checksums
9a5a047ea75aea1271b096da225fd88705b251a50399faf776c318070e03ba04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

Release history Release notifications | RSS feed

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.44

2 release files

1.0.42

2 release files

1.0.41

2 release files

1.0.39

2 release files

1.0.38

2 release files

1.0.37

2 release files

1.0.36

2 release files

1.0.34

2 release files

1.0.33

2 release files

1.0.32

2 release files

1.0.31

2 release files

1.0.25

2 release files

1.0.24

2 release files

1.0.23

2 release files

1.0.19

2 release files

1.0.18

2 release files

1.0.17

2 release files

1.0.16

2 release files

1.0.15

2 release files

1.0.14

2 release files

1.0.13

1 release file

1.0.12

1 release file

1.0.11

1 release file

1.0.10

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.5

2 release files

1.0.4

3 release files

1.0.3

1 release file

1.0.2

1 release file

1.0.1

3 release files

1.0.0

1 release file

0.9.33

3 release files

0.9.32

1 release file

0.9.31

1 release file

0.9.4

1 release file

0.9.3

2 release files

0.9.2

2 release files

This release

0.9.1 This release

2 release files

0.9.0

2 release files

0.8.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page