function Run_LURNZ_single_scenario()
%
% This function provides a crude user interface for running LURNZ until we
% have a higher level excel type user interface setup and running.
%
% Testing at Motu gave LURNZ a run time of
%    5 minutes - all modules without saving PDF and ASCI maps
%    9 minutes - all modules saving all PDF and ASCI maps
%   57 minutes - all modules saving all PDF and ASCI maps with ALL_YEARS=1
% Simulating out to 2020 (12 years) at 25ha resolution
%
% At the 1ha resolution, simulating out to 2020:
%    2 hours - LUCM and LUAM, saving PDF and ASCI maps.
%

% Simon Anastasiadis
% 2012-01-16


%% Key parameters

% Carbon Price
%    - the international price of a tonne of co2-equiv emissions
%    - frequently set at $25
Co2price = 0;

% Final simulation year
%    - simulation will run from 2008 to last_year
%    - recommended values: 2009 to 2030
last_year = 2020;

%% Module Choice

% Specify which modules you wish to run
%    - value = 1 : module will be run
%    - value = 0 : module will not be run
%    - note: module run in order, running later moduels requires earlier
%           modules to run.

% Land Use Change Module
run_LUCM = 1;
% Land Use Allocation Module
run_LUAM = 1;
% Land Use Intensity Module
run_LUIM = 0;
% Greenhouse Gas Module
run_GHGM = 0;

%% Save output

% Specify which modules you want PDF and ASCI map output from
%    - only applies to modules that are chosen to run
%    - Matlab output files are saved regardless
%    - Summary excel tables are saved regardless
%        - value = 1 : output will be saved
%        - value = 0 : output will not be saved

% Land Use Allocation Module
LUAM_PDFS = 1;
LUAM_ASCI = 1;
% Land Use InModule
LUIM_PDFS = 0;
LUIM_ASCI = 0;
% Greenhouse Gas Module
GHGM_PDFS = 0;
GHGM_ASCI = 0;

%% Output for all years
%
% WARNING: saving output (ASCI and/or PDF depending of setting in previous
% section) for all years will significanlty increase the run time of LURNZ
%
% value = 0 : only save output for final year
% value = 1 : save output for all years

% Output for all years
ALL_YEARS = 0;

%% Misc Parameters

% The default age of harvest is between 26 and 32 years.
% The following variable modifies both these years, so all forestry between
% (26 + harvest_age) and (32 + harvest_age) is elegable for harvest.
harvest_age = 0;

% Pixel size
%    - specifies number of hectares per pixel
%    - acceptable values: 1 OR 25
%    - note that 1 ha resolution is not fully operational (2012-01-16)
pixel_size = 25;



% -------------------------------------------------------------------
%% Programmer Boundary
% -------------------------------------------------------------------

% WARNING : FOLLOWING CODE IS NOT PART OF THE CRUDE USER INTERFACE
% WARNING : DO NOT EDIT BELOW THIS SECTION

% -------------------------------------------------------------------

%% Clear Command Window

clc

%% Check validity of inputs

% Validity for GHG module
msg = sprintf(['Error in Run LURNZ\n', ...
               'Running GHG module requires Land Use Change, ' ...
               'Allocation and Intensity modules to also run.']);
assert(~(run_GHGM && ~all([run_LUCM, run_LUAM, run_LUIM])),msg);
% Validity for Intensity Module
msg = sprintf(['Error in Run LURNZ\n', ...
               'Running Intensity module requires Land Use Change ' ...
               'and Allocation to also run.']);
assert(~(run_LUIM && ~all([run_LUCM, run_LUAM])),msg);
% Validity for Allocation Module
msg = sprintf(['Error in Run LURNZ\n', ...
               'Running Allocation module requires ' ...
               'Land Use Change Module to also run.']);
assert(~(run_LUIM && ~all(run_LUCM)),msg);

%% Specify output path

% require data in specified format
output_date = datestr(now(), 'yyyy-mm-dd HH.MM.SS');

% output_folder
output_path = ['..\Output\Results ', output_date ];

%% Add all required folders to path

% reset default path
restoredefaultpath
% Add required directories for LURNZ to Matlab path
P=genpath('.');
path(path,P);

%% Run modules

% Inform user
msg = sprintf(' LURNZ : Beginning Simulation');
disp(msg)
tic();

% Land Use Change Module
if run_LUCM
    [~ ] = LURNZ_Land_Use_Change_Module(Co2price, last_year, output_path, pixel_size );
end
% Land Use Allocation Module
if run_LUCM && run_LUAM
   LURNZ_Land_Use_Allocation_Module(last_year, pixel_size, output_path, Co2price, LUAM_PDFS, LUAM_ASCI, ALL_YEARS, harvest_age );
end
% Land Use Intensity Module
if run_LUCM && run_LUAM && run_LUIM
    LURNZ_Land_Use_Intensity_Module(pixel_size, output_path, last_year, LUIM_PDFS, LUIM_ASCI, ALL_YEARS );
end
% Greenhouse Gas Module
if run_LUCM && run_LUAM && run_LUIM && run_GHGM
    LURNZ_Greenhouse_Gas_Module(pixel_size, output_path, last_year, GHGM_PDFS, GHGM_ASCI, ALL_YEARS );
end

% Inform user
msg = sprintf(' LURNZ : Simulation Complete\n Run time : %.2f seconds',toc());
disp(msg)



end
