Skip to content

Tutorial for Building and Running Model with Example Data

K. Jennings edited this page Dec 14, 2021 · 2 revisions

Noah-OWP-Modular Tutorial

Noah-OWP-Modular presently requires only one external library, NetCDF, and a Fortran compiler. You can install NetCDF using the link or through a package manager such as Brew.

The first step is to clone the repository using the git clone command. Next, change into the main directory with cd noah-owp-modular.

The you can set up a configuration file for the model build options. There are currently 4 build options in the config directory:

  • user_build_options.cheynne: Cheyenne supercomputer
  • user_build_options.pgf90.linux: Linux with pgf90 compiler, NetCDF installed via source (usr/local)
  • user_build_options.macros.gfortran: MacOS with gfortran compiler, NetCDF installed via source (opt/local)
  • user_build_options.bigsur.gfortran: MacOS Big Sur with gfortran compiler, NetCDF installed via Brew

If your system does not match one of the above options, you'll need to edit one of the files or create your own. If you create your own, you'll need to add another option to the configure Perl script (noah-owp-modular/configure).

Once you have a user_build_options set, go to your terminal and run the following command from the main noah-owp-modular directory:

./configure

This will run the configure Perl script which will bring up a series of options. Enter the number that corresponds to the build option for your environment. The user_build_options file should now match the configuration chosen when you ran the configure script.

Next, compile and link the model using the make command in the main noah-owp-modular directory:

make

This will create noah_owp_modular.exe in the run directory (noah-owp-modular/run).

After the model is finished compiling and linking, navigate to the run directory and run the model:

cd run/
./noah_owp_modular.exe

You can examine model output in the output.nc file. This requires Panoply or another NetCDF viewer.

To reset, use the make clean command. This will allow you to compile the code again with a new configuration.

Clone this wiki locally