BISMG:SarahS/jules merge

Notes on merging AW glacier code to current JULES trunk
 * Install tkdiff

1. A copy of the trunk to which changes will be merged to
 * Create 3 directories in the puma repository in my work space to contain

2. Andy Wiltshire's code

3. JULES version 3 from which Andy made his changes

How to sync my branch with the trunk
 * go to the working copy of my branch jules/jules-glacier
 * svn update- ensure there are no differences
 * svn merge https://puma.nerc.ac.uk/svn/JULES_svn/JULES/trunk
 * See if you can build and run a test
 * svn commit -m "Merge latest trunk changes to the jules-glacier branch"

 Check out my code  Check out jules-glacier and trunk

svn co --username sarah-shannon https://puma.nerc.ac.uk/svn/JULES_svn/JULES/branches/dev/sarah-shannon/jules-glacier jules_glacier

Use both versions using fcm make

Run test with both versions and compare dump files

Notes on merging

./tkdiff.exe /home/paleo/ggsrs/jules/r1444_sub_ice/SOURCE/SUBROUTINES/CONTROL/control.f90 /home/paleo/ggsrs/jules/jules-glacier/src/control/standalone/control.F90

Questions for AW


 * sf_exch is tricky to merge because there is extra sea-ice stuff in the new jules and some existing variables are derived types in the new jules
 * What is the purpose of the extract and preprocessor directories? Extract directory is where fcm make checks the svn repository and build the code. Preprocessor has something to do with the UM. Look like there is duplicate code there.
 * In AW /SOURCE/SUBROUTINES/control.F90 can I remove offline_diag variables ?
 * Where do I insert the switch to turn on elevation for ice tiles? Does AW have a switch for elevation tiles or do switches only relate to ice dynamics ? Still not usre about this . I think Ill add my won switch and keep turning it on/off to check backwards compatibility.


 * How to set the number of ice tiles "nice" ? Is there a conflict with sea ice


 * tile_albedo.F90 AW changed the value in the of 10 in this equation to 20. Note 20 is used in the new version of jules

( snowd(l) .gt. 0.) fsnow(l) = snowd(l) / ( snowd(l) + 20.*z0(l) )
 * Change input to read in tile surface heights relative to grid box mean. No need just use existing tile heights stuff
 * In src/control/standaloce/control.F90. ei_tile and melt_tile are already in here so no need to add.


 * SMB = snowfallT (snowfall_tile_diag) - melt_tile (snow + ice) - ei_tile (sublim of snow + ice)

where snowfall_tile_diag = ls_snow_tile(l,n) + con_snow(i,j)

melt_tile, ei_tile and con_snow are already calcualted. Only need to calc ls_snow_tile (downscaled snow??)?


 * Note call to elevate is not in control.F90 in the new JULES.

In old jules CALL elevate is in control.F90 twice and in sf_exch.F90. In new jules it is in subroutine sf_exch_jls.F90 only.