97 static bool bDownCoast =
true;
100 for (
int nCoast = 0; nCoast < static_cast<int>(
m_VCoast.size()); nCoast++)
102 int const nNumProfiles =
m_VCoast[nCoast].nGetNumProfiles();
105 for (
int nn = 0; nn < nNumProfiles; nn++)
110 pProfile =
m_VCoast[nCoast].pGetProfileWithDownCoastSeq(nn);
113 pProfile =
m_VCoast[nCoast].pGetProfileWithUpCoastSeq(nn);
122 for (
int nn = 0; nn < nNumProfiles - 1; nn++)
140 bDownCoast = ! bDownCoast;
153 if (
m_pRasterGrid->m_Cell[nX][nY].bPotentialPlatformErosion())
183 double const dDepthOfBreaking =
m_VCoast[nCoast].dGetDepthOfBreaking(nCoastPoint);
201 double const dBreakingWaveHeight =
m_VCoast[nCoast].dGetBreakingWaveHeight(nCoastPoint);
205 double dProfileLenXY = 0;
207 for (
int nSeg = 0; nSeg < nSegments; nSeg++)
215 double const dSegLen = hypot(dSegStartX - dSegEndX, dSegStartY - dSegEndY);
216 dProfileLenXY += dSegLen;
220 double const dSpacingXY = dProfileLenXY / (nProfSize - 1);
224 vector<double> VdProfileZ(nProfSize, 0);
225 vector<double> VdProfileDistXY(nProfSize, 0);
226 vector<double> dVConsProfileZ(nProfSize, 0);
227 vector<double> dVConsZDiff(nProfSize, 0);
228 vector<double> dVConsSlope(nProfSize, 0);
230 for (
int i = 0; i < nProfSize; i++)
236 int const nTopLayer =
m_pRasterGrid->m_Cell[nX][nY].nGetTopNonZeroLayerAboveBasement();
247 dVConsProfileZ[i] =
m_pRasterGrid->m_Cell[nX][nY].dGetConsSedTopForLayerAboveBasement(nTopLayer);
250 VdProfileZ[i] =
m_pRasterGrid->m_Cell[nX][nY].dGetSedimentTopElev();
253 VdProfileDistXY[i] = i * dSpacingXY;
256 for (
int i = 0; i < nProfSize - 1; i++)
259 dVConsZDiff[i] = dVConsProfileZ[i] - dVConsProfileZ[i + 1];
262 dVConsSlope[i] = dVConsZDiff[i] / dSpacingXY;
266 dVConsSlope[nProfSize - 1] = dVConsSlope[nProfSize - 2];
274 vector<double> dVProfileDepthOverDB(nProfSize, 0);
275 vector<double> dVProfileErosionPotential(nProfSize, 0);
278 double dTotalErosionPotential = 0;
280 for (
int i = 0; i < nProfSize; i++)
284 dVProfileDepthOverDB[i] /= dDepthOfBreaking;
287 dVProfileDepthOverDB[i] =
tMax(dVProfileDepthOverDB[i], 0.0);
295 dVProfileErosionPotential[i] = 0;
298 dTotalErosionPotential += dVProfileErosionPotential[i];
302 for (
int i = 0; i < nProfSize; i++)
304 if (dTotalErosionPotential < 0)
305 dVProfileErosionPotential[i] /= (-dTotalErosionPotential);
308 vector<double> dVRecessionXY(nProfSize, 0);
309 vector<double> dVSCAPEXY(nProfSize, 0);
312 for (
int i = 0; i < nProfSize; i++)
328 dVRecessionXY[i] =
tMin(
m_VCoast[nCoast].dGetWaveEnergyAtBreaking(nCoastPoint) * dVProfileErosionPotential[i] * dVConsSlope[i] /
m_dR, 0.0);
329 dVSCAPEXY[i] = VdProfileDistXY[i] - dVRecessionXY[i];
332 vector<double> dVChangeElevZ(nProfSize, 0);
335 for (
int i = 1; i < nProfSize - 1; i++)
338 double const dSCAPEHorizDist = dVSCAPEXY[i + 1] - dVSCAPEXY[i];
339 double const dSCAPEVertDist = dVConsProfileZ[i] - dVConsProfileZ[i + 1];
340 double const dSCAPESlope = dSCAPEVertDist / dSCAPEHorizDist;
341 double dDeltaZ = dVRecessionXY[i] * dSCAPESlope;
353 m_pRasterGrid->m_Cell[nX][nY].SetLocalConsSlope(dVConsSlope[i]);
359 double const dPrevPotentialErosion = -
m_pRasterGrid->m_Cell[nX][nY].dGetPotentialPlatformErosion();
361 if (dPrevPotentialErosion < 0)
365 dDeltaZ = ((dDeltaZ + dPrevPotentialErosion) / 2);
369 dDeltaZ =
tMax(dDeltaZ, -dVConsZDiff[i]);
370 dDeltaZ =
tMin(dDeltaZ, 0.0);
371 dVChangeElevZ[i] = dDeltaZ;
374 m_pRasterGrid->m_Cell[nX][nY].SetPotentialPlatformErosion(-dDeltaZ);
389 m_pRasterGrid->m_Cell[nX][nY].SetBeachProtectionFactor(dBeachProtectionFactor);
395 int const nRet =
nSaveProfile(nCoast, pProfile, nProfSize, &VdProfileDistXY, &dVConsProfileZ, &dVProfileDepthOverDB, &dVProfileErosionPotential, &dVConsSlope, &dVRecessionXY, &dVChangeElevZ, pProfile->
pPtiVGetCellsInProfile(), &dVSCAPEXY);
417 int const nCoastMax =
m_VCoast[nCoast].nGetCoastlineSize();
418 int nDistFromProfile = 0;
419 int nParCoastXLast = nProfileStartX;
420 int nParCoastYLast = nProfileStartY;
429 int nThisPointOnCoast = nCoastProfileStart;
432 nThisPointOnCoast += nDistFromProfile;
435 nThisPointOnCoast -= nDistFromProfile;
455 double dDepthOfBreaking =
m_VCoast[nCoast].dGetDepthOfBreaking(nThisPointOnCoast);
469 int const nParCoastX =
m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(nThisPointOnCoast)->nGetX();
470 int const nParCoastY =
m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(nThisPointOnCoast)->nGetY();
472 if ((nParCoastX == nParCoastXLast) && (nParCoastY == nParCoastYLast))
483 if (
m_pRasterGrid->m_Cell[nParCoastX][nParCoastY].bIsProfile())
490 double const dBreakingWaveHeight =
m_VCoast[nCoast].dGetBreakingWaveHeight(nThisPointOnCoast);
493 vector<CGeom2DIPoint> PtiVGridParProfile;
494 vector<CGeom2DPoint> PtVExtCRSParProfile;
498 int const nParProfSize =
static_cast<int>(PtiVGridParProfile.size());
501 if (nParProfSize < 3)
504 nParCoastXLast = nParCoastX;
505 nParCoastYLast = nParCoastY;
511 double const dParProfileLenXY =
dGetDistanceBetween(&PtVExtCRSParProfile[0], &PtVExtCRSParProfile[nParProfSize - 1]);
514 double dParSpacingXY = dParProfileLenXY / (nParProfSize - 1);
522 vector<double> dVParProfileZ(nParProfSize, 0);
523 vector<double> dVParProfileDistXY(nParProfSize, 0);
524 vector<double> dVParConsProfileZ(nParProfSize, 0);
525 vector<double> dVParConsZDiff(nParProfSize, 0);
526 vector<double> dVParConsSlope(nParProfSize, 0);
528 for (
int i = 0; i < nParProfSize; i++)
530 int const nXPar = PtiVGridParProfile[i].nGetX();
531 int const nYPar = PtiVGridParProfile[i].nGetY();
542 int const nPolyID =
m_pRasterGrid->m_Cell[nXPar][nYPar].nGetPolygonID();
552 int const nTopLayer =
m_pRasterGrid->m_Cell[nXPar][nYPar].nGetTopNonZeroLayerAboveBasement();
563 dVParConsProfileZ[i] =
m_pRasterGrid->m_Cell[nXPar][nYPar].dGetConsSedTopForLayerAboveBasement(nTopLayer);
566 dVParProfileZ[i] =
m_pRasterGrid->m_Cell[nXPar][nYPar].dGetSedimentTopElev();
569 dVParProfileDistXY[i] = i * dParSpacingXY;
572 for (
int i = 0; i < nParProfSize - 1; i++)
575 dVParConsZDiff[i] = dVParConsProfileZ[i] - dVParConsProfileZ[i + 1];
578 dVParConsSlope[i] = dVParConsZDiff[i] / dParSpacingXY;
582 dVParConsSlope[nParProfSize - 1] = dVParConsSlope[nParProfSize - 2];
591 vector<double> dVParProfileDepthOverDB(nParProfSize, 0);
592 vector<double> dVParProfileErosionPotential(nParProfSize, 0);
595 double dTotalErosionPotential = 0;
598 if (dDepthOfBreaking <= 0.0)
599 dDepthOfBreaking = 1e-10;
601 for (
int i = 0; i < nParProfSize; i++)
605 dVParProfileDepthOverDB[i] /= dDepthOfBreaking;
608 dVParProfileDepthOverDB[i] =
tMax(dVParProfileDepthOverDB[i], 0.0);
616 dVParProfileErosionPotential[i] = 0;
619 dTotalErosionPotential += dVParProfileErosionPotential[i];
623 for (
int i = 0; i < nParProfSize; i++)
625 if (dTotalErosionPotential < 0)
626 dVParProfileErosionPotential[i] /= (-dTotalErosionPotential);
629 vector<double> dVParRecessionXY(nParProfSize, 0);
630 vector<double> dVParSCAPEXY(nParProfSize, 0);
633 for (
int i = 0; i < nParProfSize; i++)
651 dVParRecessionXY[i] =
tMin(
m_VCoast[nCoast].dGetWaveEnergyAtBreaking(nThisPointOnCoast) * dVParProfileErosionPotential[i] * dVParConsSlope[i] /
m_dR, 0.0);
652 dVParSCAPEXY[i] = dVParProfileDistXY[i] - dVParRecessionXY[i];
657 vector<double> dVParDeltaZ(nParProfSize, 0);
660 for (
int i = 1; i < nParProfSize - 1; i++)
663 double const dSCAPEHorizDist = dVParSCAPEXY[i + 1] - dVParSCAPEXY[i];
669 double const dSCAPEVertDist = dVParConsProfileZ[i] - dVParConsProfileZ[i + 1];
670 double const dSCAPESlope = dSCAPEVertDist / dSCAPEHorizDist;
671 double dDeltaZ = dVParRecessionXY[i] * dSCAPESlope;
679 int const nXPar = PtiVGridParProfile[i].nGetX();
680 int const nYPar = PtiVGridParProfile[i].nGetY();
683 m_pRasterGrid->m_Cell[nXPar][nYPar].SetLocalConsSlope(dVParConsSlope[i]);
689 if (
m_pRasterGrid->m_Cell[nXPar][nYPar].bPotentialPlatformErosion())
692 double const dPrevPotentialErosion = -
m_pRasterGrid->m_Cell[nXPar][nYPar].dGetPotentialPlatformErosion();
697 dDeltaZ =
tMin(dPrevPotentialErosion, dDeltaZ);
711 dDeltaZ =
tMax(dDeltaZ, -dVParConsZDiff[i]);
712 dDeltaZ =
tMin(dDeltaZ, 0.0);
713 dVParDeltaZ[i] = dDeltaZ;
716 m_pRasterGrid->m_Cell[nXPar][nYPar].SetPotentialPlatformErosion(-dDeltaZ);
732 m_pRasterGrid->m_Cell[nXPar][nYPar].SetBeachProtectionFactor(dBeachProtectionFactor);
738 int const nRet =
nSaveParProfile(nCoast, pProfile, nParProfSize, nDirection, nDistFromProfile, &dVParProfileDistXY, &dVParConsProfileZ, &dVParProfileDepthOverDB, &dVParProfileErosionPotential, &dVParConsSlope, &dVParRecessionXY, &dVParDeltaZ, pProfile->
pPtiVGetCellsInProfile(), &dVParSCAPEXY);
745 nParCoastXLast = nParCoastX;
746 nParCoastYLast = nParCoastY;
760 double const dBeachProtectionFactor =
m_pRasterGrid->m_Cell[nX][nY].dGetBeachProtectionFactor();
767 double const dThisPotentialErosion =
m_pRasterGrid->m_Cell[nX][nY].dGetPotentialPlatformErosion() * dBeachProtectionFactor;
770 int const nThisLayer =
m_pRasterGrid->m_Cell[nX][nY].nGetTopNonZeroLayerAboveBasement();
775 cerr <<
ERR <<
"no sediment layer in DoActualPlatformErosionOnCell()" << endl;
784 double const dExistingAvailableFine =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nThisLayer)->pGetConsolidatedSediment()->dGetFineDepth();
785 double const dExistingAvailableSand =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nThisLayer)->pGetConsolidatedSediment()->dGetSandDepth();
786 double const dExistingAvailableCoarse =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nThisLayer)->pGetConsolidatedSediment()->dGetCoarseDepth();
789 int const nFineWeight = (dExistingAvailableFine > 0 ? 1 : 0);
790 int const nSandWeight = (dExistingAvailableSand > 0 ? 1 : 0);
791 int const nCoarseWeight = (dExistingAvailableCoarse > 0 ? 1 : 0);
794 double dTotActualErosion = 0;
795 double dSandEroded = 0;
796 double dCoarseEroded = 0;
804 double const dFineEroded =
tMin(dExistingAvailableFine, dFineLowering);
805 double const dRemaining = dExistingAvailableFine - dFineEroded;
807 dTotActualErosion += dFineEroded;
810 m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nThisLayer)->pGetConsolidatedSediment()->SetFineDepth(dRemaining);
826 dSandEroded =
tMin(dExistingAvailableSand, dSandLowering);
827 double const dRemaining = dExistingAvailableSand - dSandEroded;
829 dTotActualErosion += dSandEroded;
832 m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nThisLayer)->pGetConsolidatedSediment()->SetSandDepth(dRemaining);
835 m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nThisLayer)->pGetUnconsolidatedSediment()->AddSandDepth(dSandEroded);
850 dCoarseEroded =
tMin(dExistingAvailableCoarse, dCoarseLowering);
851 double const dRemaining = dExistingAvailableCoarse - dCoarseEroded;
853 dTotActualErosion += dCoarseEroded;
856 m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nThisLayer)->pGetConsolidatedSediment()->SetCoarseDepth(dRemaining);
859 m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nThisLayer)->pGetUnconsolidatedSediment()->AddCoarseDepth(dCoarseEroded);
869 if (dTotActualErosion > 0)
872 m_pRasterGrid->m_Cell[nX][nY].SetActualPlatformErosion(dTotActualErosion);
890 shuffle(nDirection.begin(), nDirection.end(),
m_Rand[0]);
892 for (
int n = 0; n < 8; n++)
897 if (nDirection[n] ==
NORTH)
904 nPolyID =
m_pRasterGrid->m_Cell[nXAdj][nYAdj].nGetPolygonID();
918 nPolyID =
m_pRasterGrid->m_Cell[nXAdj][nYAdj].nGetPolygonID();
925 else if (nDirection[n] ==
EAST)
932 nPolyID =
m_pRasterGrid->m_Cell[nXAdj][nYAdj].nGetPolygonID();
946 nPolyID =
m_pRasterGrid->m_Cell[nXAdj][nYAdj].nGetPolygonID();
953 else if (nDirection[n] ==
SOUTH)
960 nPolyID =
m_pRasterGrid->m_Cell[nXAdj][nYAdj].nGetPolygonID();
974 nPolyID =
m_pRasterGrid->m_Cell[nXAdj][nYAdj].nGetPolygonID();
981 else if (nDirection[n] ==
WEST)
988 nPolyID =
m_pRasterGrid->m_Cell[nXAdj][nYAdj].nGetPolygonID();
1000 if ((nXAdj >= 0) && (nYAdj >= 0))
1002 nPolyID =
m_pRasterGrid->m_Cell[nXAdj][nYAdj].nGetPolygonID();
1039 vector<double> VdDepthOverDB;
1040 double dTempDOverDB = 0;
1042 while (dTempDOverDB <= 1.1)
1044 VdDepthOverDB.push_back(dTempDOverDB);
1050 int const nSize =
static_cast<int>(VdDepthOverDB.size());
1051 vector<double> VdDeriv(nSize, 0);
1052 vector<double> VdDeriv2(nSize, 0.);
1053 vector<double> VdDeriv3(nSize, 0.);
1056 hermite_cubic_spline_value(
static_cast<int>(VdDepthOverDBIn->size()), &(VdDepthOverDBIn->at(0)), &(VdErosionPotentialIn->at(0)), &(VdErosionPotentialFirstDerivIn->at(0)), nSize, &(VdDepthOverDB[0]), &(
m_VdErosionPotential[0]), &(VdDeriv[0]), &(VdDeriv2[0]), &(VdDeriv3[0]));
1061 for (
int n = 1; n < nSize - 1; n++)
1096 return dErosionPotential;
1109 int const nThisLayer =
m_pRasterGrid->m_Cell[nX][nY].nGetTopNonZeroLayerAboveBasement();
1114 cerr <<
ERR <<
"no sediment layer in dCalcBeachProtectionFactor()" << endl;
1123 double const dBeachDepth =
m_pRasterGrid->m_Cell[nX][nY].pGetLayerAboveBasement(nThisLayer)->dGetUnconsolidatedThickness();
1127 if (dMaxPenetrationDepth > 0)
1128 dFactor =
tMax(1 - (dBeachDepth / dMaxPenetrationDepth), 0.0);
1150 double dBeachProtection = 0;
1159 dBeachProtection +=
m_pRasterGrid->m_Cell[nXTmp][nYTmp].dGetBeachProtectionFactor();
1169 dBeachProtection +=
m_pRasterGrid->m_Cell[nXTmp][nYTmp].dGetBeachProtectionFactor();
1179 dBeachProtection +=
m_pRasterGrid->m_Cell[nXTmp][nYTmp].dGetBeachProtectionFactor();
1189 dBeachProtection +=
m_pRasterGrid->m_Cell[nXTmp][nYTmp].dGetBeachProtectionFactor();
1195 m_pRasterGrid->m_Cell[nX][nY].SetBeachProtectionFactor(dBeachProtection / 4);
1217 double dPotentialPlatformErosion = 0;
1226 dPotentialPlatformErosion +=
m_pRasterGrid->m_Cell[nXTmp][nYTmp].dGetPotentialPlatformErosion();
1236 dPotentialPlatformErosion +=
m_pRasterGrid->m_Cell[nXTmp][nYTmp].dGetPotentialPlatformErosion();
1246 dPotentialPlatformErosion +=
m_pRasterGrid->m_Cell[nXTmp][nYTmp].dGetPotentialPlatformErosion();
1256 dPotentialPlatformErosion +=
m_pRasterGrid->m_Cell[nXTmp][nYTmp].dGetPotentialPlatformErosion();
1262 double const dThisPotentialPlatformErosion = dPotentialPlatformErosion / 4;
1264 m_pRasterGrid->m_Cell[nX][nY].SetPotentialPlatformErosion(dThisPotentialPlatformErosion);
1283void CSimulation::ConstructParallelProfile(
int const nProfileStartX,
int const nProfileStartY,
int const nParCoastX,
int const nParCoastY,
int const nProfSize, vector<CGeom2DIPoint> *
const pPtViGridProfile, vector<CGeom2DIPoint> *pPtiVGridParProfile, vector<CGeom2DPoint> *pPtVExtCRSParProfile)
1286 int const nXOffset = nParCoastX - nProfileStartX;
1287 int const nYOffset = nParCoastY - nProfileStartY;
1290 for (
int nProfileStartPoint = 0; nProfileStartPoint < nProfSize; nProfileStartPoint++)
1293 int const nXProf = pPtViGridProfile->at(nProfileStartPoint).nGetX();
1294 int const nYProf = pPtViGridProfile->at(nProfileStartPoint).nGetY();
1297 int const nXPar = nXProf + nXOffset;
1298 int const nYPar = nYProf + nYOffset;
1315 pPtiVGridParProfile->push_back(
CGeom2DIPoint(nXPar, nYPar));
Contains CGeom2DIPoint definitions.
Geometry class used to represent 2D point objects with integer coordinates.
Geometry class used to represent 2D point objects with floating-point coordinates.
double dGetY(void) const
Returns the CGeom2DPoint object's double Y coordinate.
double dGetX(void) const
Returns the CGeom2DPoint object's double X coordinate.
Geometry class used to represent coast profile objects.
int nGetProfileID(void) const
Returns the profile's this-coast ID.
int nGetCoastPoint(void) const
Returns the coast point at which the profile starts.
int nGetNumCellsInProfile(void) const
Returns the number of cells in the profile.
CGeom2DPoint * pPtGetPointInProfile(int const)
Returns a single point (external CRS) from the profile.
bool bOKIncStartAndEndOfCoast(void) const
Returns true if this is a problem-free profile (however it could be a start-of-coast or an end-of-coa...
int nGetProfileSize(void) const
Returns the number of external CRS points in the profile (only two, initally; and always just two for...
vector< CGeom2DIPoint > * pPtiVGetCellsInProfile(void)
Returns all cells (grid CRS) in the profile.
int m_nLogFileDetail
The level of detail in the log file output. Can be LOG_FILE_LOW_DETAIL, LOG_FILE_MIDDLE_DETAIL,...
double m_dThisIterSWL
The still water level for this timestep (this includes tidal changes and any long-term SWL change)
CGeomRasterGrid * m_pRasterGrid
Pointer to the raster grid object.
int m_nXGridSize
The size of the grid in the x direction.
vector< CRWCoast > m_VCoast
The coastline objects.
double m_dFineErodibilityNormalized
Relative erodibility of fine unconsolidated beach sediment, normalized.
double m_dThisIterActualPlatformErosionCoarseCons
Total actual platform erosion (coarse consolidated sediment) for this iteration (depth in m)
int nDoAllShorePlatFormErosion(void)
Does platform erosion on all coastlines by first calculating platform erosion on coastline-normal pro...
int m_nYGridSize
The size of the grid in the y direction.
vector< double > m_VdErosionPotential
For erosion potential lookup.
void ConstructParallelProfile(int const, int const, int const, int const, int const, vector< CGeom2DIPoint > *const, vector< CGeom2DIPoint > *, vector< CGeom2DPoint > *)
Constructs a parallel coastline-normal profile.
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.
static double dGetDistanceBetween(CGeom2DPoint const *, CGeom2DPoint const *)
Returns the distance (in external CRS) between two points.
double m_dCoarseErodibilityNormalized
Relative erodibility of coarse unconsolidated beach sediment, normalized.
vector< double > m_VdDepthOverDB
For erosion potential lookup.
void FillInBeachProtectionHoles(void)
Fills in 'holes' in the beach protection i.e. orphan cells which get omitted because of rounding prob...
double m_dTotPotentialPlatformErosionBetweenProfiles
Total potential platform erosion between profiles.
double m_dDepositionCoarseDiff
Error term: if we are unable to deposit enough unconslidated coarse on polygon(s),...
unsigned long m_ulThisIterNumActualPlatformErosionCells
The number of grid cells on which actual platform erosion occurs, for this iteration.
int nCalcPotentialPlatformErosionBetweenProfiles(int const, CGeomProfile *, int const)
Calculates potential platform erosion on cells to one side of a given coastline-normal profile,...
double m_dDepositionSandDiff
Error term: if we are unable to deposit enough unconslidated sand on polygon(s), this is held over to...
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.
double m_dThisIterPotentialPlatformErosion
Total potential platform erosion (all size classes of consolidated sediment) for this iteration (dept...
vector< double > dVSmoothProfileSlope(vector< double > *) const
Does running-mean smoothing of the slope of a coastline-normal profile.
double m_dDepthOverDBMax
Maximum value of deoth over DB, is used in erosion potential look-up function.
double m_dSandErodibilityNormalized
Relative erodibility of sand unconsolidated beach sediment, normalized.
double m_dR
Coast platform resistance to erosion R, see Walkden & Hall, 2011.
double m_dThisIterActualPlatformErosionSandCons
Total actual platform erosion (sand consolidated 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_dTotPotentialPlatformErosionOnProfiles
Total potential platform erosion on profiles.
int nCalcPotentialPlatformErosionOnProfile(int const, CGeomProfile *)
Calculates potential (i.e. unconstrained by available sediment) erosional lowering of the shore platf...
void DoActualPlatformErosionOnCell(int const, int const)
Calculates actual (constrained by available sediment) erosion of the consolidated shore platform on a...
double m_dThisIterFineSedimentToSuspension
Total fine unconsolidated sediment in suspension for this iteration (depth in m)
void FillPotentialPlatformErosionHoles(void)
Fills in 'holes' in the potential platform erosion i.e. orphan cells which get omitted because of rou...
double dLookUpErosionPotential(double const)
The erosion potential lookup: it returns a value for erosion potential given a value of Depth Over DB...
unsigned long m_ulThisIterNumPotentialPlatformErosionCells
The number of grid cells on which potential platform erosion occurs, for this iteration.
default_random_engine m_Rand[NUMBER_OF_RNGS]
The c++11 random number generators.
unsigned long m_ulTotPotentialPlatformErosionOnProfiles
The number of cells on which on-profile average potential shore platform erosion occurs.
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.
bool bIsWithinValidGrid(int const, int const) const
unsigned long m_ulIter
The number of the current iteration (time step)
double dGridCentroidXToExtCRSX(int const) const
double dGetInterpolatedValue(vector< double > const *, vector< double > const *, double, bool)
double dCalcBeachProtectionFactor(int const, int const, double const)
Calculates the (inverse) beach protection factor as in SCAPE: 0 is fully protected,...
bool m_bOutputProfileData
Output profile data?
bool bCreateErosionPotentialLookUp(vector< double > *, vector< double > *, vector< double > *)
Creates a look-up table for erosion potential, given depth over DB.
double m_dThisIterActualPlatformErosionFineCons
Total actual platform erosion (fine consolidated sediment) for this iteration (depth in m)
int m_nProfileSmoothWindow
The size of the window used for running-mean coast-normal profile smoothing (must be odd)
vector< bool > m_bConsChangedThisIter
One element per layer: has the consolidated sediment of this layer been changed during this iteration...
bool m_bOutputParallelProfileData
Output parallel profile data?
vector< CGeomCoastPolygon * > m_pVCoastPolygon
Pointers to coast polygon objects, in down-coast sequence TODO 044 Will need to use global polygon ID...
This file contains global definitions for CoastalME.
int const NO_NONZERO_THICKNESS_LAYERS
int const RTN_ERR_NO_TOP_LAYER
int const DIRECTION_DOWNCOAST
double const DEPTH_OVER_DB_INCREMENT
int const LOG_FILE_MIDDLE_DETAIL
bool bFPIsEqual(const T d1, const T d2, const T dEpsilon)
int const LOG_FILE_HIGH_DETAIL
double const SEDIMENT_ELEV_TOLERANCE
int const DIRECTION_UPCOAST
double const BEACH_PROTECTION_HB_RATIO
Contains CRWCoast definitions.
void hermite_cubic_spline_value(int const nn, double *const xn, double *const fn, double *const dn, int const n, double *const x, double *f, double *d, double *s, double *t)
This is part of a C++ library from http://people.sc.fsu.edu/~jburkardt/cpp_src/hermite_cubic/hermite_...
Definitions of some routines from the hermite_cubic library.
Contains CSimulation definitions.