#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 )
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 )
|
#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 |
#Only if you are outside Cylc and using the Gfortran compiler on WASCAL HPC, do:
module load python/3.10.8 |
#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 &
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!
rm -r $NAMELIST
ls -alh $DIROUT
All done!