The programs (computer instructions) that simulate the biogeochemistry of Long Island Sound and are the core of SWEM are provided below. These are shared here so that scientists interested in understanding the details of the simulations can examine them and reproduce the results reported in the documents linked on the “Documents” tab.

Standard and Revised SWEM

The computer program in FORTRAN that solves the biogeochemistry component of SWEM as described in G-176 SWEM is provided as a ZIP file here: SWEM_orig_Source.

A revised version that is a product of the O’Donnell et al. (2014) project with alternative algal formulations is available here: SWEM_V2_Source. This version produces the standard Hydroqual output files with solution values at 10 day intervals.

These programs require a FORTRAN compiler.

Diagnostic Versions

To make the model predictions at higher frequency (15-minutes vs. 10-days) and in a more broadly accessible format, another version ( is provided. This program will generate monthly *_HF binary files of a sub-portion of the SWEM/EUTRO grid that encompasses Long Island Sound.

To share the results of the model solutions over the internet in a device-independent manner these files have been converted to NETCDF format. These files were created using MATLAB code (v2010b or later). A set of binary *_HF files is available here: Note that this is a large download. The Matlab code without the sample *_HF files is also available here:

Sample model output can be accessed as NetCDF via THREDDS for both 10-day and 15 minute HF output at: 10-day sample output and 15-minute sample output. Routines to determine the containing cell grid index from Lat/Lon coordinates are in the Matlab files above.