Commit 84d09e57 authored by Johannes Leins's avatar Johannes Leins
Browse files

REMOVED stage duration output

parent 4a9c5715
......@@ -81,7 +81,6 @@ ofstream *fileStats = NULL;
ofstream *fileStatsYearly = NULL;
ofstream *fileMeanStats = NULL;
ofstream *fileMeanStatsBase = NULL;
ofstream *fileStages = NULL;
ofstream *fileOrderOfYears = NULL;
ofstream *fileRef = NULL;
stringstream folderNameRun;
......@@ -656,7 +655,7 @@ int initClimate() {
bool initBatchRun(int initialSimulationYear, int finalSimulationYear) {
string gmName = climateScenario->getGlobalModelName();
string rcpName = climateScenario->getReprConPathName();
stringstream soloPopKey , filenameStats, filenameStatsYearly, filenameStages, filenameDensities, filenameOrderOfYears, filenameMeanStatsBase;
stringstream soloPopKey , filenameStats, filenameStatsYearly, filenameDensities, filenameOrderOfYears, filenameMeanStatsBase;
if(soloPops) {
Point soloPopCoord = environment->getSoloPop();
soloPopKey << "_soloPop";
......@@ -673,10 +672,8 @@ bool initBatchRun(int initialSimulationYear, int finalSimulationYear) {
filenameStatsYearly << "output/" << folderNameRun.str() << "/" << runID << "_statsYearly_" << gmName << "_" << rcpName << soloPopKey.str() << "_" << initialSimulationYear << "_" << finalSimulationYear << ".csv";
filenameMeanStatsBase << "output/"<< folderNameRun.str() << "/" << runID << "_stats_mean_base"
<< "_" << gmName << "_" << rcpName << soloPopKey.str() << "_" << initialSimulationYear << "_" << finalSimulationYear << ".csv";
filenameStages << "output/"<< folderNameRun.str() << "/" << runID << "_stage_duration_" << gmName << "_" << rcpName << soloPopKey.str() << "_" << initialSimulationYear << "_" << finalSimulationYear << ".csv";
filenameOrderOfYears << "output/"<< folderNameRun.str() << "/" << runID << "_orderOfYears_" << gmName << "_" << rcpName << soloPopKey.str() << "_" << initialSimulationYear << "_" << finalSimulationYear << "_orderOfYears.csv";
fileMeanStatsBase = new ofstream(filenameMeanStatsBase.str());
fileStages = new ofstream(filenameStages.str());
fileOrderOfYears = new ofstream(filenameOrderOfYears.str());
if(yearly) {
fileStatsYearly = new ofstream(filenameStatsYearly.str());
......@@ -692,7 +689,6 @@ bool initBatchRun(int initialSimulationYear, int finalSimulationYear) {
*fileStatsYearly << ",lifetime,firstVisit,firstEst,finalDensity,nExtinction,nQuasiExtinction,meanDensity,meanMigration";
}
}
*fileStages << "seed,disturbance_scenario,year,iLon,iLat";
*fileOrderOfYears << "seed,year,year_shuffled\n";
prognosis = prognosis && disturbanceSchemes.size() > 1;
if(prognosis) {
......@@ -706,8 +702,6 @@ bool initBatchRun(int initialSimulationYear, int finalSimulationYear) {
for(auto stage : handlerLifeCylce->getLifeStages()) {
string stageName = stage->getName();
*fileStages << "," << stageName << "_day_first_gain," << stageName << "_day_last_alive"
<< "," << stageName << "_week_first_gain," << stageName << "_week_last_alive";
if(prognosis) {
*fileMeanStatsBase<< ",meanPeak_" << stageName;
*fileMeanStats<< ",meanPeak_" << stageName;
......@@ -737,7 +731,6 @@ bool initBatchRun(int initialSimulationYear, int finalSimulationYear) {
}
}
*fileMeanStatsBase << "\n";
*fileStages << "\n";
if(yearly) {
*fileStatsYearly << "\n";
}
......@@ -819,20 +812,6 @@ void outputRun(unsigned int nTimesteps, Population* population) {
*fileDensities << "," << population->getEmigration() / environment->getHabitatSize();
*fileDensities << "\n";
}
int dayOfcycle = environment->getDayOfCycle();
int lastDayOfCycle = environment->getCycleLength() - 1;
if(dayOfcycle == lastDayOfCycle) {
// print out the begin and end of stages
*fileStages << environment->getSeedLocal() << "," << disturbanceSchemeNameByID.at(currDisturbanceSchemeID);
*fileStages << "," << environment->getCycle() << "," << (currentCoord.getX() + 1) << "," << (currentCoord.getY() + 1);
for(auto stage : stages) {
int dayFirstGain = stage->getDayFirstGain();
int dayLastAlive = stage->getDayLastAlive();
*fileStages << "," << dayFirstGain << "," << dayLastAlive << "," << environment->getWeek(dayFirstGain) << "," << environment->getWeek(dayLastAlive);
}
*fileStages << "\n";
}
}
void outputFinalDens(unsigned int finalTimestep) {
......
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