Implementation of routines used to manipulate ADCIRC model files in C++. The code provides a C++ interface as well as a Python interface.
When the python interface is compiled, you will have an ADCIRCModules python library file, or pyadcircmodules
. For Windows, this will by pyadcircmodules.dll
, _pyadcircmodules.dylib
on Mac systems, and Linux type systems this will be _pyadcircmodules.so
. In addition to the library, you will see pyadcircmodules.py
. CMake will attempt to install these files to the appropriate directory, however, the user can change this.
import pyadcircmodules
m = pyadcircmodules.Mesh("mymesh.grd")
m.read()
With the latest versions of the library, there is now a Docker image that can be used for interested parties to sidestep the need to build. One day, there will likely be a python pip package, but for now, this is a good way to remove the entry barrier to use. The Docker image is: zcobell/adcircmodules:v0.5.0-beta.1
. It can be retrieved using:
docker pull zcobell/adcircmodules:v0.5.0-beta.1
docker run -it zcobell/adcircmodules:v0.5.0-beta.1
There is a Doxygen site available here. The documentation is not yet complete, however, it is slowly progressing. The Python interface is not explicitly documented, however, the Python interaction is generated using SWIG, so the function calls are identical.
The build system for this project is CMake
Submodules are used in this project. You should initialize the repository using:
git submodule update --init
This project is still under development.
Please appropriately cite this work in publications, reports, and other source code.
Suggested citation:
@misc{cobell2019adcircmodules,
title = {{ADCIRCM}odules: a {C}++ and {P}ython interface for manipulation of {ADCIRC} model data},
author = {Cobell, Zachary},
howpublished = {\url{https://github.com/zcobell/ADCIRCModules}},
year = {2020}
}
Library | Function | Source | Included |
---|---|---|---|
Abseil | Abseil is an open-source collection of C++ code (compliant to C++11) designed to augment the C++ standard library. | Visit Website | yes, as submodule |
Boost | Used for fast file I/O | Visit Website | yes |
cxxopts | Lightweight command line parsing for c++ | Visit Website | yes |
Date | Howard Hinnant's date library for c++ | Visit Website | yes, as submodule |
gdal | Used to read raster data to interpolate to meshes | Visit Website | no |
HDF5 | High-performance data management and storage suite | Visit Website | no |
nanoflann | Used for kd-tree searches | Visit Website | yes, as submodule |
netCDF | Used to read ADCIRC files formatted with this library | Visit Website | no |
proj | PROJ is a generic coordinate transformation software that transforms geospatial coordinates from one coordinate reference system (CRS) to another | Visit Website | yes, but can use external |
shapelib | Used to convert meshes to shapefile format | Visit Website | yes |
swig | Used to generate an interface to Python | Visit Website | no |
indicators | Use for pretty progress bars throughout the code | Visit Website | yes |