The UFZ services GitLab and Mattermost will be unavailable on Monday, December 06 from 06:00 AM to 08:00 AM due to maintenance work.

Commit 2802304c authored by Markus Millinger's avatar Markus Millinger
Browse files

Changed weather year functioning and added some toDos

parent ba676a82
No preview for this file type
This diff is collapsed.
No preview for this file type
......@@ -45,6 +45,8 @@ for time=1:s.runTime
f.ghgTransport1GJfeed(time,1:f.numFeed) = f.ghgTransport1(time).*ones(1,f.numFeed)./f.feedFMenergyContent; %CO2eq/tFM
%% Hard coded reference to Poplar - redo!
if s.heatOption==1
s.ghgEFHeat(time,:) = ones([s.numTech,1]).*0.067; %kgCO2eq/MJ
elseif s.heatOption==2
......
......@@ -54,11 +54,11 @@ for scenario = 1:noScenarios
%Set some dimensions
s.numSectors = 11;
f.numResidue = 12;
s.weatherYearTest = {'2016','2017','2018'};
s.weatherYear = {'2018'};
%Set country specific data
countryID = 'DE';
% powerDataCountry = powerData(contains(powerData.cet_cest_timestamp,s.weatherYearTest),...
% powerDataCountry = powerData(contains(powerData.cet_cest_timestamp,s.weatherYear),...
% contains(powerData.Properties.VariableNames,countryID));
% save(['../data/powerData' countryID '.mat'],'powerDataCountry'); %Save to .mat-file - comment out if the .mat-file is up to date
......@@ -72,7 +72,7 @@ for scenario = 1:noScenarios
[s,f] = ghgEmissions(s,f);
%% Monte Carlo sensitivity analysis example of VRE module
monteCarlo(1000,s,f,g,techData);
% monteCarlo(1000,s,f,g,techData);
%% Scenario loop
switch scenario
case 1 %Base scenario
......@@ -81,9 +81,6 @@ for scenario = 1:noScenarios
g.landMax = 10^6.*linspace(1,0,s.runTime); %ha
end
%Automate this! Choose weather year - current data includes 2016-18 (year 1-3)
s.weatherYear = 3;
%Calculation of hourly residual load and other power metrics
[residualLoad,powerYear,s.RENshare,s.RENshare100] = vrePower(s.onShore,...
s.offShore,s.photoV,s.powerLoad,s.demandPower,s.MustRun,...
......@@ -91,8 +88,8 @@ for scenario = 1:noScenarios
%Calculation of surplus power (TWh) per year and time step
[s.surplusPowerVar,s.surplusPowerVar2,s.posResLoad,s.resLoadDataHour] = surplusPower(g,s,residualLoad,powerYear);
figure()
plot(s.surplusPowerVar)
% figure()
% plot(s.surplusPowerVar)
%Setting dispatchable power demand as upper limit in power sector and
%passenger road transport demand
......
......@@ -24,7 +24,7 @@
function [f,g,s] = setData(techData,f,g,s)
s.numTech = size(techData.data.techInputData(1,:),2);
s.techNames = techData.textdata.techInputData(2,3:s.numTech+2);
s.techNames = techData.textdata.techInputData(2,3:end);
s.techNamesLegend = s.techNames;
s.sectorNames = techData.textdata.techInputData(125:135,2)';
s.sectorNamesLegend = s.sectorNames;
......
......@@ -23,7 +23,7 @@
function [surplusPowerVar,surplusPowerVar2,posResLoadVar,resLoadDataHour] = surplusPower(g,s,residualLoad,powerYear)
resLoadDataHour = sort(residualLoad(((s.weatherYear-1)*8760+1):((s.weatherYear)*8760+1),1:end),'descend')./1000000; %TW
resLoadDataHour = sort(residualLoad(1:end,1:end),'descend')./1000000; %TW
% posResLoadDataHour = resLoadDataHour;
% posResLoadDataHour(posResLoadDataHour<0) = 0;
% resLoadDataHour(resLoadDataHour>0) = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment