BISMG:SarahS/jules testing

JULES ROSE testing
How to upgrade a rose suite
 * This example upgrades the Trendy suite (from Camilla) from an old version to my branch version at vn4.7 on JASMIN
 * Use 'rosie go' to check out the rose suite on jasmin. cd into the /roses directory
 * See what versions it is possible to upgrade to. Note the * are the ones you can upgrade to
 * rose app-upgrade -M /home/users/sarahshannon/jules/code/vn4.7_va_scaling/rose-meta -C /home/users/sarahshannon/roses/u-af067/app/jules/ --all-versions
 * Now upgrade the rose suite. I accepted the setting (enter Y when prompted)
 * rose app-upgrade -M /home/users/sarahshannon/jules/code/vn4.7_va_scaling/rose-meta -C /home/users/sarahshannon/roses/u-af067/app/jules/ vn4.7_t164

How to create a rose suite
 * This is the format [create_rose_app vn4.7 vn4.7 namelist_path suite_name jules_dir]. This example is for JASMIN
 * Call using full paths like this /home/users/sarahshannon/jules/code/vn4.7_va_scaling/bin/create_rose_app vn4.7 vn4.7 /work/scratch/sarahshannon/vn4.7_va_scaling/wfdei_land_only ~/roses/vn4.7_va_scaling /home/users/sarahshannon/jules/code/vn4.7_va_scaling/
 * Remove to remove any commented out stuff in the namelists

Stuff to install for the VM
 * Install virtual box (https://www.virtualbox.org/) and vagrant 1.5 or later (https://www.vagrantup.com/)
 * Install cygwin (https://www.cygwin.com/). Select the xinit and xorg-server packages from the X11 section and the openssh and openssl packages from the Net section.

To set up a shared folder on the VM

 * In the VM go to devices, shared folder settings and add a shared folder. (named Dropbox for example)
 * mkdir Dropbox and chmod 777 Dropbox
 * Mount the folder named dropbox doing this sudo mount -t vboxsf -o uid=1000,gid=1000 Dropbox Dropbox

VM set up and run

 * Download VM from https://github.com/metomi/metomi-vms (the ubuntu-1404)
 * cd \cygwin\c\metomi-vms-master\ubuntu-1404
 * \cygwin\c\Vagrant\bin\vagrant.exe up
 * Enter password and user name. Make sure there is no % symbol in the password
 * sudo install-jules-extras installs netCDF libraries and utilities like ncdump, nccmp
 * Synphx is already installed on the VM but we need latex also to build the pdf containing the documentation. sudo apt-get install texlive-full

Generate KGO data

 * install-jules-gswp2-data installs the forcing data
 * fcm co https://code.metoffice.gov.uk/svn/jules/main/trunk@793 jules-trunk (to check out version 4.2 trunk)
 * cd jules-trunk
 * rose stem --group=all --source=. -S HOUSEKEEPING=false --new (this will create kgo data in /jules/rose-stem-kgo/vn4.3_t135)
 * mkdir -p /jules/rose-stem-kgo/
 * mv ~/cylc-run/jules-trunk/work/1/*/output/* /jules/rose-stem-kgo/
 * Ignore any fail message and check to se eif the kgo netcdf files are generated

Run ROSE stem tests

 * Check out a copy of the code fcm co https://code.metoffice.gov.uk/svn/jules/main/branches/dev/sarahshannon/r1709_lw_down_elevcorr@1890 vn4.3.1_lw_down_elevcorr_r1890
 * cd vn4.3.1_lw_down_elevcorr_r1890
 * rose stem --group=all --source=. --new (will run all the rose stem tests)
 * Check trac.log in ~/cycl_run/vn4.3.1_lw_down_elevcorr_r1890 for the results

Run a single ROSE stem test
rose stem --group=loobos_crm1_traitF --source=. --new

Run JULES with ROSE

 * First create a rose suite from namelists. Go to ~/jules-doc/examples/pl where the namelists are
 * ~/jules-trunk/bin/create_rose_app vn4.2 vn4.2
 * cd rose-suite
 * rosie create save as tmp-aa004 (y)
 * cp -r rose-suite/* ~/roses/tmp-aa004
 * rose edit -M ~/jules-trunk/rose-meta -C ~/roses/tmp-aa004&

If the ROSE tests fail

 * Check the result of nccmp /home/vagrant/cylc-run/vn4.3.2_lw_down_elevcorr/log/job/1/nccmp_loobos_crm6_traitF/01

Editing the documentation

 * Make a copy of trunk documentation. svn copy https://code.metoffice.gov.uk/svn/jules/doc/trunk/ https://code.metoffice.gov.uk/svn/jules/doc/branches/dev/sarahshannon/vn4.3_absoluteheight
 * svn co https://code.metoffice.gov.uk/svn/jules/doc/branches/dev/sarahshannon/vn4.3_absoluteheight jules-doc-n4.3_absoluteheight
 * Change jules_surf_hgt namelist stuff in docs/user_guide/source/namelists/model_grid.nml.rst
 * svn commit -m "Make documentation clearer." model_grid.nml.rst
 * make latexpdf
 * qpdfview build/latex/JULES_User_Guide.pdf
 * qpdfview JULES_User_Guide.pdf& to view the documentation

rose edit -M /home/vagrant/jules-trunk/rose-meta -C /home/vagrant/jules-trunk/rose-stem

svn copy -r 793 https://code.metoffice.gov.uk/svn/jules/main/trunk/ https://code.metoffice.gov.uk/svn/jules/main/branches/dev/sarahshannon/vn4.2_absoluteheight