Installing Python Modules for Kalpana

This post was contributed by CCHT collaborator Jason Fleming. This is a LONG post, but as he notes, it is a stream of consciousness about how he compiled the modules needed by Kalpana. Hopefully his experience will be helpful to new users. After the modules have been compiled, then Kalpana is very easy to use. So please don’t be discouraged!

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-dimensional numpy 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).

Continue reading

More Example Input Files for SWAN+ADCIRC

Updated 2021/12/13: Adding example files for SWAN v41.31 with ST6 physics.
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

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.

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

Continue reading

Updates to Spectral Propagation Velocities

As we have progressed with the coupling of SWAN+ADCIRC, one persistent question has been how SWAN handles the spectral propagation velocities in regions with relatively-coarse mesh resolution. In these regions, energy was focused unrealistically at a single mesh vertex, causing the significant wave heights to become non-physical.

The preferred solution is always to increase the mesh resolution, to better represent the evolution of waves due to changes in bathymetric depths and/or ambient currents. But this preferred solution is not always feasible, especially when the non-physical behavior is occurring far from the region of interest.

Now this question has been addressed in a robust manner with the latest version of SWAN (starting with v41.01B) and SWAN+ADCIRC (starting with v53.00). Previous techniques are now outdated. This post will describe this new technique, and demonstrate its performance on a few test cases.

Continue reading

Mapping and Visualization of Coastal Flood Forecasts for Decision Support

The goal of this proposed research is to enable data-driven decision-making for coastal communities during storm events. The ADCIRC forecast data will be connected to geospatial databases for use by emergency managers to consider inundation and damages during storm scenarios. The critical objectives of this proposed research are (1) downscaling the model forecast data to the resolution of geospatial datasets used for decision support, (2) assessing the implications of this downscaling on forecast accuracy, and (3) connecting these technologies with an end user, specifically the NC Emergency Management.

JC Dietrich. “Mapping and Visualization of Coastal Flood Forecasts for Decision Support.” National Consortium for Data Science, Data Fellows, 2016/07/01 to 2017/06/30, $50,000 (Dietrich: $50,000).