Loobos using namelists

Loobos is a well-known eddy flux tower site in the Netherlands. The Loobos example dataset is familiar to most JULES users because it has been used as a standard example since JULESvn1.0 (since JULESvn4.3.1 the Loobos example dataset has been moved from the JULES model download to a separate ‘Doc’ area of the MOSRS).

At this point it’s good to highlight the following about the Loobos example dataset: “This example does a 1 year run at a single point, using the Loobos data. This is intended to be a test of the code, so that users can compare with a set of standard results - it is not necessarily the best set up for users who are interested in modelling the Loobos site.” (from the point_loobos_example.jin file in JULESvn2.x; my bold added). What this means is that Loobos is not a standard configuration in the sense of the note here: it's just a test run.

 

We're going to run this example using a set of namelists.

STEP 1: The first step is to get hold of the namelists. For this example, download them from here:

          Loobos example files: Package icon point_loobos.zip (updated to vn4.8 and slightly modified by me for this example)

I have these stored at a location ~/MODELS/iofiles/io_loobos/ on my (UNIX) system and, if you unzip it to a similar location, in there you should see three subdirectories data/ (driving and ancillary data), nmls/ (namelist files) and output_Loobos1/ (currently empty: for the output of the run we’re going to do).
Also, put the contents of this .zip file at location ~/MODELS/iofiles/io_loobos/data/: Package icon data.zip

 

STEP 2: Next, set up an environment variables to point to our JULES installation ($JULES_ROOT), the location of the namelist files ($NAMELIST) and the location we want to use for the output ($OUTPUT):
   export M=$HOME/MODELS
   export JULES_ROOT=$M/jules-vn4.8
   export NAMELIST=$M/iofiles/io_loobos/nmls
   export OUTPUT=$M/iofiles/io_loobos/output_Loobos1
 

STEP 3: Not quite ready to run this: if you do this search command
   grep -r "DUMMY" $NAMELIST
then you’ll find that there are four occurrences of “DUMMY” in four of the namelist files (ancillaries.nml, drive.nml, initial_conditions.nml and output.nml - you’ll see that these are 4 of the 23 namelist files used by JULES and listed here). These need to be replaced with the path to your home directory (i.e. what you get when you type echo $HOME on your system). You can use this find command (substituting in the [full path of your $HOME] appropriately) to search-replace through all the namelist files in $NAMELIST in one go:
   find $NAMELIST/* -name "*.nml" -print0 | xargs -0 sed -s -i s#DUMMY#[full path of $HOME]#g
(you can check by repeating the grep command that they have all been correctly replaced).

  • A note about the namelists: these namelists are appropriate for use with JULESvn4.8 but other model versions will require different namelists because it's an evolving input format.
  • It's worth noting that it is quite widespread practice at CEH to use a set of ‘template’ namelist files like this with DUMMY (or something similar) marking text to be replaced perhaps by different things for different model experiments. Then multiple runs of JULES can be initiated by a script that (i) copies the nmls/ directory, (ii) search-replaces DUMMY in that new directory and then (iii) sets JULES running using the new directory of namelist files. If you run JULES using batch scripts then this is a very good way to initiate a sequence of JULES runs, however also please note that the Rose suite system with it's suite.rc file largely replaces this batch script approach (or duplicates it, depending on your point of view).

 

STEP 4: When you installed JULES, you should have compiled it, but let’s quickly check the jules.exe file has indeed been produced by FCM:
   ls $JULES_ROOT/build/bin
if not, check you have installed and compiled JULES correctly. By the way, ignore the rose-jules-run file that is also there: it seems to be redundant (if you look at diff $JULES_ROOT/bin/rose-jules-run $JULES_ROOT/build/bin/rose-jules-run). Let’s also check that the output directory (exists and) is empty:
   ls $OUTPUT

Running the model is now just a single command:
   $JULES_ROOT/build/bin/jules.exe $NAMELIST
You should start to see a lot of [INFO] lines appearing as the JULES model runs (alternatively, you can add >job.out to the end of that command to divert all the screen output to a file). After a few seconds it should finish and you can check the output has appeared in $OUTPUT/ (three .dump. files).

 

CONGRATULATIONS: you have just succeeded in running JULES !!!

 

Summary:
Set up environment variables:
   export JULES_ROOT=$M/jules-vn4.8
   export OUTPUT=$M/iofiles/io_loobos/output_Loobos1
   export NAMELIST=$M/iofiles/io_loobos/nmls
Compile JULES:
   cd $JULES_ROOT
   fcm make -j 2 -f etc/fcm-make/make.cfg --new
Run JULES:
   $JULES_ROOT/build/bin/jules.exe $NAMELIST >job.out
Check the output and log:
   more job.out
   ls $OUTPUT