Category Archives: SWAN
Conference: ADCIRC 2017
Conference: NCBIWA 2016
How to Run Kalpana
Kalpana converts ADCIRC output files in netCDF format to Google Earth (kmz) or GIS shapefiles for use with conventional GIS software. The latest version of the code is maintained at our GitHub repository: https://github.com/ccht-ncsu/Kalpana.
Command line arguments control the way it produces output, including the number of contour levels, their values, and the color scale. When these specifications are absent from the command line, it uses reasonable default settings so in many cases only a few of the available command line options will be used for any particular plot.

Visualization of Maximum Water Levels along the North Carolina coast during Hurricane Arthur (2014) using polygon shapefiles created by Kalpana with ArcGIS satellite imagery.
Recent Improvements to Kalpana
In the process of working on Kalpana, one of the deliverables was to clean the code, where possible. The following improvements were made as part of this deliverable.
Notes on the Development of Kalpana
This document describes the methodology followed in kalpana.py
for the creation of shape file and kml files. The sequence of steps involved has been grouped under related sub-headings for better comprehension. The terms in fixed width font refer to variable names in the code.
Installing Python Modules for Kalpana
The actual script kalapana.py
does not require installation, it is merely executed. However, it relies on several Python modules that most users (or their IT supporters) will need to install before working with Kalpana. These modules are:
matplotlib
– main python module used for data visualization.pylab
– Imports plotting and numerics libraries in a single name space.shapely
– used to construct geometric objects like Points, Polygons and LineStrings.fiona
– for writing .shp files.netCDF4
– reading and writing netCDF files.datetime
– dates and time calculation, manipulation, and formatting.time
– contains time related functions for measuring the performance of the code itself.numpy
– to facilitate scientific computing; used primarily in Kalpana for working with n-dimensionalnumpy
arrays, which are ideal for storing large amounts of data.collections
– accessing OrderedDict, which is a dictionary subclass that remembers the order in which entries were added, whereas an ordinary dictionary does not do so).simplekml
– writing kml (Google Earth) files.
In the process of installing Python modules on a desktop platform, as well as an HPC platform, I’ve found that the process can be very challenging. The biggest issue is conflicting module version dependencies, which can be handled by the use of virtual execution environments for Python (explained below).
More Example Input Files for SWAN+ADCIRC
Updated 2016/09/18: Adding example files for use with older versions of SWAN.
Many new users of SWAN+ADCIRC, after reading the instructions on how to compile and run the coupled models, have asked for example input files to test their implementation. While we have posted an example application of Hurricane Gustav (2008), that example will require a small parallel cluster to run efficiently. There is a need for a smaller example that can be run in serial.
This example is much smaller, and it includes coverage of the Albemarle-Pamlico Estuarine System (APES) along the North Carolina coastline. The mesh has only 1,069 vertices, and thus it can be run in serial in less than 10 min. The example is a hindcast of Hurricane Irene (2011), which moved over this system and caused waves and surge inside the shallow sounds and estuaries.
The entire set of example input files is: Irene-APES-v41.31.zip
- For versions before SWAN 41.31 and ADCIRC 55.00, please use: Irene-APES-v41.10.zip.
- For versions before SWAN 41.10 and ADCIRC 53.00, please use: Irene-APES-Old.zip.
The individual files are described below. They have been modified to be compatible with the latest versions of the codes, and to reflect our latest settings for SWAN and ADCIRC. These files are extremely coarse, both in the mesh resolution and the wind field, but they are a good starting point for new users of the coupled models.

Contours and vectors of wind velocities (m/s) during Hurricane Irene (2011) in the Albemarle-Pamlico Estuarine System.