OptClim‐ UKESM: setting up to run - optclim/ModelOptimisation GitHub Wiki

Prerequisite: https://github.com/optclim/ModelOptimisation/wiki/Installing-OptClim

Python on Archer2

  • OptClim scripts use the python conda environment, /work/n02/shared/mjmn02/sw/conda/opt_4/bin
  • BUT If users wanted their own, then replicate that conda but with one amendment. The code that modifies UKESM parameters should be copied (or found in your github clone)

copy /work/n02/shared/mjmn02/OptClim/optclim3/ModelOptimisation/UKESM/ModelOptimisation2/* to your own directory (or if you cloned github, have your own version already) cd to that ModelOptimisation2 directory with the setup.py, and after activating your conda environment:

python setup.py develop

Note that if in the above instead of the usual install, the "develop" command is used then, according to https://python-packaging-tutorial.readthedocs.io/en/latest/setup_py.html, new parameters can be added to the python module without reinstalling.

On puma2

  • Either Install the archer2 branch of this repository, although only the directory tree under ModelOptimisation/Rose is used on PUMA2 That also has some code predating PUMA2. The only code run is that in /home/n02/n02/mjmn02/dev/ModelOptimisation/Rose/onPUMA/launchArun.sh, or your equivalent.
  • Or use the mjmn02 code
  • only the directory tree under ModelOptimisation/Rose is used on PUMA2 That also has some code predating PUMA2. The only code run is that in /home/n02/n02/mjmn02/dev/ModelOptimisation/Rose/onPUMA/launchArun.sh, or your equivalent.

Reminder: to be able to use the cylc gscan and gcylc applications, enable X when connecting to ARCHER2 and then on to PUMA2 image

CLUDGE TO TIDY AT SOME TIME:

$OPTCLIMTOP/OptClimVn2/UKESM.py has two things to note:

  1. Each parameter must be known to the code here, although the correct location is not used - its just needs to be recognised. Best to remove that code. Hoever note this function writes runParams.txt to the interface directory. (From there it is used by the ModelOptimsiation2 code that does modify parameters.)
  2. Hardcoding of the path /home/n02/n02/mjmn02/dev/ModelOptimisation/Rose/onPUMA/launchArun.sh. If this path is included in PATH in .bash_profile it can be removed.