At OWI, we have opened-up some of our internal Python to read our WIN/PRE ascii formats, which are referred to as OWI or NWS12 files by the ADCIRC modeling community.

The code is broken up into the following components:

These components have been assembled into a Docker container image with the Dockerfile and repository available on Gitlab as well. This container image has the required publically available Python dependencies already installed, and running from Docker will execute the script.

Using the container image’s convert command

Call with the following:

docker run convert {OPTIONS}

Converting multiple NWS12 overlays would look like the following example.

docker run convert \
    -w "" \
       "" \
    -p "201304_1DegNATL.pre" \
       "201304_TestStormA.pre" \
    -g Main TestStorm \

The Gitlab container registry has been populated with my builds of the image.

docker pull

Available build tags for the image can be found on Gitlab.

Format Converter CLI

usage: [-h] -w WIN [WIN ...] -p PRE [PRE ...] -o OUTPUT
                          [-g GROUP [GROUP ...]] [-a] [-v]

Convert a series of OWI WIN/PRE files to an ADCIRC NWS13 Netcdf file.

optional arguments:
  -h, --help            show this help message and exit
  -w WIN [WIN ...], --win WIN [WIN ...]
                        Input WIN file(s)
  -p PRE [PRE ...], --pre PRE [PRE ...]
                        Input PRE file(s)
  -o OUTPUT, --output OUTPUT
                        Output file path
  -g GROUP [GROUP ...], --group GROUP [GROUP ...]
                        Input group name(s)
  -a, --append          If set, do not clobber the existing file, but append groups to it.
  -v, --verbose         Verbose log output