BISMG:SarahS/jules

Installation guide on dartagnan

 * Download jules-v3.2.tar.gz
 * gunzip jules-v3.2.tar.gz
 * tar -xvf jules-v3.2.tar
 * make COMPILER=intel BUILD=fast CDF_LIB_PATH=/opt/local/CentOS-64/netcdf/4.0/intel_fc_10.1/lib CDF_MOD_PATH=/opt/local/CentOS-64/netcdf/4.0/intel_fc_10.1/include
 * tries to link to -lnetcdff but these are already included in -lnetcdf so comment out

ifeq ($(CDFDUMMY),false)

$(LIB_PRE)netcdff from the Makefile

endif

Running point-loobos example

 * This example runs point at latitude = 52.168, longitude = 5.744

Running gridded example (see WFD in training manual)

 * Remember to ulimit -s unlimited
 * Example ran in /example/WFD/expt004/
 * Run with jules_fast.exe. Note jules_debug.exe results in a seg fault at seek_all_to_current_datetime in init.F90

General Issues ...
''
 * Running point_loobos example in debug mode fails !. Why ? This is the simplist example
 * Stripes in output when running for land & ocean points - - Fixed by creating mini netCDF input files for the Alps and using this as the model grid.
 * Can't seem to output snow level data when multi layer snow scheme is switched on - Fixed by setting l_aggregate=T
 * When setting up model to run with daily data, set timestep_len to be small or model become numerically unstable. This results in surface temp tstar_gb ~ 3130oK. I have used timestep_len=21600 sec (i.e. 6hrs)''- fixed by setting model time step to 3600 or Andy Wiltshire uses 1800.

Install AW version of JULES r1444_sub_ice

 * Same as above but instead of commenting out the lines

ifeq ($(CDFDUMMY),false)

$(LIB_PRE)netcdff

endif

in the makefile just remove the 'f' from the netcdff

Issues with AW code...

 * pp files provided are machine dependant. Recomile code with flag -convert big_endian in the Makfile.comp.intel i.e. FF_DBG=-g -C -CB -traceback -check noarg_temp_created -convert big_endian
 * Note INIT_VEG_PARAM HG2ES_pft_param.dat has 45 lines while the hard coded data in the .jin file has 43 lines.
 * Uncomment out some of the stash codes in init_drive.F90 so that they match the input pp climate files provided by AW
 * In init_opts.F90 at line 102 change WRITE(char,'(II)') i to WRITE(char,'(I2)') i. because the number of ice levels is > 10
 * IceMassI has values of 10000 (i.e. initialised value) GlacFlux has NaN. These variables are not necessary to calc smb. It was AW's work at including glacier dynamics
 * In ice.F90 the ice_dynamics_drive was commented out. This is unnecessary to calc smb.
 * Looks like Andy was putting in the ice dynamics in several places (commented out stuff in ice.F90 and in control.F90)

*Warning: initial_mod.f90, line 3575: The extra characters in the format specification will be ignored  ['(i8,i6,tr1,a,tr8,a,tr2,a))']      WRITE(header,"(i8,i6,tr1,a,tr8,a,tr2,a))") date,time,TRIM(runID)  & -^                  can_wcnt_gb,hf_snow_melt,smc,                  & ---^ !DIR$ IVDEP
 * warnings to fix
 * fortcom: Warning: hydrol.F90, line 30: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value.  [HF_SNOW_MELT]
 * fortcom: Warning: leaf_limits.F90, line 220: The statement following this DEC loop optimization directive must be an iterative do-stmt, a vector assignment, an OMP pdo-directive, or an OMP parallel-do-directive.


 * Code does not calculate surface mass balance. Create a new subroutine to calculate smb called tile_smb. Put subroutine into ICE directory remember to modify Makefile in ICE directory to include the new subroutine
 * call tile_smb from control.F90
 * save smb variable to offline_diag. Note this is only used for offline JULES. Put here temporarily as it is following what Andy did but may need to change this in the future
 * What is the difference between
 * ei_ice_tile(land_pts,nice) Sublimation on ice tiles (kg m-2 s-1) and
 * ei_tile(land_pts,ntiles)  Sublimation of snow (kg/m2/s) where ntiles = 59 ? Which should be used to calculate smb?
 * I have put smb in the offline_diag list but should this be in a better place? Watch out that variables in offline_diag are not deallocated!
 * Put smb variable with AW's other ice variables in allocate_arrays.F90
 * SMB = snowfallT (snowfall_tile_diag) - melt_tile - ei_tile. Note that
 * snowfall_tile_diag = ls_snow_tile(l,n) + con_snow(i,j) and the manual says convective snow is assumed to be zero.
 * Therefore smb(i,n) = ls_snow_tile(i,n) - melt_tile(i,n) - ei_tile(i,n)
 * Add smb to the output in output_mod.F90 and init_out_varlist.F90
 * OK crossed checked that smb output = snowfallT - eiT - snowMeltT. Difference is -4e-10 -> 2e-10 :)