Toby Marthews
  • Home
  • Opportunities
  • Projects
    • CHAMFER
    • JULES Academy
    • TISE
    • NC-Int-SEAsia
    • TES-NbS
    • Previous projects >
      • Hydro-JULES
      • MOCABORS >
        • MOGEN
      • CSSP Brazil
      • Projects pre-2021
  • Publications
  • Map-based CV
  • Resources
    • Menu of MODEL runs
    • Menu of COURSES
    • Spatial Data >
      • GISbasics
      • GISpackages
      • 1D2D
      • Animate data
    • JULES Ancils >
      • HSAncils
    • JULES on JASMIN
    • Gather
    • Wytham Maps
  • Gallery
  • SIGOPAM
  • Welcome to UKCEH

A summary of the commands for running a JULES suite

#Select the suite for your JULES Standalone run by putting it in $RSUITE:
export RSUITE=$HOME/cylc-src/u-dz114

#Identify the JULES code used by this suite and its output folder:
export tmp1=`grep -ir "JULES_SOURCE" $RSUITE/app/fcm_make/rose-app.conf`
export JROOT=`echo ${tmp1##*=}`
unset tmp1
export tmp1=`grep -ir "output_dir" $RSUITE/app/jules/rose-app.conf`
export DIROUT=`echo ${tmp1##*=} | sed "s/'//g"`
unset tmp1
export tmp1=`grep -ir "run_id" $RSUITE/app/jules/rose-app.conf`
export RUNID=`echo ${tmp1##*=} | sed "s/'//g"`
unset tmp1
echo 'Suite is:' $RSUITE;echo '     which uses this version of JULES:' $JROOT;echo '     and will save output to these files: ls' $DIROUT'/'$RUNID'*'


#Only if you are outside Cylc: Generate namelists from $RSUITE and put them in $NAMELIST (I use a subdirectory of ~/cylc-src/ for this):
export NAMELIST=$HOME/cylc-src/nlists_${RSUITE##*/}; mkdir -p $NAMELIST; cd $NAMELIST; rose app-run -i -C $RSUITE/app/jules; cd
#(n.b. for this command, you will need Rose installed: check https://www.tobymarthews.com/jules-system-requirements.html )

Picture
#Only if you are outside Cylc and using the Gfortran compiler on JASMIN, do:
module load jaspy

#Only if you are outside Cylc and using the Intel compiler on JASMIN, do:
module load netcdf/intel2024.2.0/fortran/4.6.1
Picture
#Only if you are outside Cylc and using the Gfortran compiler on WASCAL HPC, do:
module load python/3.10.8
Picture
​#Only if you are outside Cylc and using the Gfortran compiler on Polar (at UKCEH), do:
module use /gpfs01/modules/mk2/all
module load gompi/2023b
module load Python/3.11.5-GCCcore-13.2.0
module load Perl-bundle-CPAN/5.38.0-GCCcore-13.2.0
#...and a couple not necessary for the compile, but will be necessary shortly:
module load NCO
module load ncview/2.1.11-gompi-2023b

#Only if you are not using Cylc: Compile * (as recommended on http://jules-lsm.github.io/latest/building-and-running/fcm.html ; the “-j 2” is optional):
cd $JROOT;fcm make -j 2 -f etc/fcm-make/make.cfg --new; echo -e "\a"
#After a few minutes of [info] lines you should see “[done] make” (and a ‘beep’).
#(If you get errors about "No Rule to Make Target", check the contents of your $JROOT/etc/fcm-make/make.cfg file).


#Only if you are outside Cylc: Run
$JROOT/build/bin/jules.exe $NAMELIST
#(if you want to redirect output to a file and have it run even if you log off, do this):
nohup nice $JROOT/build/bin/jules.exe $NAMELIST >~/out_${RSUITE##*/}.txt &

#Only if you are using Cylc:
cd;cylc vip $RSUITE
#During the run, you can do these to see how it's going:
grep -ir "timestep" ~/out_${RSUITE##*/}.txt
tail -n 100 ~/out_${RSUITE##*/}.txt
nedit ~/out_${RSUITE##*/}.txt &
#After the run, clear the namelists (no longer required) and list the output files:
rm -r $NAMELIST
ls -alh $DIROUT


All done!
Land Surface Science group, UK Centre for Ecology & Hydrology (UKCEH),
MacLean Bdg, Wallingford OX10 8BB, U.K.
, tobmar *a,t* ceh *dot* ac *dot* uk
Proudly powered by Weebly
  • Home
  • Opportunities
  • Projects
    • CHAMFER
    • JULES Academy
    • TISE
    • NC-Int-SEAsia
    • TES-NbS
    • Previous projects >
      • Hydro-JULES
      • MOCABORS >
        • MOGEN
      • CSSP Brazil
      • Projects pre-2021
  • Publications
  • Map-based CV
  • Resources
    • Menu of MODEL runs
    • Menu of COURSES
    • Spatial Data >
      • GISbasics
      • GISpackages
      • 1D2D
      • Animate data
    • JULES Ancils >
      • HSAncils
    • JULES on JASMIN
    • Gather
    • Wytham Maps
  • Gallery
  • SIGOPAM
  • Welcome to UKCEH