38using std::resetiosflags;
39using std::setprecision;
43using std::stringstream;
92 OutStream <<
" Main output file (this file) \t: "
120 OutStream <<
" Level of Log detail \t: ";
159 OutStream <<
" Simulation start date/time \t: ";
165 OutStream <<
" Duration of simulation \t: ";
194 OutStream <<
" Random number seeds \t: ";
209 OutStream <<
" Elevations for 'slice' raster output files \t: ";
211 for (
int i = 0; i < static_cast<int>(
m_VdSliceElev.size()); i++)
220 OutStream <<
" Output file (this file) \t: "
235 OutStream <<
" Coastline vector smoothing algorithm \t: ";
271 OutStream << resetiosflags(ios::floatfield);
278 OutStream <<
"Raster GIS Input Files" << endl;
290 OutStream << resetiosflags(ios::floatfield);
345 OutStream <<
" Layer " << i << (i == 0 ?
"(Top)" :
"") << (i ==
m_nLayers - 1 ?
"(Bottom)" :
"") << endl;
411 OutStream <<
"Vector GIS Input Files" << endl;
436 OutStream <<
" Sediment input event type \t: ";
469 OutStream <<
" Wave propagation model \t: ";
477 OutStream <<
" Density of sea water \t: " << resetiosflags(ios::floatfield) << fixed << setprecision(0) <<
m_dSeaWaterDensity <<
" kg/m^3" << endl;
478 OutStream <<
" Initial still water level \t: " << resetiosflags(ios::floatfield) << fixed << setprecision(1) <<
m_dInitialMeanSWL <<
" m" << endl;
479 OutStream <<
" Final still water level \t: " << resetiosflags(ios::floatfield) << fixed << setprecision(1) <<
m_dFinalMeanSWL <<
" m" << endl;
494 OutStream <<
"*Depth of closure \t: " << resetiosflags(ios::floatfield) << fixed << setprecision(3) <<
m_dDepthOfClosure <<
" m" << endl;
497 OutStream << resetiosflags(ios::floatfield);
498 OutStream << scientific << setprecision(2);
499 OutStream <<
" Coast platform resistance to erosion \t: " <<
m_dR << endl;
500 OutStream << resetiosflags(ios::floatfield);
503 OutStream <<
" Handling of beach sediment at grid edges \t: ";
513 OutStream <<
" Beach potential erosion/deposition equation \t: ";
521 OutStream <<
" Median particle size of fine sediment \t: " << resetiosflags(ios::floatfield) << fixed <<
m_dD50Fine <<
" mm" << endl;
522 OutStream <<
" Median particle size of sand sediment \t: " << resetiosflags(ios::floatfield) << fixed <<
m_dD50Sand <<
" mm" << endl;
523 OutStream <<
" Median particle size of coarse sediment \t: " << resetiosflags(ios::floatfield) << fixed <<
m_dD50Coarse <<
" mm" << endl;
526 OutStream <<
" Fine-sized sediment relative erodibility \t: " << resetiosflags(ios::floatfield) << fixed << setprecision(1) <<
m_dFineErodibility << endl;
531 OutStream <<
" Transport parameter KLS for CERC equation \t: " << resetiosflags(ios::floatfield) << fixed << setprecision(3) <<
m_dKLS << endl;
534 OutStream <<
" Transport parameter for Kamphuis equation \t: " << resetiosflags(ios::floatfield) << fixed << setprecision(3) <<
m_dKamphuis << endl;
542 OutStream <<
" Sediment input type \t: ";
549 OutStream <<
"line intersection with coast";
558 OutStream << resetiosflags(ios::floatfield);
559 OutStream << scientific << setprecision(2);
561 OutStream << resetiosflags(ios::floatfield);
565 OutStream <<
" Scale parameter A for cliff deposition \t: ";
588 OutStream <<
" Gravitational acceleration \t: " << resetiosflags(ios::floatfield) << fixed <<
m_dG <<
" m^2/s" << endl;
606 OutStream <<
" Profile numbers to be saved \t: ";
612 OutStream <<
" Timesteps when profiles are saved \t: ";
628 OutStream <<
"Nielsen and Hanslow (1991)";
643 OutStream <<
"# CSV FORMAT PER-ITERATION RESULTS" << endl;
644 OutStream <<
"# Sea depth in metres. All erosion and deposition values in millimetres" << endl;
645 OutStream <<
"# GISn = GIS files saved as <filename>n." << endl;
652 OutStream <<
"Sea depth in metres. All erosion and deposition values in millimetres" << endl;
653 OutStream <<
"GISn = GIS files saved as <filename>n." << endl;
680 OutStream << resetiosflags(ios::floatfield);
686 OutStream << resetiosflags(ios::floatfield);
691 OutStream << resetiosflags(ios::floatfield);
758 OutStream << setw(6) << scientific << setprecision(0) << dTmp;
773 OutStream << setw(6) << scientific << setprecision(0) << dTmp;
1250 ofstream LookUpOutStream;
1251 LookUpOutStream.open(strLookUpFile.c_str(), ios::out | ios::trunc);
1253 if (LookUpOutStream)
1256 LookUpOutStream <<
"DepthOverDB, \tErosionPotential" << endl;
1257 double dDepthOverDB = 0.0;
1262 LookUpOutStream << dDepthOverDB <<
",\t" << dErosionPotential << endl;
1266 LookUpOutStream << endl;
1269 LookUpOutStream.close();
1276int CSimulation::nSaveProfile(
int const nCoast,
CGeomProfile const* pProfile,
int const nProfSize, vector<double>
const* pdVDistXY, vector<double>
const* pdVZ, vector<double>
const* pdVDepthOverDB, vector<double>
const* pdVErosionPotentialFunc, vector<double>
const* pdVSlope, vector<double>
const* pdVRecessionXY, vector<double>
const* pdVChangeElevZ, vector<CGeom2DIPoint>*
const pPtVGridProfile, vector<double>
const* pdVScapeXY)
const
1287 if (!
bWriteProfileData(nCoast, pProfile, nProfSize, pdVDistXY, pdVZ, pdVDepthOverDB, pdVErosionPotentialFunc, pdVSlope, pdVRecessionXY, pdVChangeElevZ, pPtVGridProfile, pdVScapeXY))
1299bool CSimulation::bWriteProfileData(
int const nCoast,
CGeomProfile const* pProfile,
int const nProfSize, vector<double>
const* pdVDistXY, vector<double>
const* pdVZ, vector<double>
const* pdVDepthOverDB, vector<double>
const* pdVErosionPotentialFunc, vector<double>
const* pdVSlope, vector<double>
const* pdVRecessionXY, vector<double>
const* pdVChangeElevZ, vector<CGeom2DIPoint>*
const pPtVGridProfile, vector<double>
const* pdVScapeXY)
const
1304 stringstream ststrTmp;
1306 strFName.append(
"profile_");
1307 ststrTmp << FillToWidth(
'0', 3) << nProfile;
1308 strFName.append(ststrTmp.str());
1310 strFName.append(
"_timestep_");
1312 ststrTmp.str(
string());
1313 ststrTmp << FillToWidth(
'0', 4) <<
m_ulIter;
1314 strFName.append(ststrTmp.str());
1316 strFName.append(
".csv");
1318 ofstream OutProfStream;
1319 OutProfStream.open(strFName.c_str(), ios::out | ios::trunc);
1324 cerr <<
ERR <<
"cannot open " << strFName <<
" for output" << endl;
1328 OutProfStream <<
"\"Dist\", \"X\", \"Y\", \"Z (before erosion)\", \"Depth/DB\", \"Erosion Potential\", \"Slope\", \"Recession XY\", \"Change Elev Z\", \"Grid X\", \"Grid Y\", \"Weight\", \"For profile " << nProfile <<
" from coastline " << nCoast <<
" at timestep " <<
m_ulIter <<
"\"" << endl;
1330 for (
int i = 0; i < nProfSize; i++)
1335 OutProfStream << pdVDistXY->at(i) <<
",\t" << dX <<
",\t" << dY <<
",\t" << pdVZ->at(i) <<
",\t" << pdVDepthOverDB->at(i) <<
",\t" << pdVErosionPotentialFunc->at(i) <<
",\t" << pdVSlope->at(i) <<
",\t" << pdVRecessionXY->at(i) <<
",\t" << pdVChangeElevZ->at(i) <<
",\t" << pPtVGridProfile->at(i).nGetX() <<
",\t" << pPtVGridProfile->at(i).nGetY() <<
", \t" << pdVScapeXY->at(i) << endl;
1338 OutProfStream.close();
1346int CSimulation::nSaveParProfile(
int const nCoast,
CGeomProfile const* pProfile,
int const nParProfSize,
int const nDirection,
int const nDistFromProfile, vector<double>
const* pdVDistXY, vector<double>
const* pdVZ, vector<double>
const* pdVDepthOverDB, vector<double>
const* pdVErosionPotentialFunc, vector<double>
const* pdVSlope, vector<double>
const* pdVRecessionXY, vector<double>
const* pdVChangeElevZ, vector<CGeom2DIPoint>*
const pPtVGridProfile, vector<double>
const* pdVScapeXY)
const
1357 if (!
bWriteParProfileData(nCoast, nProfile, nParProfSize, nDirection, nDistFromProfile, pdVDistXY, pdVZ, pdVDepthOverDB, pdVErosionPotentialFunc, pdVSlope, pdVRecessionXY, pdVChangeElevZ, pPtVGridProfile, pdVScapeXY))
1369bool CSimulation::bWriteParProfileData(
int const nCoast,
int const nProfile,
int const nProfSize,
int const nDirection,
int const nDistFromProfile, vector<double>
const* pdVDistXY, vector<double>
const* pdVZ, vector<double>
const* pdVDepthOverDB, vector<double>
const* pdVErosionPotentialFunc, vector<double>
const* pdVSlope, vector<double>
const* pdVRecessionXY, vector<double>
const* pdVChangeElevZ, vector<CGeom2DIPoint>*
const pPtVGridProfile, vector<double>
const* pdVScapeXY)
const
1372 stringstream ststrTmp;
1374 strFName.append(
"profile_");
1375 ststrTmp << FillToWidth(
'0', 3) << nProfile;
1376 strFName.append(ststrTmp.str());
1378 strFName.append(
"_parallel_");
1380 ststrTmp.str(
string());
1381 ststrTmp << FillToWidth(
'0', 3) << nDistFromProfile;
1382 strFName.append(ststrTmp.str());
1384 strFName.append((nDirection == 0 ?
"_F" :
"_B"));
1386 strFName.append(
"_timestep_");
1388 ststrTmp.str(
string());
1389 ststrTmp << FillToWidth(
'0', 4) <<
m_ulIter;
1390 strFName.append(ststrTmp.str());
1392 strFName.append(
".csv");
1394 ofstream OutProfStream;
1395 OutProfStream.open(strFName.c_str(), ios::out | ios::trunc);
1400 cerr <<
ERR <<
"cannot open " << strFName <<
" for output" << endl;
1404 OutProfStream <<
"\"Dist\", \"X\", \"Y\", \"Z (before erosion)\", \"Depth/DB\", \"Erosion Potential\", \"Slope\", \"Recession XY\", \"Change Elev Z\", \"Grid X\", \"Grid Y\", \"Weight\", \"For profile " << nProfile <<
" from coastline " << nCoast <<
" at timestep " <<
m_ulIter <<
"\"" << endl;
1406 for (
int i = 0; i < nProfSize; i++)
1411 OutProfStream << pdVDistXY->at(i) <<
",\t" << dX <<
",\t" << dY <<
",\t" << pdVZ->at(i) <<
",\t" << pdVDepthOverDB->at(i) <<
",\t" << pdVErosionPotentialFunc->at(i) <<
",\t" << pdVSlope->at(i) <<
",\t" << pdVRecessionXY->at(i) <<
",\t" << pdVChangeElevZ->at(i) <<
",\t" << pPtVGridProfile->at(i).nGetX() <<
",\t" << pPtVGridProfile->at(i).nGetY() <<
", \t" << pdVScapeXY->at(i) << endl;
1414 OutProfStream.close();
1457 OutStream <<
"TOTAL PLATFORM EROSION" << endl;
1465 OutStream <<
"TOTAL CLIFF COLLAPSE EROSION" << endl;
1476 OutStream <<
"TOTAL DEPOSITION AND SUSPENSION OF CLIFF COLLAPSE TALUS" << endl;
1483 OutStream <<
"TOTAL BEACH EROSION" << endl;
1492 OutStream <<
"TOTAL BEACH DEPOSITION" << endl;
1498 OutStream <<
"TOTAL SEDIMENT INPUT EVENTS" << endl;
1505 OutStream <<
"TOTAL SUSPENDED SEDIMENT" << endl;
1509 OutStream <<
"TOTAL LOST FROM GRID BY BEACH MOVEMENT" << endl;
1517 OutStream <<
"TOTAL LOST FROM GRID BY CLIFF COLLAPSE" << endl;
1522 OutStream <<
"ALL-PROCESS TOTALS (all size classes)" << endl;
1537 if (!
bFPIsEqual(ldSandEroded, (ldSandDeposited + ldSandLost), 1.0L))
1543 OutStream <<
"Coarse sediment deposited = " << ldCoarseDeposited *
m_dCellArea <<
" m^3" << endl;
1545 OutStream <<
"Coarse sediment lost from grid = " << ldCoarseLost *
m_dCellArea <<
" m^3" << endl;
1547 if (!
bFPIsEqual(ldCoarseEroded, (ldCoarseDeposited + ldCoarseLost), 1.0L))
1553 OutStream <<
"Total sediment eroded (all processes) = " << ldActualTotalEroded *
m_dCellArea <<
" m^3" << endl;
1556 OutStream <<
"Total sediment deposited/to suspension (all processes) = " << ldTotalDepositedAndSuspension *
m_dCellArea <<
" m^3" << endl;
1559 OutStream <<
"Total sediment lost from grid (all processes) = " << ldTotalLost *
m_dCellArea <<
" m^3" << endl;
1591 LogStream <<
"END OF RUN TOTALS =================================================================================================================================================" << endl << endl;
1593 LogStream <<
"ALL-PROCESS TOTALS (all size classes)" << endl;
1595 LogStream <<
"Sediment eroded (all processes) = " << ldActualTotalEroded *
m_dCellArea <<
" m^3" << endl;
1597 LogStream <<
"Sediment deposited and in suspension (all processes) = " << ldTotalDepositedAndSuspension *
m_dCellArea <<
" m^3" << endl;
1599 LogStream <<
"Sediment lost from grid (all processes) = " << ldTotalLost *
m_dCellArea <<
" m^3" << endl;
1630 OutStream << endl <<
"END OF RUN" << endl;
1631 LogStream << endl <<
"END OF RUN" << endl;
1645 LogStream << endl <<
m_ulIter <<
": Per-polygon profile info, seawater volume (m^3), and D50 values (mm: a blank D50 value means that there is no unconsolidated sediment on that polygon)." << endl;
1647 LogStream <<
"-----------|-----------|-----------|-----------|--------------|--------------|" << endl;
1650 LogStream <<
"-----------|-----------|-----------|-----------|--------------|--------------|" << endl;
1652 for (
int nCoast = 0; nCoast < static_cast<int>(
m_VCoast.size()); nCoast++)
1654 for (
int n = 0; n <
m_VCoast[nCoast].nGetNumPolygons(); n++)
1662 LogStream <<
"-----------|-----------|-----------|-----------|--------------|--------------|" << endl << endl;
1671 double dTmpFineTot = 0;
1672 double dTmpSandTot = 0;
1673 double dTmpCoarseTot = 0;
1684 LogStream <<
m_ulIter <<
": Per-polygon pre-existing unconsolidated sediment. Note that this does not include pre-existing unconsolidated sediment outside the polygons.";
1687 LogStream <<
" Also the all-polygon total will be slightly different from the all-polygon total at the end of the last timestep, since the coastline and polygons have been re-drawn.";
1691 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl;
1694 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl;
1696 for (
int nCoast = 0; nCoast < static_cast<int>(
m_VCoast.size()); nCoast++)
1698 for (
int n = 0; n <
m_VCoast[nCoast].nGetNumPolygons(); n++)
1712 LogStream <<
strIntRight(nCoast, 11) <<
"|" <<
strIntRight(pPolygon->
nGetPolygonCoastID(), 11) <<
"|" <<
strDblRight((dThisFine + dThisSand + dThisCoarse) *
m_dCellArea, 0, 14) <<
"|" <<
strDblRight(dThisFine *
m_dCellArea, 0, 14) <<
"|" <<
strDblRight(dThisSand *
m_dCellArea, 0, 14) <<
"|" <<
strDblRight(dThisCoarse *
m_dCellArea, 0, 14) <<
"|" << endl;
1717 dTmpTot += (dThisFine + dThisSand + dThisCoarse) *
m_dCellArea;
1726 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl;
1728 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl << endl;
1738 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl;
1741 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl;
1743 double dTmpFineTot = 0;
1744 double dTmpSandTot = 0;
1745 double dTmpCoarseTot = 0;
1748 for (
int nCoast = 0; nCoast < static_cast<int>(
m_VCoast.size()); nCoast++)
1750 for (
int n = 0; n <
m_VCoast[nCoast].nGetNumPolygons(); n++)
1758 LogStream <<
strIntRight(nCoast, 11) <<
"|" <<
strIntRight(pPolygon->
nGetPolygonCoastID(), 11) <<
"|" <<
strDblRight((dThisFine + dThisSand + dThisCoarse) *
m_dCellArea, 0, 14) <<
"|" <<
strDblRight(dThisFine *
m_dCellArea, 0, 14) <<
"|" <<
strDblRight(dThisSand *
m_dCellArea, 0, 14) <<
"|" <<
strDblRight(dThisCoarse *
m_dCellArea, 0, 14) <<
"|" << endl;
1763 dTmpTot += (dThisFine + dThisSand + dThisCoarse) *
m_dCellArea;
1767 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl;
1769 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl << endl;
1778 double const dTmpFineTot = 0;
1779 double dTmpSandTot = 0;
1780 double dTmpCoarseTot = 0;
1782 LogStream << endl <<
m_ulIter <<
": Per-polygon unconsolidated sand/coarse sediment derived from erosion of the consolidated shore platform (all m^3). All fine sediment eroded from the shore platform goes to suspension." << endl;
1784 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl;
1787 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl;
1789 for (
int nCoast = 0; nCoast < static_cast<int>(
m_VCoast.size()); nCoast++)
1791 for (
int n = 0; n <
m_VCoast[nCoast].nGetNumPolygons(); n++)
1795 LogStream <<
strIntRight(nCoast, 11) <<
"|" <<
strIntRight(pPolygon->
nGetPolygonCoastID(), 11) <<
"|" <<
strDblRight((pPolygon->
dGetPlatformErosionUnconsSand() + pPolygon->
dGetPlatformErosionUnconsCoarse()) *
m_dCellArea, 0, 14) <<
"|" <<
strDblRight(0, 0, 14) <<
"|" <<
strDblRight(pPolygon->
dGetPlatformErosionUnconsSand() *
m_dCellArea, 0, 14) <<
"|" <<
strDblRight(pPolygon->
dGetPlatformErosionUnconsCoarse() *
m_dCellArea, 0, 14) <<
"|" << endl;
1803 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl;
1805 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl << endl;
1813 LogStream <<
m_ulIter <<
": Per-polygon cliff collapse (all m^3). Fine sediment derived from cliff collapse goes to suspension, sand/coarse sediment derived from cliff collapse becomes unconsolidated talus (DDPD = During Dean Profile Deposition)." << endl;
1815 LogStream <<
"-----------|-----------|--------------------------------------------|-----------------------------|--------------------------------------------|--------------------------------------------|" << endl;
1817 LogStream <<
strCentre(
"ID", 11) <<
"|" <<
strCentre(
"ID", 11) <<
"|" <<
strCentre(
"Eroded Cliff", 15) <<
strCentre(
"Eroded DDPD", 15) <<
strCentre(
"Deposited", 14) <<
"|" <<
strCentre(
"Eroded", 14) <<
"|" <<
strCentre(
"Suspension", 14) <<
"|" <<
strCentre(
"Eroded Cliff", 15) <<
strCentre(
"Eroded DDPD", 15) <<
strCentre(
"Deposited", 14) <<
"|" <<
strCentre(
"Eroded Cliff", 15) <<
strCentre(
"Eroded DDPD", 15) <<
strCentre(
"Deposited", 14) <<
"|" << endl;
1818 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|" << endl;
1820 double dTmpErosionTot = 0;
1821 double dTmpErosionDDPDTot = 0;
1822 double dTmpDepositTot = 0;
1824 double dTmpErosionFineTot = 0;
1825 double dTmpSuspensionFineTot = 0;
1827 double dTmpErosionSandTot = 0;
1828 double dTmpErosionSandDDPDTot = 0;
1829 double dTmpDepositSandTot = 0;
1831 double dTmpErosionCoarseTot = 0;
1832 double dTmpErosionCoarseDDPDTot = 0;
1833 double dTmpDepositCoarseTot = 0;
1835 for (
int nCoast = 0; nCoast < static_cast<int>(
m_VCoast.size()); nCoast++)
1837 for (
int n = 0; n <
m_VCoast[nCoast].nGetNumPolygons(); n++)
1870 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|" << endl;
1874 <<
strDblRight(dTmpErosionCoarseTot, 0, 14) <<
" " <<
strDblRight(dTmpErosionCoarseDDPDTot, 0, 14) <<
"|" <<
strDblRight(dTmpDepositCoarseTot, 0, 14) <<
"|" << endl;
1875 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|" << endl << endl;
1883 LogStream <<
m_ulIter <<
": Per-polygon totals of stored unconsolidated beach sediment prior to polygon-to-polygon movement (all m^3). Note that this does not include unconsolidated sediment stored outside the polygons." << endl;
1885 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl;
1888 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl;
1891 double dTmpFineTot = 0;
1892 double dTmpSandTot = 0;
1893 double dTmpCoarseTot = 0;
1895 for (
int nCoast = 0; nCoast < static_cast<int>(
m_VCoast.size()); nCoast++)
1897 for (
int n = 0; n <
m_VCoast[nCoast].nGetNumPolygons(); n++)
1905 LogStream <<
strIntRight(nCoast, 11) <<
"|" <<
strIntRight(pPolygon->
nGetPolygonCoastID(), 11) <<
"|" <<
strDblRight((dFine + dSand + dCoarse) *
m_dCellArea, 0, 14) <<
"|" <<
strDblRight(dFine *
m_dCellArea, 0, 14) <<
"|" <<
strDblRight(dSand *
m_dCellArea, 0, 14) <<
"|" <<
strDblRight(dCoarse *
m_dCellArea, 0, 14) <<
"|" << endl;
1907 dTmpTot += (dFine + dSand + dCoarse) *
m_dCellArea;
1914 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl;
1916 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|" << endl << endl;
1924 LogStream <<
m_ulIter <<
": Per-polygon potential (i.e. not considering sediment availability) erosion of all size classes of unconsolidated beach sediment (-ve, all m^3), calculated with the ";
1934 LogStream <<
"-----------|-----------|--------------|" << endl;
1937 LogStream <<
"-----------|-----------|--------------|" << endl;
1941 for (
int nCoast = 0; nCoast < static_cast<int>(
m_VCoast.size()); nCoast++)
1943 for (
int n = 0; n <
m_VCoast[nCoast].nGetNumPolygons(); n++)
1953 LogStream <<
"-----------|-----------|--------------|" << endl;
1955 LogStream <<
"-----------|-----------|--------------|" << endl << endl;
1998 LogStream <<
m_ulIter <<
": Unsorted sequence of polygon processing (-9999 = leaves grid)" << endl;
1999 LogStream <<
"-----------|-----------|-----------|----------------------|" << endl;
2002 LogStream <<
"-----------|-----------|-----------|----------------------|" << endl;
2004 for (
int nCoast = 0; nCoast < static_cast<int>(pnVVVAllCoastPolyAndAdjacent.size()); nCoast++)
2006 for (
int nPoly = 0; nPoly < static_cast<int>(pnVVVAllCoastPolyAndAdjacent[nCoast].size()); nPoly++)
2013 for (
int m = 0; m < static_cast<int>(pnVVVAllCoastPolyAndAdjacent[nCoast][nPoly].size()); m++)
2024 if (pnVVVAllCoastPolyAndAdjacent[nCoast][nPoly][1] ==
true)
2033 nVTmp.push_back(pnVVVAllCoastPolyAndAdjacent[nCoast][nPoly][m]);
2035 if (m ==
static_cast<int>(pnVVVAllCoastPolyAndAdjacent[nCoast][nPoly].size()) - 1)
2038 sort(nVTmp.begin(), nVTmp.end());
2042 for (
int mm = 0; mm < static_cast<int>(nVTmp.size()); mm++)
2045 strTmp += to_string(nCoast);
2047 strTmp += to_string(nVTmp[mm]);
2050 if (mm <
static_cast<int>(nVTmp.size()) - 1)
2061 LogStream <<
"-----------|-----------|-----------|----------------------|" << endl << endl;
2070 LogStream <<
m_ulIter <<
": Sorted sequence of polygon processing (" <<
INT_NODATA <<
" = leaves grid), and any X -> Y -> X circularities" << endl;
2072 LogStream <<
"-----------|-----------|-----------|----------------------|----------------------|" << endl;
2075 LogStream <<
"-----------|-----------|-----------|----------------------|----------------------|" << endl;
2077 for (
int nCoast = 0; nCoast < static_cast<int>(pnVVVAllCoastPolyAndAdjacent.size()); nCoast++)
2079 for (
int nPoly = 0; nPoly < static_cast<int>(pnVVVAllCoastPolyAndAdjacent[nCoast].size()); nPoly++)
2087 if (pnVVVAllCoastPolyAndAdjacent[nCoast][nPoly][1] ==
true)
2095 for (
int m = 2; m < static_cast<int>(pnVVVAllCoastPolyAndAdjacent[nCoast][nPoly].size()); m++)
2096 nVTmp.push_back(pnVVVAllCoastPolyAndAdjacent[nCoast][nPoly][m]);
2099 sort(nVTmp.begin(), nVTmp.end());
2104 for (
int m = 0; m < static_cast<int>(nVTmp.size()); m++)
2107 strTmp += to_string(nCoast);
2109 strTmp += to_string(nVTmp[m]);
2112 if (m <
static_cast<int>(nVTmp.size()) - 1)
2124 for (
unsigned int i = 0; i < VCirc.size(); i++)
2126 strTmp += to_string(VCirc[i]);
2128 if (i < (VCirc.size() - 1))
2137 LogStream <<
"-----------|-----------|-----------|----------------------|----------------------|" << endl << endl;
2146 LogStream <<
m_ulIter <<
": Per-polygon erosion and deposition of unconsolidated beach sediment, all m^3. Fine sediment is moved to suspension, not deposited (DDPD = During Dean Profile Deposition)." << endl;
2148 LogStream <<
"-----------|-----------|--------------------------------------------|-----------------------------|--------------------------------------------|--------------------------------------------|" << endl;
2150 LogStream <<
strCentre(
"", 11) <<
"|" <<
strCentre(
"", 11) <<
"|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|" << endl;
2151 LogStream <<
strCentre(
"", 11) <<
"|" <<
strCentre(
"", 11) <<
"|" <<
strCentre(
"Erosion", 14) <<
" " <<
strCentre(
"Erosion DPDD", 14) <<
"|" <<
strCentre(
"Dep + Susp", 14) <<
"|" <<
strCentre(
"Erosion", 14) <<
"|" <<
strCentre(
"Suspension", 14) <<
"|" <<
strCentre(
"Erosion", 14) <<
" " <<
strCentre(
"Erosion DPDD", 14) <<
"|" <<
strCentre(
"Deposition", 14) <<
"|" <<
strCentre(
"Erosion", 14) <<
" " <<
strCentre(
"Erosion DPDD", 14) <<
"|" <<
strCentre(
"Deposition", 14) <<
"|" << endl;
2152 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|" << endl;
2154 double dTmpTotAllErosion = 0;
2155 double dTmpTotAllErosionDDPD = 0;
2156 double dTmpTotAllDeposition = 0;
2158 double dTmpFineErosion = 0;
2161 double dTmpSandErosion = 0;
2162 double dTmpSandErosionDDPD = 0;
2163 double dTmpSandDeposition = 0;
2165 double dTmpCoarseErosion = 0;
2166 double dTmpCoarseErosionDDPD = 0;
2167 double dTmpCoarseDeposition = 0;
2169 for (
int nCoast = 0; nCoast < static_cast<int>(pnVVVAllCoastPolyAndAdjacent.size()); nCoast++)
2171 for (
int n = 0; n <
m_VCoast[nCoast].nGetNumPolygons(); n++)
2173 int const nPoly = pnVVVAllCoastPolyAndAdjacent[nCoast][n][0];
2175 double const dAllErosionNotDDPD = -
m_VCoast[nCoast].pGetPolygon(nPoly)->dGeBeachErosionAllUncons() - (
m_VCoast[nCoast].pGetPolygon(nPoly)->dGetBeachSandErodedDeanProfile() +
m_VCoast[nCoast].pGetPolygon(nPoly)->dGetBeachCoarseErodedDeanProfile());
2176 double const dSandErosionNotDDPD = -
m_VCoast[nCoast].pGetPolygon(nPoly)->dGetBeachErosionUnconsSand() -
m_VCoast[nCoast].pGetPolygon(nPoly)->dGetBeachSandErodedDeanProfile();
2177 double const dCoarseErosionNotDDPD = -
m_VCoast[nCoast].pGetPolygon(nPoly)->dGetBeachErosionUnconsCoarse() -
m_VCoast[nCoast].pGetPolygon(nPoly)->dGetBeachCoarseErodedDeanProfile();
2189 dTmpTotAllErosion += (dAllErosionNotDDPD *
m_dCellArea);
2190 dTmpTotAllErosionDDPD += ((
m_VCoast[nCoast].pGetPolygon(nPoly)->dGetBeachSandErodedDeanProfile() +
m_VCoast[nCoast].pGetPolygon(nPoly)->dGetBeachCoarseErodedDeanProfile()) *
m_dCellArea);
2191 dTmpTotAllDeposition += (
m_VCoast[nCoast].pGetPolygon(nPoly)->dGetBeachDepositionAndSuspensionAllUncons() *
m_dCellArea);
2193 dTmpFineErosion += (
m_VCoast[nCoast].pGetPolygon(nPoly)->dGetBeachErosionUnconsFine() *
m_dCellArea);
2196 dTmpSandErosion += (dSandErosionNotDDPD *
m_dCellArea);
2197 dTmpSandErosionDDPD += (
m_VCoast[nCoast].pGetPolygon(nPoly)->dGetBeachSandErodedDeanProfile() *
m_dCellArea);
2198 dTmpSandDeposition += (
m_VCoast[nCoast].pGetPolygon(nPoly)->dGetBeachDepositionUnconsSand() *
m_dCellArea);
2200 dTmpCoarseErosion += (dCoarseErosionNotDDPD *
m_dCellArea);
2201 dTmpCoarseErosionDDPD += (
m_VCoast[nCoast].pGetPolygon(nPoly)->dGetBeachCoarseErodedDeanProfile() *
m_dCellArea);
2202 dTmpCoarseDeposition += (
m_VCoast[nCoast].pGetPolygon(nPoly)->dGetToDoBeachDepositionUnconsCoarse() *
m_dCellArea);
2206 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|" << endl;
2207 LogStream <<
"Lost from grid |" <<
strLeft(
"", 14) <<
"|" <<
strLeft(
"", 14) <<
"|" <<
strDblRight((
m_dThisIterLeftGridUnconsSand +
m_dThisIterLeftGridUnconsCoarse) *
m_dCellArea, 0, 14) <<
"|" <<
strLeft(
"", 14) <<
"|" <<
strLeft(
"", 14) <<
"|" <<
strLeft(
"", 14) <<
"|" <<
strLeft(
"", 14) <<
"|" <<
strDblRight(
m_dThisIterLeftGridUnconsSand *
m_dCellArea, 0, 14) <<
"|" <<
strLeft(
"", 14) <<
"|" <<
strLeft(
"", 14) <<
"|" <<
strDblRight(
m_dThisIterLeftGridUnconsCoarse *
m_dCellArea, 0, 14) <<
"|" << endl;
2213 bool bShowZeroFine =
false;
2214 bool bShowZeroSand =
false;
2215 bool bShowZeroCoarse =
false;
2218 bShowZeroFine =
true;
2221 bShowZeroSand =
true;
2224 bShowZeroCoarse =
true;
2226 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|" << endl;
2231 <<
strDblRight(-dTmpFineErosion, 0, 14, bShowZeroFine) <<
"|" <<
strDblRight(dTmpFineErosion, 0, 14, bShowZeroFine) <<
"|"
2233 <<
strDblRight(-dTmpSandErosion, 0, 14, bShowZeroSand) <<
"|" <<
strDblRight(dTmpSandErosionDDPD, 0, 14, bShowZeroSand) <<
"|" <<
strDblRight(dTmpSandDeposition, 0, 14, bShowZeroSand) <<
"|"
2235 <<
strDblRight(-dTmpCoarseErosion, 0, 14, bShowZeroCoarse) <<
"|" <<
strDblRight(dTmpCoarseErosionDDPD, 0, 14, bShowZeroCoarse) <<
"|" <<
strDblRight(dTmpCoarseDeposition, 0, 14, bShowZeroCoarse) <<
"|" << endl;
2236 LogStream <<
"-----------|-----------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|" << endl;
2248 int nSuspFineCellsAllCells = 0;
2249 int nUnconsFineCellsAllCells = 0;
2250 int nUnconsSandCellsAllCells = 0;
2251 int nUnconsCoarseCellsAllCells = 0;
2255 int nSuspFineCellsInPolygons = 0;
2256 int nUnconsFineCellsInPolygons = 0;
2257 int nUnconsSandCellsInPolygons = 0;
2258 int nUnconsCoarseCellsInPolygons = 0;
2261 double dEndIterSuspFineAllCells = 0;
2262 double dEndIterUnconsFineAllCells = 0;
2263 double dEndIterUnconsSandAllCells = 0;
2264 double dEndIterUnconsCoarseAllCells = 0;
2265 double dEndIterConsFineAllCells = 0;
2266 double dEndIterConsSandAllCells = 0;
2267 double dEndIterConsCoarseAllCells = 0;
2270 double dEndIterSuspFineInPolygons = 0;
2271 double dEndIterUnconsFineInPolygons = 0;
2272 double dEndIterUnconsSandInPolygons = 0;
2273 double dEndIterUnconsCoarseInPolygons = 0;
2274 double dEndIterConsFineInPolygons = 0;
2275 double dEndIterConsSandInPolygons = 0;
2276 double dEndIterConsCoarseInPolygons = 0;
2283 dEndIterConsFineAllCells +=
m_pRasterGrid->m_Cell[nX][nY].dGetConsFineDepthAllLayers();
2284 dEndIterConsSandAllCells +=
m_pRasterGrid->m_Cell[nX][nY].dGetConsSandDepthAllLayers();
2285 dEndIterConsCoarseAllCells +=
m_pRasterGrid->m_Cell[nX][nY].dGetConsCoarseDepthAllLayers();
2287 double dSuspFine =
m_pRasterGrid->m_Cell[nX][nY].dGetSuspendedSediment();
2291 dEndIterSuspFineAllCells += dSuspFine;
2292 nSuspFineCellsAllCells++;
2295 double dUnconsFine =
m_pRasterGrid->m_Cell[nX][nY].dGetUnconsFineDepthAllLayers();
2297 if (dUnconsFine > 0)
2299 dEndIterUnconsFineAllCells += dUnconsFine;
2300 nUnconsFineCellsAllCells++;
2303 double dUnconsSand =
m_pRasterGrid->m_Cell[nX][nY].dGetUnconsSandDepthAllLayers();
2305 if (dUnconsSand > 0)
2307 dEndIterUnconsSandAllCells += dUnconsSand;
2308 nUnconsSandCellsAllCells++;
2311 double dUnconsCoarse =
m_pRasterGrid->m_Cell[nX][nY].dGetUnconsCoarseDepthAllLayers();
2313 if (dUnconsCoarse > 0)
2315 dEndIterUnconsCoarseAllCells += dUnconsCoarse;
2316 nUnconsCoarseCellsAllCells++;
2323 dEndIterConsFineInPolygons +=
m_pRasterGrid->m_Cell[nX][nY].dGetConsFineDepthAllLayers();
2324 dEndIterConsSandInPolygons +=
m_pRasterGrid->m_Cell[nX][nY].dGetConsSandDepthAllLayers();
2325 dEndIterConsCoarseInPolygons +=
m_pRasterGrid->m_Cell[nX][nY].dGetConsCoarseDepthAllLayers();
2327 dSuspFine =
m_pRasterGrid->m_Cell[nX][nY].dGetSuspendedSediment();
2331 dEndIterSuspFineInPolygons += dSuspFine;
2332 nSuspFineCellsInPolygons++;
2335 dUnconsFine =
m_pRasterGrid->m_Cell[nX][nY].dGetUnconsFineDepthAllLayers();
2337 if (dUnconsFine > 0)
2339 dEndIterUnconsFineInPolygons += dUnconsFine;
2340 nUnconsFineCellsInPolygons++;
2343 dUnconsSand =
m_pRasterGrid->m_Cell[nX][nY].dGetUnconsSandDepthAllLayers();
2345 if (dUnconsSand > 0)
2347 dEndIterUnconsSandInPolygons += dUnconsSand;
2348 nUnconsSandCellsInPolygons++;
2351 dUnconsCoarse =
m_pRasterGrid->m_Cell[nX][nY].dGetUnconsCoarseDepthAllLayers();
2353 if (dUnconsCoarse > 0)
2355 dEndIterUnconsCoarseInPolygons += dUnconsCoarse;
2356 nUnconsCoarseCellsInPolygons++;
2362 double dFineTmp = 0;
2363 double dSandTmp = 0;
2364 double dCoarseTmp = 0;
2367 <<
m_ulIter <<
": Consolidated sediment budget, all m^3. This includes sediment within and outside the polygons." << endl;
2370 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << endl;
2372 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << endl;
2394 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << endl;
2405 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(44,
'-') <<
"|" << endl;
2421 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << endl;
2423 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << endl;
2444 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << endl;
2446 double dFineError = (dEndIterConsFineAllCells *
m_dCellArea) - dFineTmp;
2447 double dSandError = (dEndIterConsSandAllCells *
m_dCellArea) - dSandTmp;
2448 double dCoarseError = (dEndIterConsCoarseAllCells *
m_dCellArea) - dCoarseTmp;
2451 bool bError =
false;
2452 string strFineErrMsg =
"";
2453 string strSandErrMsg =
"";
2454 string strCoarseErrMsg =
"";
2455 string strAllErrMsg =
"";
2478 LogStream <<
strLeft(
"Consolidated sediment mass balance check (+ve means end total > start total)", 101) <<
"|" <<
strLeft(
"", 8) <<
"|" <<
strLeft(
"", 44) <<
"|" << endl;
2482 LogStream <<
strLeft(strAllErrMsg, 101) <<
"|" <<
strLeft(
"ALL", 8) <<
"|" <<
strDblRight(dFineError + dSandError + dCoarseError, 3, 30,
false) <<
strRightPerCent(dFineError + dSandError + dCoarseError, dEndIterConsFineAllCells + dEndIterConsSandAllCells + dEndIterConsCoarseAllCells, 14, 2) <<
"|" << endl;
2483 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(44,
'-') <<
"|" << endl;
2494 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << endl;
2496 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << endl;
2524 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << endl;
2535 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(44,
'-') <<
"|" << endl;
2546 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(44,
'-') <<
"|" << endl;
2557 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(44,
'-') <<
"|" << endl;
2567 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(44,
'-') <<
"|" << endl;
2588 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << endl;
2590 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << endl;
2618 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << string(14,
'-') <<
"|" << endl;
2620 dFineError = ((dEndIterSuspFineAllCells + dEndIterUnconsFineAllCells) *
m_dCellArea) - dFineTmp,
2621 dSandError = (dEndIterUnconsSandAllCells *
m_dCellArea) - dSandTmp,
2622 dCoarseError = (dEndIterUnconsCoarseAllCells *
m_dCellArea) - dCoarseTmp;
2628 strCoarseErrMsg =
"";
2652 LogStream <<
strLeft(
"Unconsolidated sediment mass balance check (+ve means iteration-end total > iteration-start total)", 101) <<
"|" <<
strLeft(
"", 8) <<
"|" <<
strLeft(
"", 44) <<
"|" << endl;
2656 LogStream <<
strLeft(strAllErrMsg, 101) <<
"|" <<
strLeft(
"ALL", 8) <<
"|" <<
strDblRight(dFineError + dSandError + dCoarseError, 0, 30,
false) <<
strRightPerCent(dFineError + dSandError + dCoarseError, dEndIterSuspFineAllCells + dEndIterUnconsFineAllCells + dEndIterUnconsSandAllCells + dEndIterUnconsCoarseAllCells, 14, 2) <<
"|" << endl;
2657 LogStream << string(101,
'-') <<
"|" << string(8,
'-') <<
"|" << string(44,
'-') <<
"|" << endl;
Contains CGeom2DIPoint definitions.
Geometry class used for coast polygon objects.
double dGetCliffCollapseErosionCoarse(void) const
Get the this-iteration total of unconsolidated coarse sediment from cliff collapse on this polygon,...
double dGetSedimentInputUnconsSand(void) const
Get the value of sand sediment on the polygon derived from sediment input events(s)
double dGetPotentialErosion(void) const
Returns this timestep's total change in depth of unconsolidated sediment (all size classes) due to be...
double dGetCliffCollapseUnconsSandDeposition(void) const
Get the this-iteration total of unconsolidated sand sediment deposited from cliff collapse on this po...
double dGetCliffCollapseToSuspensionFine(void) const
Get the this-iteration total of unconsolidated fine sediment from cliff collapse which goes to suspen...
double dGetPreExistingUnconsSand(void) const
Get the value of pre-existing unconsolidated sand sediment stored on this polygon.
vector< int > const * VnGetCircularities(void) const
Get all circularities for this polygon.
double dGetPreExistingConsSand(void) const
Get the value of pre-existing consolidated sand sediment stored on this polygon.
double dGetCliffCollapseErosionFine(void) const
Get the this-iteration total of unconsolidated fine sediment eroded from cliff collapse on this polyg...
double dGetPlatformErosionUnconsCoarse(void) const
Get the this-iteration total of unconsolidated coarse sediment derived from shore platform erosion on...
double dGetCliffCollapseCoarseErodedDeanProfile(void) const
Get the this-iteration total of unconsolidated coarse sediment eroded during deposition of cliff coll...
double dGetSedimentInputUnconsFine(void) const
Get the value of fine sediment on the polygon derived from sediment input events(s)
double dGetPreExistingConsFine(void) const
Get the value of pre-existing consolidated fine sediment stored on this polygon.
double dGetCliffCollapseUnconsCoarseDeposition(void) const
Get the this-iteration total of unconsolidated coarse sediment deposited from cliff collapse on this ...
double dGetSeawaterVolume(void) const
Get the volume of seawater in the coast polygon.
double dGetPreExistingUnconsFine(void) const
Get the value of pre-existing unconsolidated fine sediment stored on this polygon.
int nGetPolygonCoastID(void) const
Get the coast ID, this is the same as the down-coast sequence of polygons.
int nGetUpCoastProfile(void) const
Return the number of the up-coast profile.
double dGetCliffCollapseErosionSand(void) const
Get the this-iteration total of unconsolidated sand sediment from cliff collapse on this polygon,...
double dGetAvgUnconsD50(void) const
Get the average d50 for unconsolidated sediment on this polygon.
double dGetPlatformErosionUnconsSand(void) const
Get the this-iteration total of unconsolidated sand sediment derived from shore platform erosion on t...
double dGetPreExistingUnconsCoarse(void) const
Get the value of pre-existing unconsolidated coarse sediment stored on this polygon.
double dGetCliffCollapseSandErodedDeanProfile(void) const
Get the this-iteration total of unconsolidated sand sediment eroded during deposition of cliff collap...
double dGetPreExistingConsCoarse(void) const
Get the value of pre-existing consolidated coarse sediment stored on this polygon.
double dGetSedimentInputUnconsCoarse(void) const
Get the value of coarse sediment on the polygon derived from sediment input events(s)
int nGetDownCoastProfile(void) const
Return the number of the down-coast profile.
Geometry class used to represent coast profile objects.
int nGetProfileID(void) const
Returns the profile's this-coast ID.
double m_dThisIterPotentialBeachErosion
Total potential beach erosion (all size classes of unconsolidated sediment) for this iteration (depth...
double m_dCliffDepositionPlanviewWidth
Planview width of cliff collapse talus (m)
int m_nLogFileDetail
The level of detail in the log file output. Can be LOG_FILE_LOW_DETAIL, LOG_FILE_MIDDLE_DETAIL,...
string m_strGDALISSDriverCode
GDAL code for the initial suspended sediment raster file.
vector< string > m_VstrInitialSandConsSedimentFile
The name of the initial sand-sized consolidated sediment GIS file.
double m_dAllCellsDeepWaterWaveHeight
Deep water wave height (m) for all sea cells.
int m_nGISMaxSaveDigits
The maximum number of digits in GIS filenames. These can be sequential, or the iteration number.
string m_strGDALISSProjection
GDAL projection string for the initial suspended sediment raster file.
string m_strInitialSuspSedimentFile
Name of initial suspended sediment file.
void WritePolygonShorePlatformErosion(void)
Writes to the log file a table showing per-polygon unconsolidated sand/coarse sediment derived from e...
string m_strSedimentInputEventFile
The name of the sediment input events time series file.
bool m_bHaveConsolidatedSediment
Does this simulation consider consolidated sediment, or is it an unconsolidated sediment only simulat...
bool m_bFloodSWLSetupSurgeLine
Are we saving the flood still water level setup surge line? TODO 007 Finish surge and runup stuff.
time_t m_tSysEndTime
System finish-simulation time.
string m_strCMEIni
Folder for the CME .ini file.
double m_dTotalCoarseUnconsInPolygons
Total coarse unconsolidated sediment in all polygons, before polygon-to-polygon movement (only cells ...
bool m_bSedimentInputAtPoint
Do we have sediment inputat a point?
double m_dG
Gravitational acceleration (m**2/sec)
vector< string > m_VstrInitialCoarseUnconsSedimentFile
The name of the initial coarse-sized unconsolidated sediment GIS file.
double m_dThisIterSWL
The still water level for this timestep (this includes tidal changes and any long-term SWL change)
string m_strGDALICDataType
GDAL data type of the initial intervention class raster file.
int m_nBeachErosionDepositionEquation
Which beach erosion-deposition equation is used. Possible values are UNCONS_SEDIMENT_EQUATION_CERC an...
ofstream CliffCollapseNetChangeTSStream
Cliff collapse net change (erosion - deposition) time series file output stream.
bool m_bBeachDepositionTSSave
Save the beach (unconsolidated sediment) deposition time series file?
bool bWritePerTimestepResults(void)
Write the results for this timestep to the .out file.
CGeomRasterGrid * m_pRasterGrid
Pointer to the raster grid object.
vector< string > m_VstrGDALICCDataType
GDAL data type for the initial consolidated coarse sediment GIS data.
int m_nXGridSize
The size of the grid in the x direction.
string strListRasterFiles(void) const
Return a space-separated string containing the names of the raster GIS output files.
double m_dWaveDataWrapHours
Number of hours after which deep water wave data wraps.
string strListVectorFiles(void) const
Return a space-separated string containing the names of the vector GIS output files.
vector< string > m_VstrGDALICFDataType
GDAL data type for the initial consolidated fine sediment GIS data.
double m_dMaxUserInputWavePeriod
Used to constrain depth of closure.
void WritePolygonInfoTable(void)
Writes to the log file a table showing polygon info for all coasts.
bool m_bFloodSetupSurgeRunupTSSave
Save the flood setup surge runup time series file? TODO 007 Finish surge and runup stuff.
int nWriteEndRunDetails(void)
Writes end-of-run information to Out, Log and time-series files.
vector< string > m_VstrGDALICCDriverCode
GDAL driver code for the initial consolidated coarse sediment GIS data.
double m_dThisIterBeachErosionCoarse
Total actual beach erosion (coarse unconsolidated sediment) for this iteration (depth in m)
double m_dStartIterUnconsCoarseAllCells
Depth (m) of coarse unconsolidated sediment at the start of the simulation, all cells (both inside an...
vector< CRWCoast > m_VCoast
The coastline objects.
double m_dCoastNormalLength
Length of the coastline-normal profiles, in m.
static string pstrChangeToForwardSlash(string const *)
Swaps all backslashes in the input string to forward slashes, leaving the original unchanged.
vector< string > m_VstrGDALIUFDataType
GDAL data type for the initial unconsolidated fine sediment GIS data.
bool m_bSaveGISThisIter
Save GIS files this iteration?
long double m_ldGTotCliffCollapseCoarseErodedDuringDeposition
All-simulation total of coarse sediment eroded during talus deposition following cliff collapse (m)
double m_dUnconsCoarseNotDepositedLastIter
Depth of unconsolidated coarse sediment that could not be deposited during the last iteration,...
string m_strOGRSedInputDataType
GDAL data type for the sediment input event locations vector file.
bool bSaveAllVectorGISFiles(void)
The bSaveAllvectorGISFiles member function saves the vector GIS files TODO 081 Choose more files to o...
bool m_bSingleDeepWaterWaveValues
Do we have just a point source for (i.e. only a single measurement of) deep water wave values.
string m_strRunName
The name of this simulation.
static string strGetComputerName(void)
Returns a string, hopefully giving the name of the computer on which the simulation is running.
static string strDispSimTime(double const)
strDispSimTime returns a string formatted as year Julian_day hour, given a parameter in hours
double m_dSouthEastXExtCRS
The south-east x coordinate, in the external coordinate reference system (CRS)
long double m_ldGTotActualCoarseBeachErosion
All-simulation total of coarse sediment eroded during beach (unconsolidated sediment) movement (m)
double m_dThisIterCliffCollapseFineErodedDuringDeposition
Total fine sediment eroded during Dean profile deposition of talus following cliff collapse (depth in...
double m_dThisIterDiffWaveSetupSurgeWaterLevel
TODO 007 Finish surge and runup stuff.
double m_dThisIterActualPlatformErosionCoarseCons
Total actual platform erosion (coarse consolidated sediment) for this iteration (depth in m)
int m_nNumThisIterCliffCollapse
The number of cells with cliff collapse this iteration.
int m_nYGridSize
The size of the grid in the y direction.
vector< double > m_VdErosionPotential
For erosion potential lookup.
vector< string > m_VstrGDALIUFProjection
GDAL projection for the initial unconsolidated fine sediment GIS data.
long double m_ldGTotCliffTalusFineToSuspension
All-simulation total of fine sediment moved to suspension, due to cliff collapse (m)
int nSaveParProfile(int const, CGeomProfile const *, int const, int const, int const, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< CGeom2DIPoint > *const, vector< double > const *) const
Save a coastline-normal parallel profile.
string m_strSedimentInputEventShapefile
The name of the sediment input events shape file.
double m_dCoarseErodibility
The relative erodibility (0-1) of coarse unconsolidated beach sediment.
double m_dMaxSWLSoFar
Maximum still water level (m)
double m_dCliffTalusMinDepositionLength
Planview length of cliff deposition talus (m)
string m_strVectorGISOutFormat
Vector GIS output format.
vector< string > m_VstrGDALICFDriverCode
GDAL driver code for the initial consolidated fine sediment GIS data.
vector< string > m_VstrInitialFineConsSedimentFile
The name of the initial fine-sized consolidated sediment GIS file.
double m_dNotchIncisionAtCollapse
Notch overhang (i.e. length of horizontal incision at the apex elevation) to initiate collapse (m)
int m_nUnconsSedimentHandlingAtGridEdges
How sediment which moves off an edge of the grid is handled. Possible values are GRID_EDGE_CLOSED,...
double m_dSandErodibility
The relative erodibility (0-1) of sand unconsolidated beach sediment.
int m_nSimStartHour
Start time of the simulation (hours)
string m_strGDALLDriverCode
GDAL code for the for the initial landform class raster file.
bool m_bSuspSedTSSave
Save the suspended sediment time series file?
string m_strDeepWaterWaveStationsShapefile
The name of the deep water wave stations shape file.
vector< double > m_VdDepthOverDB
For erosion potential lookup.
bool m_bCliffCollapseNetTSSave
Save the cliff collapse net change time series file?
double m_dStartIterSuspFineInPolygons
Depth (m) of fine suspended sediment at the start of the simulation (only cells in polygons)
unsigned long m_ulThisIterNumCoastCells
The number of grid cells which are marked as coast, for this iteration.
vector< string > m_VstrGDALICSDriverCode
GDAL driver code for the initial consolidated sand sediment GIS data.
unsigned long m_ulNumCells
The number of cells in the grid.
double m_dTotPotentialPlatformErosionBetweenProfiles
Total potential platform erosion between profiles.
bool m_bFloodLocationSave
Are we saving the flood location? TODO 007 Finish surge and runup stuff.
double m_dWaveDepthRatioForWaveCalcs
Start depth for wave calculations.
string m_strGDALISSDataType
GDAL data type for the initial suspended sediment raster file.
void WriteStartRunDetails(void)
Writes beginning-of-run information to Out and Log files.
double m_dThisIterCliffCollapseErosionCoarseUncons
This-iteration total of coarse unconsolidated sediment produced by cliff collapse (m^3)
vector< string > m_VstrGDALIUCProjection
GDAL projection for the initial unconsolidated coarse sediment GIS data.
ofstream CliffCollapseDepositionTSStream
Cliff collapse deposition time series file output stream.
string m_strGDALLDataType
GDAL data type for the initial landform class raster file.
long double m_ldGTotCoarseBeachDeposition
All-simulation total of coarse sediment deposited during beach (unconsolidated sediment) movement (m)
double m_dDepositionCoarseDiff
Error term: if we are unable to deposit enough unconslidated coarse on polygon(s),...
double m_dBeachSedimentPorosity
The porosity of unconsolidated beach sediment (0-1)
int m_nSimStartSec
Start time of the simulation (seconds)
int m_nSimStartDay
Start date of the simulation (day)
bool m_bGDALOptimisations
GDAL optimisations enabled?
unsigned long m_ulThisIterNumActualPlatformErosionCells
The number of grid cells on which actual platform erosion occurs, for this iteration.
bool m_bActualPlatformErosionTSSave
Save the actual (supply-limited) shore platform erosion time series file?
string m_strOGRFloodGeometry
GDAL geometry for the flood input locations point or vector file.
long double m_ldGTotPotentialSedLostBeachErosion
All-simulation total of potential sediment lost via beach (unconsolidated) sediment movement (m),...
double m_dThisIterCliffCollapseErosionFineUncons
This-iteration total of fine unconsolidated sediment produced by cliff collapse (m^3)
bool m_bDoShorePlatformErosion
Simulate shore platform erosion?
bool m_bSliceSave
Save slices?
double m_dInitialMeanSWL
The start-of-simulation still water level (m)
string m_strOGRDWWVDriverCode
GDAL code for the deep water wave stations vector file.
double m_dThisIterNewNotchApexElev
Elevation (m) of the apex of any cliff notches created during this iteration.
double m_dNorthWestYExtCRS
The north-west y coordinate, in the external coordinate reference system (CRS)
vector< string > m_VstrGDALICSDriverDesc
GDAL driver description for the initial consolidated sand sediment GIS data.
bool m_bSaveRegular
Save GIS files at regular intervals?
int m_nLayers
The number of sediment layers.
double m_dStartIterConsCoarseAllCells
Depth (m) of coarse consolidated sediment at the start of the simulation, all cells (both inside and ...
double m_dStartIterConsSandAllCells
Depth (m) of sand consolidated sediment at the start of the simulation, all cells (both inside and ou...
int m_nCoastSmoothingWindowSize
The size of the window used for coast smoothing. Must be an odd number.
bool m_bSedimentInputAlongLine
Do we have sediment input along a line?
bool m_bSedimentInput
Do we have sediment input events?
bool m_bFloodSWLSetupSurgeRunupLineSave
Are we saving the flood still water level setup surge runup line? TODO 007 Finish surge and runup stu...
unsigned long m_ulThisIterNumBeachDepositionCells
The number of grid cells on which beach (unconsolidated sediment) deposition occurs,...
double m_dDepositionSandDiff
Error term: if we are unable to deposit enough unconslidated sand on polygon(s), this is held over to...
string m_strGDALBasementDEMDriverCode
GDAL code for the basement DEM raster file type.
vector< string > m_VstrGDALIUFDriverCode
GDAL driver code for the initial unconsolidated fine sediment GIS data.
void WritePolygonSortedSequence(vector< vector< vector< int > > > &)
Writes to the log file a table showing the sorted sequence of polygon processing for all coasts,...
int nSaveProfile(int const, CGeomProfile const *, int const, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< CGeom2DIPoint > *const, vector< double > const *) const
Save a coastline-normal profile.
void WritePolygonSedimentBeforeMovement(void)
Writes to the log file a table showing per-polygon totals of stored unconsolidated beach sediment pri...
double m_dThisiterUnconsCoarseInput
Depth (m) of coarse unconsolidated sediment added, at this iteration.
int m_nUSave
If user-defined GIS save intervals, the number of these.
double m_dThisIterPotentialPlatformErosion
Total potential platform erosion (all size classes of consolidated sediment) for this iteration (dept...
bool bWriteTSFiles(void)
Write the results for this timestep to the time series CSV files.
double m_dDeanProfileStartAboveSWL
Berm height i.e. height above SWL of start of depositional Dean profile.
int m_nSavGolCoastPoly
The order of the coastline profile smoothing polynomial if Savitzky-Golay smoothing is used (usually ...
ofstream BeachDepositionTSStream
Beach sediment deposition time series file output stream.
string m_strInitialBasementDEMFile
Name of initial basement DEM file.
int m_nRunUpEquation
The run-up equation used TODO 007 Finish surge and runup stuff.
long double m_ldGTotCliffCollapseFine
All-simulation total of fine sediment from cliff collapse (m)
bool m_bWorldFile
Write a GIS World file?
long double m_ldGTotCliffTalusCoarseDeposition
All-simulation total of coarse sediment deposited as talus following cliff collapse (m)
string m_strLogFile
Name of output log file.
double m_dDepthOverDBMax
Maximum value of deoth over DB, is used in erosion potential look-up function.
long double m_ldGTotCliffCollapseCoarse
All-simulation total of coarse sediment from cliff collapse (m)
double m_dFineErodibility
The relative erodibility (0-1) of fine unconsolidated beach sediment.
double m_dThisiterUnconsFineInput
Depth (m) of fine unconsolidated sediment added, at this iteration.
time_t m_tSysStartTime
System start-simulation time.
double m_dCoastNormalSpacing
Average spacing of the coastline-normal profiles, in m.
double m_dSeaWaterDensity
Density of sea water in kg/m**3.
long double m_ldGTotSuspendedSediment
All-simulation total of suspended sediment (m)
double m_dR
Coast platform resistance to erosion R, see Walkden & Hall, 2011.
void WritePolygonSedimentInputEventTable(void)
Writes to the log file a table showing per-polygon sediment input event totals for all coasts.
string m_strGDALLProjection
GDAL projection string for the initial landform class raster file.
vector< string > m_VstrInitialSandUnconsSedimentFile
The name of the initial sand-sized unconsolidated sediment GIS file.
double m_dThisIterActualPlatformErosionSandCons
Total actual platform erosion (sand consolidated sediment) for this iteration (depth in m)
bool m_bOmitSearchWestEdge
Omit the west edge of the grid from coast-end searches?
string m_strGDALIHProjection
GDAL projection string for the initial intervention height raster file.
string m_strGDALICDriverDesc
GDAL description of the initial intervention class raster file.
bool m_bSedimentInputAtCoast
Do we have sediment input at the coast?
double m_dCliffErosionResistance
Resistance of cliff to notch erosion.
vector< string > m_VstrGDALIUSProjection
GDAL projection for the initial unconsolidated sand sediment GIS data.
double m_dThisIterBeachDepositionCoarse
Total beach deposition (coarse unconsolidated sediment) for this iteration (depth in m)
double dGridCentroidYToExtCRSY(int const) const
Given the integer Y-axis ordinate of a cell in the raster grid CRS, returns the external CRS Y-axis o...
double m_dD50Sand
The D50 for sand sediment.
void WritePolygonPreExistingSedimentTable(void)
Writes to the log file a table showing per-polygon pre-existing unconsolidated sediment for all coast...
long double m_ldGTotCliffTalusSandDeposition
All-simulation total of sand sediment deposited as talus following cliff collapse (m)
vector< int > m_VnProfileToSave
The numbers of the profiles which are to be saved.
double m_dKLS
Transport parameter KLS in the CERC equation.
ofstream BeachSedimentNetChangeTSStream
Beach sediment net change (erosion - deposition) time series file output stream.
string m_strOGRDWWVDriverDesc
int m_nWavePropagationModel
The wave propagation model used. Possible values are WAVE_MODEL_CSHORE and WAVE_MODEL_COVE.
long double m_ldGTotCliffCollapseSandErodedDuringDeposition
All-simulation total of sand sediment eroded during talus deposition following cliff collapse (m)
double m_dAllCellsDeepWaterWaveAngle
Deep water wave angle for all sea cells.
vector< string > m_VstrGDALICFProjection
GDAL projection for the initial consolidated fine sediment GIS data.
string m_strOGRFloodDriverCode
GDAL code for the flood input locations point or vector file.
double m_dSimElapsed
Time simulated so far, in hours.
vector< string > m_VstrGDALICCProjection
GDAL projection for the initial consolidated coarse sediment GIS data.
double m_dMinSWLSoFar
Minimum still water level (m)
bool bWriteProfileData(int const, CGeomProfile const *, int const, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< CGeom2DIPoint > *const, vector< double > const *) const
Writes values for a single profile, for checking purposes.
long double m_ldGTotCoarseSedimentInput
All-simulation total of coarse sediment input (m)
double m_dFinalMeanSWL
The end-of-simulation still water (m), is same as m_dInitialMeanSWL unless SWL changes.
bool bWriteParProfileData(int const, int const, int const, int const, int const, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *, vector< CGeom2DIPoint > *const, vector< double > const *) const
Writes values for a single parallel profile, for checking purposes.
double m_dThisIterUnconsCoarseCliffDeposition
This-iteration total of coarse unconsolidated sediment deposited due to cliff collapse (m^3)
bool bWritePerTimestepResultsCSV(void)
Write the results for this timestep to the .out file in CSV format.
bool m_bSWLTSSave
Save the SWL (still water level) time series file?
double m_dThisIterTotSeaDepth
Total sea depth (m) for this iteration.
double m_dTotPotentialPlatformErosionOnProfiles
Total potential platform erosion on profiles.
bool m_bOmitSearchNorthEdge
Omit the north edge of the grid from coast-end searches?
long double m_ldGTotCoarseActualPlatformErosion
All-simulation total of coarse sediment actual platform erosion (m)
long double m_ldGTotFineActualPlatformErosion
All-simulation total of fine sediment actual platform erosion (m)
double m_dThisIterUnconsSandCliffDeposition
This-iteration total of sand unconsolidated sediment deposited due to cliff collapse (m^3)
long double m_ldGTotSandSedimentInput
All-simulation total of sand sediment input (m)
string strListTSFiles(void) const
Return a space-separated string containing the names of the time series output files.
bool m_bFloodSetupSurgeTSSave
Save the flood setup surge time series file? TODO 007 Finish surge and runup stuff.
string m_strGDALLDriverDesc
GDAL description of the initial landform class raster file.
double m_dNorthWestXExtCRS
The north-west x coordinate, in the external coordinate reference system (CRS)
double m_dD50Coarse
The D50 for coarse sediment.
ofstream SWLTSStream
SWL time series file output stream.
vector< unsigned long > m_VulProfileTimestep
Timesteps at which to save profiles.
ofstream CliffCollapseErosionTSStream
Cliff collapse erosion time series file output stream.
double m_dThisIterPotentialSedLostBeachErosion
Total unconsolidated sediment from beach erosion (all size classes) lost from the grid this iteration...
double m_dSouthEastYExtCRS
The south-east y coordinate, in the external coordinate reference system (CRS)
string m_strFloodLocationShapefile
The name of the flood loction events shape file.
long double m_ldGTotCliffCollapseFineErodedDuringDeposition
All-simulation total of fine sediment eroded during talus deposition following cliff collapse (m)
long double m_ldGTotCoarseDepositionDiff
All-simulation total of shortfall in unconsolidated coarse sediment deposition (m,...
double m_dStartIterConsFineAllCells
Depth (m) of fine consolidated sediment at the start of the simulation, all cells (both inside and ou...
long double m_ldGTotActualCoarseLostBeachErosion
All-simulation total of coarse sediment lost via beach (unconsolidated) sediment movement (m)
bool m_bGISSaveDigitsSequential
Are the GIS save digits (which are part of each GIS file name) sequential, or are they the iteration ...
int m_nSimStartMonth
Start date of the simulation (month)
double m_dMinCliffTalusHeightFrac
Minimum height of the landward end of cliff collapse talus, as a fraction of cliff elevation.
double m_dThisIterBeachErosionSand
Total actual beach erosion (sand unconsolidated sediment) for this iteration (depth in m)
vector< string > m_VstrGDALIUSDriverDesc
GDAL driver description for the initial unconsolidated sand sediment GIS data.
vector< string > m_VstrInitialFineUnconsSedimentFile
The name of the initial fine-sized unconsolidated sediment GIS file.
double m_dThisIterFineSedimentToSuspension
Total fine unconsolidated sediment in suspension for this iteration (depth in m)
bool bWritePerTimestepResultsFixedWidth(void)
Write the results for this timestep to the .out file in fixed-width format.
double m_dThisIterBeachErosionFine
Total actual beach erosion (fine unconsolidated sediment) for this iteration (depth in m)
double m_dNotchApexAboveMHW
Distance of notch base below SWL (m)
double m_dThisIterCliffCollapseSandErodedDuringDeposition
Total sand sediment eroded during Dean profile deposition of talus following cliff collapse (depth in...
int m_nSimStartMin
Start time of the simulation (minutes)
bool bSaveAllRasterGISFiles(void)
The bSaveAllRasterGISFiles member function saves the raster GIS files using values from the RasterGri...
string m_strOGRDWWVGeometry
GDAL geometry for the deep water wave stations vector file.
unsigned long m_ulThisIterNumActualBeachErosionCells
The number of grid cells on which actual beach (unconsolidated sediment) erosion occurs,...
double m_dCliffDepositionA
Scale parameter A for cliff deposition (m^(1/3)), may be zero for auto-calculation.
string m_strDataPathName
Folder in which the CME data file is found.
string m_strOutPath
Path for all output files.
bool m_bBeachErosionTSSave
Save the beach (unconsolidated sediment) erosion time series file?
vector< string > m_VstrGDALICFDriverDesc
GDAL driver description for the initial consolidated fine sediment GIS data.
void WritePolygonUnsortedSequence(vector< vector< vector< int > > > &)
Writes to the log file a table showing the unsorted sequence of polygon processing for all coasts.
static string strGetBuild(void)
Returns the date and time on which the program was compiled.
string m_strTideDataFile
Name of tide data file.
vector< string > m_VstrGDALIUFDriverDesc
GDAL driver description for the initial unconsolidated fine sediment GIS data.
unsigned long m_ulThisIterNumPotentialPlatformErosionCells
The number of grid cells on which potential platform erosion occurs, for this iteration.
vector< string > m_VstrGDALIUSDataType
GDAL data type for the initial unconsolidated sand sediment GIS data.
double m_dStartIterUnconsSandAllCells
Depth (m) of sand unconsolidated sediment at the start of the simulation, all cells (both inside and ...
long double m_ldGTotActualSandLostBeachErosion
All-simulation total of sand sediment lost via beach (unconsolidated) sediment movement (m)
int m_nGISSave
The save number for GIS files (can be sequential, or the iteration number)
string m_strInterventionClassFile
Name of intervention class file.
long double m_ldGTotActualFineLostBeachErosion
All-simulation total of fine sediment lost via beach (unconsolidated) sediment movement (m)
string m_strGDALBasementDEMDataType
GDAL data type for the basement DEM raster file.
double m_dThisIterCliffCollapseErosionFineCons
This-iteration total of fine consolidated sediment produced by cliff collapse (m^3)
long double m_ldGTotCoarseSedLostCliffCollapse
All-simulation total of coarse sediment lost via cliff collapse (m)
double m_dCoastNormalInterventionSpacing
Average spacing of the coastline-normal profiles on interventions, in m.
long double m_ldGTotSandActualPlatformErosion
All-simulation total of sand sediment actual platform erosion (m)
int m_nSimStartYear
Start date of the simulation (year)
string m_strDeepWaterWavesInputFile
The name of the deep water wave stations time series file.
long double m_ldGTotSandSedLostCliffCollapse
All-simulation total of sand sediment lost via cliff collapse (m)
double m_dUnconsSandNotDepositedLastIter
Depth of unconsolidated sand sediment that could not be deposited during the last iteration,...
string m_strGDALICProjection
GDAL projection string for the initial intervention class raster file.
double m_dTotalCoarseConsInPolygons
Total coarse consolidated sediment in all polygons, before polygon-to-polygon movement (only cells in...
ofstream SeaAreaTSStream
Sea area time series file output stream.
unsigned long m_ulThisIterNumSeaCells
The number of grid cells which are marked as sea, for this iteration.
double m_dTotalSandUnconsInPolygons
Total sand unconsolidated sediment in all polygons, before polygon-to-polygon movement (only cells in...
bool m_bRiverineFlooding
Are we doing riverine flooding?
double m_dStartIterUnconsFineAllCells
Depth (m) of fine unconsolidated sediment at the start of the simulation, all cells (both inside and ...
double m_dThisIterMHWElev
This iteration's Mean High Water (MHW) elevation, calculated using a moving time window....
double m_dRegularSaveInterval
The interval between regular saves, in hours.
long double m_ldGTotActualFineBeachErosion
All-simulation total of fine sediment eroded during beach (unconsolidated sediment) movement (m)
string m_strGDALISSDriverDesc
GDAL description for the initial suspended sediment raster file.
unsigned long m_ulTotPotentialPlatformErosionOnProfiles
The number of cells on which on-profile average potential shore platform erosion occurs.
bool m_bCliffCollapseDepositionTSSave
Save the cliff collapse deposition time series file?
string m_strGDALRasterOutputDriverLongname
GDAL raster output driver long name.
vector< string > m_VstrGDALIUCDriverCode
GDAL driver code for the initial unconsolidated coarse sediment GIS data.
ofstream PlatformErosionTSStream
Shore platform erosion time series file output stream.
void DoEndOfTimestepTotals(void)
Update and print totals at the end of each timestep.
double m_dCellArea
Area of a cell (in external CRS units)
unsigned long m_ulTotPotentialPlatformErosionBetweenProfiles
The number of cells on which between-profile average potential shore platform erosion occurs.
void WritePolygonPotentialErosion(void)
Writes to the log file a table showing per-polygon potential erosion of all size classes of unconsoli...
double m_dCoastNormalRandSpacingFactor
Random factor for spacing of along-coast normals.
double m_dMaxUserInputWaveHeight
Maximum deep water wave height.
vector< double > m_VdSliceElev
Elevations for raster slice output.
bool m_bOutputConsolidatedProfileData
Output profile data?
ofstream CliffNotchElevTSStream
Cliff notch elevation time series file output stream.
string m_strOGRSedInputGeometry
GDAL geometry for the sediment input event locations vector file.
string m_strOGRSedInputDriverCode
GDAL code for the sediment input event locations vector file.
bool m_bDoBeachSedimentTransport
Simulate unconsolidated sediment (beach) transport?
unsigned long m_ulThisIterNumPotentialBeachErosionCells
The number of grid cells on which potential beach (unconsolidated sediment) erosion occurs,...
bool m_bCliffNotchElevTSSave
Save the cliff notch elevation time series file?
int m_nCoastSmooth
Which method to use for coast smoothing.
string m_strGDALBasementDEMDriverDesc
GDAL description of the basement DEM raster file type.
string m_strInitialLandformFile
Name of initial landform file.
string m_strInterventionHeightFile
Name of intervention height file.
double m_dThisIterCliffCollapseErosionSandCons
This-iteration total of sand consolidated sediment produced by cliff collapse (m^3)
bool m_bBeachSedimentChangeNetTSSave
Save the beach (unconsolidated sediment) net change time series file?
vector< string > m_VstrGDALICSDataType
GDAL data type for the initial consolidated sand sediment GIS data.
double m_dThisIterBeachDepositionSand
Total beach deposition (sand unconsolidated sediment) for this iteration (depth in m)
string m_strOGRFloodDriverDesc
bool m_bSeaAreaTSSave
Save the sea area time series file?
bool m_bScaleRasterOutput
Scale raster output?
vector< string > m_VstrGDALICSProjection
GDAL dprojection for the initial consolidated sand sediment GIS data.
void CalcProcessStats(void)
This calculates and displays process statistics.
void WriteLookUpData(void)
Output the erosion potential look-up values, for checking purposes.
double m_dThisIterLeftGridUnconsCoarse
Total coarse unconsolidated sediment lost from the grid this iteration (depth in m)
double m_dThisIterCliffCollapseErosionSandUncons
This-iteration total of sand unconsolidated sediment produced by cliff collapse (m^3)
string m_strOGRFloodDataType
GDAL data type for the flood input locations point or vector file.
double m_dD50Fine
The D50 for fine sediment.
unsigned long m_ulRandSeed[NUMBER_OF_RNGS]
A seed for each of the random number generators.
bool m_bOmitSearchSouthEdge
Omit the south edge of the grid from coast-end searches?
string m_strGDALBasementDEMProjection
GDAL projection string for the basement DEM raster file.
double m_dTotalSandConsInPolygons
Total sand consolidated sediment in all polygons, before polygon-to-polygon movement (only cells in p...
unsigned long m_ulIter
The number of the current iteration (time step)
double m_dBeachSedimentDensity
The density of unconsolidated beach sediment (kg/m**3)
double dGridCentroidXToExtCRSX(int const) const
Given the integer X-axis ordinate of a cell in the raster grid CRS, returns the external CRS X-axis o...
vector< string > m_VstrInitialCoarseConsSedimentFile
The name of the initial coarse-sized consolidated sediment GIS file.
string m_strOGRDWWVDataType
GDAL data type for the deep water wave stations vector file.
double dGetInterpolatedValue(vector< double > const *, vector< double > const *, double, bool)
double m_dSimDuration
Duration of simulation, in hours.
double m_dTotalFineUnconsInPolygons
Total fine unconsolidated sediment in all polygons, before polygon-to-polygon movement (only cells in...
string m_strGDALIHDriverCode
GDAL code for the initial intervention height raster file.
long double m_ldGTotSandDepositionDiff
All-simulation total of shortfall in unconsolidated sand sediment deposition (m, not currently used)
bool m_bCSVPerTimestepResults
Output per-timestep results in CSV format instead of fixed-width?
string m_strGDALICDriverCode
GDAL code for the initial intervention class raster file.
ofstream FloodSetupSurgeTSStream
Flood setup surge time series file output stream.
double m_dTotalFineConsInPolygons
Total fine consolidated sediment in all polygons, before polygon-to-polygon movement (only cells in p...
double m_dThisiterUnconsSandInput
Depth (m) of sand unconsolidated sediment added, at this iteration.
double m_dExtCRSGridArea
The area of the grid (in external CRS units)
double m_dThisIterDiffWaveSetupSurgeRunupWaterLevel
TODO 007 Finish surge and runup stuff.
double m_dCellSide
Length of a cell side (in external CRS units)
vector< string > m_VstrGDALIUCDriverDesc
GDAL driver description for the initial unconsolidated coarse sediment GIS data.
double m_dMaxBeachElevAboveSWL
Maximum elevation of beach above SWL (m)
long double m_ldGTotActualSandBeachErosion
All-simulation total of sand sediment eroded during beach (unconsolidated sediment) movement (m)
double m_dAllCellsDeepWaterWavePeriod
Deep water wave period for all sea cells.
double m_dThisIterCliffCollapseCoarseErodedDuringDeposition
Total coarse sediment eroded during Dean profile deposition of talus following cliff collapse (depth ...
long double m_ldGTotSandBeachDeposition
All-simulation total of sand sediment deposited during beach (unconsolidated sediment) movement (m)
double m_dUSaveTime[SAVEMAX]
Save time, in hours from the start of the simukation, if we are not saving regularly.
void WritePolygonCliffCollapseErosion(void)
Writes to the log file a table showing per-polygon per-polygon cliff collapse for all coasts.
double m_dThisIterActualPlatformErosionFineCons
Total actual platform erosion (fine consolidated sediment) for this iteration (depth in m)
long double m_ldGTotPotentialBeachErosion
All-simulation total of potential beach erosion (m), all size classes.
double m_dProfileMaxSlope
Maximum slope on coastline-normal profiles.
int m_nProfileSmoothWindow
The size of the window used for running-mean coast-normal profile smoothing (must be odd)
string m_strGDALIHDriverDesc
GDAL description for the initial intervention height raster file.
bool m_bDoCliffCollapse
Simulate cliff collapse?
double m_dThisIterCliffCollapseErosionCoarseCons
This-iteration total of coarse consolidated sediment produced by cliff collapse (m^3)
double m_dThisIterLeftGridUnconsSand
Total sand unconsolidated sediment lost from the grid this iteration (depth in m)
double m_dDepthOfClosure
Depth of closure (in m) TODO 007 can be calculated using Hallermeier, R.J. (1978) or Birkemeier (1985...
vector< string > m_VstrGDALICCDriverDesc
GDAL driver decription for the initial consolidated coarse sediment GIS data.
double m_dStartIterSuspFineAllCells
Depth (m) of fine suspended sediment at the start of the simulation, all cells (both inside and outsi...
string m_strOutFile
Name of main output file.
string m_strGDALIHDataType
GDAL data type for the initial intervention height raster file.
ofstream FineSedSuspensionTSStream
Fine sediment in suspension time series file output stream.
ofstream FloodSetupSurgeRunupTSStream
Flood setup surge runup time series file output stream.
bool m_bFloodSWLSetupLineSave
Are we saving the flood still water level setup line? TODO 007 Finish surge and runup stuff.
void WritePolygonActualMovement(vector< vector< vector< int > > > &)
Writes to the log file a table showing per-polygon actual movement of unconsolidated beach sediment f...
long double m_ldGTotFineSedimentInput
All-simulation total of fine sediment input (m)
double m_dThisIterMeanSWL
The mean still water level for this timestep (does not include tidal changes, but includes any long-t...
vector< string > m_VstrGDALIUCDataType
GDAL data type for the initial unconsolidated coarse sediment GIS data.
bool m_bCliffCollapseErosionTSSave
Save the cliff collapse erosion time series file?
long double m_ldGTotPotentialPlatformErosion
All-simulation total of potential platform erosion (m), all size classes.
ofstream BeachErosionTSStream
Beach sediment erosion time series file output stream.
long double m_ldGTotCliffCollapseSand
All-simulation total of sand sediment from cliff collapse (m)
ofstream OutStream
The main output file stream.
bool m_bOutputParallelProfileData
Output parallel profile data?
double m_dKamphuis
Transport parameter for the Kamphuis equation.
bool m_bOutputErosionPotentialData
Output erosion potential data?
bool m_bVectorWaveFloodLineSave
Are we saving the vector wave flood line? TODO 007 Finish surge and runup stuff.
vector< string > m_VstrGDALIUSDriverCode
GDAL driver code for the initial unconsolidated sand sediment GIS data.
bool m_bOmitSearchEastEdge
Omit the east edge of the grid from coast-end searches?
double m_dThisIterLeftGridUnconsFine
Total fine unconsolidated sediment lost from the grid this iteration (depth in m)
This file contains global definitions for CoastalME.
int const WAVE_MODEL_COVE
string const PER_ITER_HEAD
int const UNCONS_SEDIMENT_EQUATION_KAMPHUIS
int const LOG_FILE_LOW_DETAIL
int const RUNUP_EQUATION_NIELSEN_HANSLOW
int const RTN_ERR_PROFILE_WRITE
int const RTN_ERR_RASTER_FILE_WRITE
string const PER_ITER_CSV_HEAD
string const PER_ITER_HEAD4
double const DEPTH_OVER_DB_INCREMENT
int const WAVE_MODEL_CSHORE
int const RUNUP_EQUATION_MASE
string const PER_ITER_HEAD2
int const LOG_FILE_MIDDLE_DETAIL
bool bFPIsEqual(const T d1, const T d2, const T dEpsilon)
string const ENDHYDROLOGYHEAD
int const GRID_EDGE_CLOSED
int const GRID_EDGE_RECIRCULATE
double const MASS_BALANCE_TOLERANCE
string const ENDSEDIMENTHEAD
int const LOG_FILE_HIGH_DETAIL
string const PROGRAM_NAME
int const SMOOTH_SAVITZKY_GOLAY
string const PER_ITER_HEAD3
int const SMOOTH_RUNNING_MEAN
string const RUN_END_NOTICE
int const RTN_ERR_VECTOR_FILE_WRITE
string const PER_ITER_HEAD5
int const CSHOREARRAYOUTSIZE
The size of the arrays output by CShore. If this is changed, then must also set the same value on lin...
string const EROSION_POTENTIAL_LOOKUP_FILE
int const UNCONS_SEDIMENT_EQUATION_CERC
string const PER_ITER_HEAD1
int const RUNUP_EQUATION_STOCKDON
string const MASS_BALANCE_ERROR
int const RTN_ERR_TIMESERIES_FILE_WRITE
Contains CRWCoast definitions.
Contains CSimulation definitions.
string strLeft(const string &strIn, int const nWidth)
Left-aligns string within a field of given width, pads with blank spaces to enforce alignment....
string strDblRight(double const dX, int const nDigits, int const nWidth, bool const bShowDash)
Converts double to string with specified number of decimal places, within a field of given width,...
string strRightPerCent(double const d1, double const d2, int const nWidth, int const nDigits, bool const bShowDash)
Calculates a percentage from two numbers then, if the result is non-zero, right-aligns the result as ...
string strCentre(const char *pchIn, int const nWidth)
Centre-aligns char array within a field of given width, pads with blank spaces to enforce alignment....
string strRight(const string &strIn, int const nWidth)
Right-aligns string within a field of given width, pads with blank spaces to enforce alignment....
string strIntRight(int const nX, int const nWidth)
Converts int to string within a field of given width, pads with blank spaces to enforce alignment....