Skip to content

Latest commit

 

History

History
79 lines (54 loc) · 2.74 KB

File metadata and controls

79 lines (54 loc) · 2.74 KB

WW4 banner

WW4 tools directory

Copies of tools created for WW4 are gathered here in the tools/ directory. These are the ‘microtools` to work the repository. ‘Macrotools’ to help develop WW4 applications, for instance to manipulate grids, are gathered in their own repositories.

The tools gathered here are documented in the WW4 Tools page of the WW4 wiki page.

Usage

WAVEWATCH IV provides multiple ways to set up and build the project, ranging from interactive tools to manual configuration.

Interactive Usage (Recommended)

Run the setup tool to interactively configure your active clone and compiler settings:

1. Setup

./ww4_setup

This tool will:

  • Identify and set the active WAVEWATCH IV clone in ~/.ww4_config.yaml.
  • Detect available C++ compilers on your system.
  • Configure compilation flags for either development or maximum optimization in ww4_compile_config.yaml.

2. Compilation

Once configured, you can compile WAVEWATCH IV using standard CMake:

cmake -B build
cmake --build build

The ww4_setup tool generates a ww4_local_config.cmake file that stores your selected compiler and flags, which is automatically included by CMakeLists.txt.

Manual Usage

If you prefer to configure the tools manually, follow these steps:

1. Setup

Copy the template configuration file to the repository root:

cp templates/ww4_compile_config.yaml ./ww4_compile_config.yaml

Then, edit ww4_compile_config.yaml to specify your compiler and preferred options.

2. Compilation

Configure and build with CMake as shown above.

Developer Tools

WAVEWATCH IV provides additional tools to support developers during the coding process.

Test Availability Check

To check if unit tests are available for a specific file and its identified routines:

./ww4_test_check --file <filename>

Note: The filename should be provided without extension (e.g., time_management).

This tool will:

  • Identify source files in src/ and include/.
  • Isolate user-defined routines (functions and methods).
  • Check the tests/ directory for corresponding unit tests.
  • Report the test coverage status for each identified routine.

NOAA Logo NWS Logo NCEP Logo