Part 3. Running NEMO - NOC-MSM/Belize_workshop GitHub Wiki

Part 3. Running NEMO

With NEMO and XIOS executables downloaded, we are ready to run them!

Before we start this process, we will need to download some essential files. Let's start!


NEMO essential files

Domain and Forcing files...

To run NEMO, we need the following essential files:

  • runoff.nc - river runoff data.
  • bdydta - directory of boundary forcing
  • coordinates.bdy.nc - location of boundaries
  • metdta - directory of meteorological forcing
  • initcd_vosaline.nc - 3D initial condtions for salinity
  • initcd_votemper.nc - 3D initial conditions for temperature
  • domain_cfg.nc - file describing the configuration domain / grid
  • various XML files -contain various variable definitions used by the model
  • namelist_ref -reference file with all the options available to run the model
  • namelist_cfg -user selected options for the model run

How do we get these files?

Just follow this instructions:

  1. Open your Docker Desktop/Toolbox console.
  2. Run your Docker container:

docker run -v $HOME/Belize_workshop:/Belize_workshop -t -i jelt/nemocompile:firsttry /bin/bash

  1. Change your container directory to the following one:

cd /Belize_workshop/RUN_NEMO/EXP_demo

  1. Download the essential files:

wget -nH --cut-dirs=4 --no-parent --recursive ftp://livftp.noc.ac.uk/noc/gmayapub/data/NEMOworkshop/EXP_demo/

  1. You have successfully obtained the essential files, now you can run NEMO!

Check your directories

We just download the folder EXP_demo with all the essential files we need! However, the directory with the essential files may look something like this:

Belize_workshop/RUN_NEMO/EXP_demo/EXP_demo

Notice the EXP_demo folder (with the essential files) inside our first EXP_demo folder (with the NEMO and XIOS executables)?

The easiest way to fix this is by going to the second folder (the one with the essential files), copying all the files and pasting them inside the first folder (with the NEMO and XIOS executables).

This step is necessary as not having all the files in the same directory will result in NEMO not running.


Running NEMO

Making sure everything is in order

On this point, should be inside the Docker container. If you closed it for any reason, don't worry, just open it again with the code line:

docker run -v $HOME/Belize_workshop:/Belize_workshop -t -i jelt/nemocompile:firsttry /bin/bash

Now, follow this instructions:

  1. Already inside the Docker container, move to the EXP_demo folder:

cd /Belize_workshop/RUN_NEMO/EXP_demo

  1. Check that all the files are inside this folder. To do this, use the next code line and move on to step 3:

ls

  1. After using the previous code, all the files inside the folder should appear in your screen. You want to make sure that all the essential files named above are on this folder, as well as the NEMO.exe and XIOS_server.exe files.

  2. If all the files are inside the folder, then we can run NEMO now!

  3. or if not all the files are inside the folder, try to identify what files are missing and go back to the corresponding part of this tutorial to find out how to obtain them.

Run NEMO

With everything ready, let's run NEMO!

  1. Inside the docker container and the EXP_demo folder, let's check that our NEMO and XIOS files are actually executable:

chmod a+rx nemo.exe

chmod a+rx xios_server.exe

There should be no output for these commands, as we are just changing permissions for those files.

  1. Run NEMO!

mpirun -n 3 ./nemo.exe : -n 1 ./xios_server.exe

A successful run should result in a performance report output.

For reference, in my laptop (Intel Core i5-9300H, 8GB RAM) this process took around 40 minutes.

  1. If everything worked right, you should now have new files in your EXP_demo folder. Said files should look something like this:

BLZE12_C1_1h_19950101_19950110_grid_V.nc

  1. You succesfully ran NEMO!

Congratulations! You have successfully run NEMO and obtained the files we are going to visualize. Now you can continue to the fourth part of this tutorial!