46using std::default_random_engine;
47using std::normal_distribution;
1525 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;
1526 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;
1527 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;
1528 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;
1565 int nTraceCoastLine(
unsigned int const,
int const,
int const, vector<bool>*, vector<CGeom2DIPoint>
const*);
1567 int nTraceFloodCoastLine(
unsigned int const,
int const,
int const, vector<bool>*, vector<CGeom2DIPoint>
const*);
1572 void LocateAndCreateProfiles(
int const,
int&,
int&,
int const, vector<bool>*, vector<pair<int, double>>
const*);
1583 static void CalcDeanProfile(vector<double>*,
double const,
double const,
double const,
bool const,
int const,
double const);
1584 static double dSubtractProfiles(vector<double>
const*, vector<double>
const*, vector<bool>
const*);
1588 void ConstructParallelProfile(
int const,
int const,
int const,
int const,
int const, vector<CGeom2DIPoint>*
const, vector<CGeom2DIPoint>*, vector<CGeom2DPoint>*);
1599 int nCreateCShoreInfile(
int const,
int const,
int const,
int const,
int const,
int const,
int const,
int const,
int const,
int const,
int const,
int const,
int const,
double const,
double const,
double const,
double const,
double const,
double const,
double const,
double const, vector<double>
const*, vector<double>
const*, vector<double>
const*);
1600 int nReadCShoreOutput(
int const,
string const*,
int const,
int const, vector<double>
const*, vector<double>*);
1601 void InterpolateCShoreOutput(vector<double>
const*,
int const,
int const, vector<double>*, vector<double>*, vector<double>*, vector<double>*, vector<double>*, vector<double>*, vector<double>*, vector<double>*, vector<double>*);
1626 int nDoParallelProfileUnconsErosion(
CGeomCoastPolygon*,
int const,
int const,
int const,
int const,
int const,
int const, vector<CGeom2DIPoint>
const*, vector<double>
const*,
double&,
double&,
double&);
1712 static bool bParseDate(
string const*,
int&,
int&,
int&);
1713 static bool bParseTime(
string const*,
int&,
int&,
int&);
1719 static string strDispTime(
double const,
bool const,
bool const);
1734 static void CalcSavitzkyGolay(
double[],
int const,
int const,
int const,
int const,
int const);
1737 static string strTrim(
string const*);
1743 static vector<string>*
VstrSplit(
string const*,
char const, vector<string>*);
1744 static vector<string>
VstrSplit(
string const*,
char const);
Geometry class used to represent 2D point objects with integer coordinates.
Geometry class used to represent 2D point objects with floating-point coordinates.
Geometry class used for coast polygon objects.
Geometry class used to represent 2D vector line objects.
Geometry class used to represent coast profile objects.
Geometry cass used to represent the raster grid of cell objects.
Real-world class used to represent the 'cliff' category of coastal landform object.
Real-world class used to represent coastline objects.
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)
void CalcDepthOfClosure(void)
Calculate the depth of closure.
bool m_bCliffCollapseSave
Save cliff collapse raster GIS files?
int m_nLogFileDetail
The level of detail in the log file output. Can be LOG_FILE_LOW_DETAIL, LOG_FILE_MIDDLE_DETAIL,...
bool m_bAvgSeaDepthSave
Save average sea depth raster GIS files?
void WritePolygonSedimentInputEventTable(int const)
Writes to the log file a table showing per-polygon sediment input event totals.
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.
bool m_bDeepWaterWaveAngleSave
Save deep water wave angle raster GIS files?
bool bWriteRasterGISFile(int const, string const *, int const =0, double const =0)
Writes GIS raster files using GDAL, using data from the RasterGrid array.
static void AnnounceInitializing(void)
Tells the user that we are now initializing.
int m_nGISMaxSaveDigits
The maximum number of digits in GIS filenames. These can be sequential, or the iteration number.
bool m_bTopSurfSave
Save fop surface (sediment and sea) raster DEMs?
int m_nYMinBoundingBox
The minimum y value of the bounding box.
static void AnnounceReadSCAPEShapeFunctionFile(void)
Now reading the SCAPE shape function file.
string m_strGDALISSProjection
GDAL projection string for the initial suspended sediment raster file.
void CalcSavitzkyGolayCoeffs(void)
Calculates the Savitzky-Golay smoothing coefficients for a given size of smoothing window....
string m_strInitialSuspSedimentFile
Name of initial suspended sediment file.
void FindAllSeaCells(void)
Finds and flags all sea areas which have at least one cell at a grid edge (i.e. does not flag 'inland...
vector< double > m_VdTSDeepWaterWaveStationPeriod
Time series of wave period at deep water wave station.
double dLookUpErosionPotential(double const) const
The erosion potential lookup: it returns a value for erosion potential given a value of Depth Over DB...
static void CalcSavitzkyGolay(double[], int const, int const, int const, int const, int const)
CalcSavitzkyGolay uses LULinearSolve and LUDecomp. It returns dFilterCoeffsArray[nWindowSize],...
string m_strOGRVectorOutputExtension
GDAL-OGR vector output drive file extension.
CGeomLine LSmoothCoastRunningMean(CGeomLine *) const
Does running-mean smoothing of a CGeomLine coastline vector (is in external CRS coordinates)
bool bCheckRasterGISOutputFormat(void)
Checks whether the selected raster GDAL driver supports file creation, 32-bit doubles,...
void InterpolateCShoreOutput(vector< double > const *, int const, int const, vector< double > *, vector< double > *, vector< double > *, vector< double > *, vector< double > *, vector< double > *, vector< double > *, vector< double > *, vector< double > *)
static void AnnounceIsRunning(void)
Tell the user that the simulation is now running.
void DoCPUClockReset(void)
Resets the CPU clock timer to prevent it 'rolling over', as can happen during long runs....
bool m_bSedimentTopSurfSave
Save sediment top surface raster DEMs?
bool m_bFineUnconsSedSave
Save fine unconsolidated sediment raster GIS files?
string m_strSedimentInputEventFile
The name of the sediment input events time series file.
int nLocateSeaAndCoasts(int &)
First find all connected sea areas, then locate the vector coastline(s), then put these onto the rast...
double m_dNotchDepthAtCollapse
Notch overhang (i.e. length of horizontal incision) to initiate collapse (m)
void GetRasterOutputMinMax(int const, double &, double &, int const, double const)
Finds the max and min values in order to scale raster output if we cannot write doubles.
bool m_bFloodSWLSetupSurgeLine
Are we saving the flood still water level setup surge line? TODO 007.
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_dMinSWL
Minimum still water level.
double m_dG
Gravitational acceleration (m**2/sec)
vector< string > m_VstrInitialCoarseUnconsSedimentFile
The name of the initial coarse-sized unconsolidated sediment GIS file.
void AnnounceReadDeepWaterWaveValuesGIS(void) const
Tells the user that we are now reading the deep water wave values 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.
static string strRemoveSubstr(string *, string const *)
Returns a string with a substring removed, and with whitespace trimmed.
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 nCalcWavePropertiesOnProfile(int const, int const, CGeomProfile *, vector< double > *, vector< double > *, vector< double > *, vector< double > *, vector< bool > *)
Calculates wave properties along a coastline-normal profile using either the COVE linear wave theory ...
static bool bParseTime(string const *, int &, int &, int &)
Parses a time string into hours, minutes, and seconds, and checks each of them.
double dGetThisIterTotWaterLevel(void) const
Returns this timestep's total water level.
void AnnounceReadInitialSandConsSedGIS(int const) const
Tells the user that we are now reading the initial sand consolidated sediment depth GIS file.
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.
vector< double > m_VdDeepWaterWaveStationY
Y coordinate (grid CRS) for deep water wave station.
int nAssignLandformsForAllCoasts(void)
Each timestep, classify coastal landforms and assign a coastal landform object to every point on ever...
void RasterizeCliffCollapseProfile(vector< CGeom2DPoint > const *, vector< CGeom2DIPoint > *) const
Given the start and end points of a cliff-collapse normal profile, returns an output vector of cells ...
int nFloodFillShadowZone(int const, CGeom2DIPoint const *, CGeom2DIPoint const *, CGeom2DIPoint const *)
Flood fills a shadow zone from the centroid.
void AnnounceReadInitialSandUnconsSedGIS(int const) const
Tells the user that we are now reading the initial sand unconsolidated sediment depth GIS file.
double m_dL_0
Deep water wave length (m)
double m_dWaveDataWrapHours
Number of hours after which deep water wave data wraps.
static int nGetOppositeDirection(int const)
Returns the opposite direction.
string strListVectorFiles(void) const
Return a space-separated string containing the names of the vector GIS output files.
int nDoCliffCollapseDeposition(int const, CRWCliff const *, double const, double const, double const, double const)
Redistributes the sand-sized and coarse-sized sediment from a cliff collapse onto the foreshore,...
CGeom2DIPoint PtiExtCRSToGridRound(CGeom2DPoint const *) const
Transforms a pointer to a CGeom2DPoint in the external CRS to the equivalent CGeom2DIPoint in the ras...
vector< string > m_VstrGDALICFDataType
GDAL data type for the initial consolidated fine sediment GIS data.
vector< int > m_VCellFloodLocation
The location to compute the total water level for flooding.
double m_dMaxUserInputWavePeriod
Used to constrain depth of closure.
bool m_bFloodSetupSurgeRunupTSSave
Save the flood setup surge runup time series file? TODO 007 Does this work correctly?
bool bSetUpTSFiles(void)
The bSetUpTSFiles member function sets up the time series files.
int nWriteEndRunDetails(void)
Writes end-of-run information to Out, Log and time-series files.
void AnnounceReadInitialFineUnconsSedGIS(int const) const
Tells the user that we are now reading the initial fine unconsolidated sediment depth GIS file.
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)
char ** m_papszGDALVectorOptions
Options for GDAL when handling vector files.
vector< CRWCoast > m_VFloodWaveSetupSurgeRunup
TODO 007 Info needed.
double m_dStartIterUnconsCoarseAllCells
Depth (m) of coarse unconsolidated sediment at the start of the simulation, all cells (both inside an...
int nReadRasterGISFile(int const, int const)
Reads all other raster GIS datafiles into the RasterGrid array.
vector< CRWCoast > m_VCoast
The coastline objects.
double m_dCoastNormalLength
Length of the cost-normal profiles, in m.
void WritePolygonCliffCollapseErosion(int const)
Writes to the log file a table showing per-polygon per-polygon cliff collapse.
int nLocateFloodAndCoasts(void)
First find all connected sea areas, then locate the vector coastline(s), then put these onto the rast...
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)
int nTraceCoastLine(unsigned int const, int const, int const, vector< bool > *, vector< CGeom2DIPoint > const *)
Traces a coastline (which is defined to be just above still water level) on the grid using the 'wall ...
default_random_engine m_Rand[NRNG]
The c++11 random number generators.
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.
void DoSimulationEnd(int const)
Carries out end-of-simulation tidying (error messages etc.)
double m_dCPUClock
Total elapsed CPU time.
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.
int m_nThisSave
Used in calculations of GIS save intervals.
static string strGetComputerName(void)
Returns a string, hopefully giving the name of the computer on which the simulation is running.
long m_lGDALMaxCanWrite
The maximum integer value which GDAL can write, can be UINT8_MAX, INT16_MAX, UINT16_MAX,...
static string strDispSimTime(double const)
strDispSimTime returns a string formatted as year Julian_day hour, given a parameter in hours
bool m_bAvgWaveAngleAndHeightSave
Save average wave angle and average wave height raster GIS files?
int nTraceAllFloodCoasts(void)
Locates all the potential coastline start points on the edges of the raster grid, then traces vector ...
void FloodFillLand(int const, int const)
Use the sealevel, wave set-up and run-up to evaluate flood hydraulically connected TODO 007 Not clear...
void MarkProfilesOnGrid(int const, int &)
For this coastline, marks all coastline-normal profiles (apart from the two 'special' ones at the sta...
double m_dSouthEastXExtCRS
The south-east x coordinate, in the external coordinate reference system (CRS)
string m_strSCAPEShapeFunctionFile
Name of SCAPE shape function file.
int m_nMissingValue
The value used for integer missing values.
bool m_bAvgWaveAngleSave
Save average wave angle raster GIS files?
long double m_ldGTotActualCoarseBeachErosion
All-simulation total of coarse sediment eroded during beach (unconsolidated sediment) movement (m)
int nCalcExternalForcing(void)
Calculate external forcings: change in still water level, tide level and deep water waves height,...
int nReadWaveStationInputFile(int const)
Reads the deep water wave station input data. Each point in m_strDeepWaterWavesInputFile is a triad o...
double m_dFineErodibilityNormalized
Relative erodibility of fine unconsolidated beach sediment, normalized.
void WriteLookUpData(void) const
Output the erosion potential look-up values, for checking purposes.
bool bWriteVectorGISFile(int const, string const *)
Writes vector GIS files using OGR.
double m_dThisIterCliffCollapseFineErodedDuringDeposition
Total fine sediment eroded during Dean profile deposition of talus following cliff collapse (depth in...
void WritePolygonSedimentBeforeMovement(int const)
Writes to the log file a table showing per-polygon totals of stored unconsolidated beach sediment pri...
bool m_bInvalidNormalsSave
Save invalid coastline-normal vector GIS files?
bool m_bShadowBoundarySave
Save wave shadow boundary vector GIS files?
double m_dThisIterDiffWaveSetupSurgeWaterLevel
TODO 007 Info needed.
static CGeom2DPoint PtChooseEndPoint(int const, CGeom2DPoint const *, CGeom2DPoint const *, double const, double const, double const, double const)
Choose which end point to use for the coastline-normal profile.
int nDoSimulationTimeMultiplier(string const *)
Given a string containing time units, this sets up the appropriate multiplier and display units for t...
int nReadSedimentInputEventFile(void)
Reads the sediment input event file.
vector< int > m_VnSedimentInputLocationID
ID for sediment input location, this corresponds with the ID in the sediment input time series file.
double m_dThisIterActualPlatformErosionCoarseCons
Total actual platform erosion (coarse consolidated sediment) for this iteration (depth in m)
bool m_bActualBeachErosionSave
Save actual (supply-limited) beach (unconsolidated sediment) erosion raster GIS files?
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.
double m_dThisIterTopElevMin
This-iteration lowest elevation of DEM.
vector< double > m_VdTideData
Tide data: one record per timestep, is the change (m) from still water level for that timestep.
vector< string > m_VstrGDALIUFProjection
GDAL projection for the initial unconsolidated fine sediment GIS data.
bool m_bStillWaterLevelTSSave
Save the still water level time series file?
bool m_bRunUpSave
Are we saving runup? TODO 007.
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.
GDALDataType m_GDALWriteIntDataType
The data type used by GDAL for integer operations, can be GDT_Byte, GDT_Int16, GDT_UInt16,...
long double m_ldGTotCliffTalusFineToSuspension
All-simulation total of fine sediment moved to suspension, due to cliff collapse (m)
void ErodeCellBeachSedimentSupplyLimited(int const, int const, int const, int const, double const, double &)
Erodes the unconsolidated beach sediment on a single cell, for a single size class,...
bool m_bCliffCollapseDepositionSave
Save cliff collapse deposition raster GIS files?
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.
bool m_bTotalActualPlatformErosionSave
Save total actual (supply-limited) shore platform erosion raster GIS files?
static string strTrimLeft(string const *)
Trims whitespace from the left side of a string, does not change the original string.
bool m_bPolygonUnconsSedUpOrDownDriftSave
Save polygon unconsolidated sediment up- or down-drift raster GIS files?
double m_dCoarseErodibility
The relative erodibility (0- 1) of coarse unconsolidated beach sediment.
double m_dGeoTransform[6]
GDAL geotransformation info (see http://www.gdal.org/classGDALDataset.html)
double m_dCliffTalusMinDepositionLength
Planview length of cliff deposition talus (m)
static CGeom2DIPoint PtiGetPerpendicular(CGeom2DIPoint const *, CGeom2DIPoint const *, double const, int const)
Returns a CGeom2DIPoint (grid CRS) which is the 'other' point of a two-point vector passing through P...
void WritePolygonSortedSequence(int const, vector< vector< int > > &)
Writes to the log file a table showing the sorted sequence of polygon processing, and any circulariti...
string m_strVectorGISOutFormat
Base name for CME vector GIS output files.
void ProcessShadowZoneCell(int const, int const, int const, CGeom2DIPoint const *, int const, int const, int const)
Process a single cell which is in the shadow zone, changing its wave height and orientation.
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_dMissingValue
Missing value.
int m_nUnconsSedimentHandlingAtGridEdges
How sediment which moves off an edge of the grid is handled. Possible values are GRID_EDGE_CLOSED,...
static double dGetDistanceBetween(CGeom2DPoint const *, CGeom2DPoint const *)
Returns the distance (in external CRS) between two points.
double m_dSandErodibility
The relative erodibility (0- 1) of sand unconsolidated beach sediment.
bool m_bBasementElevSave
Save basement raster DEMs?
double m_dInvCellDiagonal
Inverse of m_dCellDiagonal.
int m_nSimStartHour
Start time of the simulation (hours)
int nDoAllShadowZones(void)
Finds wave shadow zones and modifies waves in and near them. Note that where up-coast and down-coast ...
static CGeom2DPoint PtAverage(CGeom2DPoint const *, CGeom2DPoint const *)
Returns a point (external CRS) which is the average of (i.e. is midway between) two other external CR...
double m_dCoarseErodibilityNormalized
Relative erodibility of coarse unconsolidated beach sediment, normalized.
bool m_bCoarseUnconsSedSave
Save coarse unconsolidated sediment raster GIS files?
string m_strGDALLDriverCode
GDAL code for the for the initial landform class raster file.
bool m_bSuspSedTSSave
Save the suspended sediment time series file?
static double dKeepWithin360(double const)
Constrains the supplied angle to be within 0 and 360 degrees.
string m_strDeepWaterWaveStationsShapefile
The name of the deep water wave stations shape file.
vector< double > m_VdDepthOverDB
For erosion potential lookup.
void CalcCoastTangents(int const)
Calculates tangents to a coastline: the tangent is assumed to be the orientation of energy/sediment f...
bool m_bCliffCollapseNetTSSave
Save the cliff collapse net change time series file?
int nLocateAndCreateGridEdgeProfile(bool const, int const, int &, int &)
Creates a 'special' profile at each end of a coastline, at the edge of the raster grid....
double m_dStartIterSuspFineInPolygons
Depth (m) of fine suspended sediment at the start of the simulation (only cells in polygons)
bool m_bPotentialPlatformErosionMaskSave
Save potential platform erosion mask raster GIS files?
unsigned long m_ulThisIterNumCoastCells
The number of grid cells which are marked as coast, for this iteration.
void FillInBeachProtectionHoles(void)
Fills in 'holes' in the beach protection i.e. orphan cells which get omitted because of rounding prob...
static void AnnounceSimEnd(void)
Announce the end of the simulation.
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.
int nGetGridYMax(void) const
Returns the size of the grid in the Y direction.
void AnnounceReadICGIS(void) const
Tells the user that we are now reading the Intervention class GIS file.
int nCheckForSedimentInputEvent(void)
Check to see if we have any sediment input events this timestep, if so then do the event(s)
double m_dWaveDepthRatioForWaveCalcs
Start depth for wave calculations.
bool m_bWaveHeightSave
Save wave height raster GIS files?
bool m_bFloodLocation
Are we saving the flood location? TODO 007.
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.
bool m_bGDALCanCreate
Is the selected GDAL output file format capable of writing files?
bool m_bLandformSave
Save coast landform raster GIS files?
ofstream CliffCollapseDepositionTSStream
Cliff collapse deposition time series file output stream.
string m_strGDALLDataType
GDAL data type for the initial landform class raster file.
vector< CRWCoast > m_VFloodWaveSetupSurge
TODO 007 Info needed.
static string strTrim(string const *)
Trims whitespace from both sides of a string, does not change the original string.
string m_strRasterGISOutFormat
Base name for CME raster GIS output files.
string m_strGDALIWDriverCode
GDAL code for the initial water depth 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),...
bool m_bTotalBeachDepositionSave
Save total beach (unconsolidated sediment) deposition raster GIS files?
int m_nCoastMax
Maximum valid coast length when searching for coasts, actually is COAST_LENGTH_MAX * tMax(m_nXGridSiz...
int nCreateCShoreInfile(int const, int const, int const, int const, int const, int const, int const, int const, int const, int const, int const, int const, int const, double const, double const, double const, double const, double const, double const, double const, double const, vector< double > const *, vector< double > const *, vector< double > const *)
double m_dBeachSedimentPorosity
The porosity of unconsolidated beach sediment (0 - 1)
double dGetMissingValue(void) const
Returns the NODATA value.
int m_nSimStartSec
Start time of the simulation (seconds)
int m_nSimStartDay
Start date of the simulation (day)
unsigned long m_ulThisIterNumActualPlatformErosionCells
The number of grid cells on which actual platform erosion occurs, for this iteration.
bool m_bSandUnconsSedSave
Save sand unconsolidated sediment raster GIS files?
bool m_bActualPlatformErosionTSSave
Save the actual (supply-limited) shore platform erosion time series file?
unsigned long ulConvertToTimestep(string const *) const
For sediment input events, parses a string that may be relative (a number of hours or days after the ...
int m_nXMaxBoundingBox
The maximum x value of the bounding box.
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)
double dGetD50Coarse(void) const
Returns the global d50 value for coarse sediment.
string m_strOGRSedInputDriverDesc
bool m_bTotCliffCollapseSave
Save total cliff collapse raster GIS files?
int nReadShapeFunctionFile(void)
Reads the shape of the erosion potential distribution (see shape function in Walkden & Hall,...
void MergeProfilesAtFinalLineSegments(int const, CGeomProfile *, CGeomProfile *, int const, int const, double const, double const, double const, double const)
Merges two profiles which intersect at their final (most seaward) line segments, seaward of their poi...
static void AnnounceAddLayers(void)
Tells the user that we are now adding layers.
vector< unsigned long > m_VlDeepWaterWaveValuesAtTimestep
Calculate deep water wave values at these timesteps.
int nDoAllActualBeachErosionAndDeposition(void)
Does between-polygon and within-polygon actual (supply-limited) redistribution of transported beach s...
bool m_bDoShorePlatformErosion
Simulate shore platform erosion?
bool m_bSliceSave
Save slices?
void WritePolygonShorePlatformErosion(int const)
Writes to the log file a table showing per-polygon unconsolidated sand/coarse sediment derived from e...
bool m_bRasterPolygonSave
Save raster polygon raster GIS files?
string m_strOGRDWWVDriverCode
GDAL code for the deep water wave stations vector file.
bool m_bBeachDepositionSave
Save beach (unconsolidated sediment) deposition raster GIS files?
vector< double > m_VdFloodLocationX
X coordinate (grid CRS) for total water level flooding.
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.
bool bFindExeDir(char const *)
Finds the folder (directory) in which the CoastalME executable is located.
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...
void InterpolateWavePropertiesBetweenProfiles(int const, int const)
Interpolates wave properties from profiles to the coastline points between two profiles....
static double dSubtractProfiles(vector< double > const *, vector< double > const *, vector< bool > const *)
Calculate the total elevation difference between every point in two elevation profiles (first profile...
bool m_bSedimentInputAlongLine
Do we have sediment input along a line?
bool m_bSedimentInput
Do we have sediment input events?
unsigned long m_ulThisIterNumBeachDepositionCells
The number of grid cells on which beach (unconsolidated sediment) deposition occurs,...
double m_dInmersedToBulkVolumetric
For beach erosion/deposition, conversion from immersed weight to bulk volumetric (sand and voids) tra...
bool m_bNormalsSave
Save coastline-normal vector GIS files?
bool m_bAvgWaveHeightSave
Save wave height raster GIS files?
static string strToLower(string const *)
Returns the lower case version of an string, leaving the original unchanged.
int nInterpolateWavesToPolygonCells(vector< double > const *, vector< double > const *, vector< double > const *, vector< double > const *)
Interpolates wave properties from all profiles to all within-polygon sea cells, using GDALGridCreate(...
vector< double > m_VdThisIterDeepWaterWaveStationHeight
This-iteration wave height at deep water wave station.
int nCalcPotentialPlatformErosionBetweenProfiles(int const, CGeomProfile *, int const)
Calculates potential platform erosion on cells to one side of a given coastline-normal profile,...
CSimulation(void)
The CSimulation constructor.
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.
bool m_bHaveSandSediment
Does this simulation consider sand-sized sediment?
unsigned long m_ulMissingValueBasementCells
The number of basement cells marked with as missing value.
void WritePolygonEstimatedMovement(int const, vector< vector< int > > &)
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_dThisiterUnconsCoarseInput
Depth (m) of coarse unconsolidated sediment added, at this iteration.
int nReadVectorGISFile(int const)
Reads vector GIS datafiles using OGR.
bool bReadRunDataFile(void)
Reads the run details input file and does some initialization.
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 Savitsky-Golay smoothing is used (usually ...
void WritePolygonPotentialErosion(int const)
Writes to the log file a table showing per-polygon potential erosion of all size classes of unconsoli...
bool m_bSeaDepthSave
Save sea depth raster GIS files?
bool m_bWaveAngleAndHeightSave
Save wave angle and wave height raster GIS files?
ofstream BeachDepositionTSStream
Beach sediment deposition time series file output stream.
double m_dNotchBaseBelowSWL
Notch base below SWL (m)
vector< double > dVSmoothProfileSlope(vector< double > *) const
Does running-mean smoothing of the slope of a coastline-normal profile.
string m_strInitialBasementDEMFile
Name of initial basement DEM file.
int m_nRunUpEquation
The run-up equation used TODO 007.
long double m_ldGTotCliffCollapseFine
All-simulation total of fine sediment from cliff collapse (m)
void WritePolygonActualMovement(int const, vector< vector< int > > const &)
Writes to the log file a table showing per-polygon actual movement of unconsolidated beach sediment.
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)
int nDoSedimentInputEvent(int const)
Do a sediment input event.
static string strTrimRight(string const *)
Trims whitespace from the right side of a string, does not change the original string.
vector< double > m_VdDeepWaterWaveStationX
X coordinate (grid CRS) for deep water wave station.
void AnnounceReadSedimentEventInputValuesGIS(void) const
Tells the user that we are now reading the sediment input events GIS file.
double dGetD50Fine(void) const
Returns the global d50 value for fine sediment.
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_dBreakingWaveHeightDepthRatio
Breaking wave height-to-depth ratio.
void AnnounceReadFloodLocationGIS(void) const
Tells the user that we are now reading the flood location GIS file.
int nDoUnconsDepositionOnPolygon(int const, CGeomCoastPolygon *, int const, double, double &)
Deposits unconsolidated beach sediment (sand or coarse) on the cells within a polygon....
bool bCheckVectorGISOutputFormat(void)
Checks whether the selected vector OGR driver supports file creation etc.
bool m_bHaveWaveStationData
Do we have wave station data?
double m_dSeaWaterDensity
Density of sea water in kg/m**3.
int nDoSimulation(int, char const *[])
Runs the simulation.
int nReadCShoreOutput(int const, string const *, int const, int const, vector< double > const *, vector< double > *)
void StartClock(void)
Starts the clock ticking.
long double m_ldGTotSuspendedSediment
All-simulation total of suspended sediment (m)
vector< double > m_VdSedimentInputLocationX
X coordinate (grid CRS) for sediment input event.
int nCreateAllPolygons(void)
Create polygons, and mark the polygon boundaries on the raster grid.
double m_dSandErodibilityNormalized
Relative erodibility of sand unconsolidated beach sediment, normalized.
double m_dR
Coast platform resistance to erosion R, see Walkden & Hall, 2011.
string m_strGDALLProjection
GDAL projection string for the initial landform class raster file.
bool m_bActiveZoneSave
Save active zone raster GIS files?
void AnnounceReadInitialSuspSedGIS(void) const
Tells the user that we are now reading the initial suspended sediment depth GIS file.
ofstream StillWaterLevelTSStream
SWL time series file output stream.
void DoEndOfRunDeletes(void)
Do end-of-run memory clearance.
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.
void CheckForIntersectingProfiles(void)
Checks all coastline-normal profiles for intersection, and modifies those that intersect.
int nTraceFloodCoastLine(unsigned int const, int const, int const, vector< bool > *, vector< CGeom2DIPoint > const *)
Traces a coastline (which is defined to be just above still water level) on the grid using the 'wall ...
static int nDoTimeUnits(string const *)
This finds time units in a string.
string m_strGDALICDriverDesc
GDAL description of the initial intervention class raster file.
bool m_bSedimentInputAtCoast
Do we have sediment input at the coast?
static void AnnounceReadRasterFiles(void)
Now reading raster GIS files.
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)
vector< double > m_VdThisIterDeepWaterWaveStationPeriod
This-iteration wave period at deep water wave station.
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 CalcD50AndFillWaveCalcHoles(void)
Calculates an average d50 for each polygon. Also fills in 'holes' in active zone and wave calcs i....
long double m_ldGTotCliffTalusSandDeposition
All-simulation total of sand sediment deposited as talus following cliff collapse (m)
double m_dCellDiagonal
Length of a cell's diagonal (in external CRS units)
string m_strCMEDir
The CME folder.
vector< int > m_VnProfileToSave
The numbers of the profiles which are to be saved.
bool m_bDeepWaterWaveHeightSave
Save deep water wave height raster GIS files?
bool m_bMeanWaveEnergySave
Save mean wave energy raster GIS files?
double m_dKLS
Transport parameter KLS in the CERC equation.
ofstream BeachSedimentNetChangeTSStream
Beach sediment net change (erosion - deposition) time series file output stream.
double m_dInvCellSide
Inverse of m_dCellSide.
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.
static bool bOnOrOffShoreAndUpOrDownCoast(double const, double const, int const, bool &)
Determines whether the wave orientation at this point on a coast is onshore or offshore,...
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.
static double dGetTimeMultiplier(string const *)
Given a string containing time units, this returns the appropriate multiplier.
bool m_bCoastCurvatureSave
Save coastline-curvature vector GIS files?
int nGetGridXMax(void) const
Returns the cell size.
int m_nDeepWaterWaveDataNumTimeSteps
The duration of data for deep water waves, expressed as a number of time steps.
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.
void AnnounceReadBasementDEM(void) const
Tells the user that we are now reading the DEM file.
int nConvertMetresToNumCells(double const) const
Given a length in m, this returns the rounded equivalent number of cells.
long double m_ldGTotCoarseSedimentInput
All-simulation total of coarse sediment input (m)
double dGridYToExtCRSY(double const) const
Given a real-valued Y-axis ordinate in the raster grid CRS (i.e. not the centroid of a cell),...
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 m_bGDALCanWriteInt32
Is the selected GDAL output file format capable of writing 32-bit integers to files?
bool m_bRasterWaveFloodLineSave
Are we saving the raster wave flood line? TODO 007.
bool m_bBreakingWaveHeightSave
Save breaking wave height raster GIS files?
double m_dThisIterTotSeaDepth
Total sea depth (m) for this iteration.
double m_dTotPotentialPlatformErosionOnProfiles
Total potential platform erosion on profiles.
int m_nCoastMin
Minimum valid coast legth when searching for coass, actualli is tMin(m_nXGridSize,...
string m_strMailAddress
An email addresx to which to send end-of-simulation messages.
double m_dRegularSaveTime
The time of the next save, in hours from the start of the simulation, if we are saving regularly.
bool m_bPolygonNodeSave
Save polygon node vector GIS files?
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)
vector< int > m_VnDeepWaterWaveStationID
ID for deep water wave station, this corresponds with the ID in the wave time series file.
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 Does this work correctly?
bool m_bTotalPotentialPlatformErosionSave
Save total potential shore platform erosion raster GIS files?
string m_strGDALLDriverDesc
GDAL description of the initial landform class raster file.
void SetRasterFileCreationDefaults(void)
Sets per-driver defaults for raster files created using GDAL.
bool m_bSetupSurgeFloodMaskSave
Are we saving the setup surge flood mask? TODO 007.
bool m_bWaveEnergySinceCollapseSave
Save wave energy since cliff collapse raster GIS files?
double m_dNorthWestXExtCRS
The north-west x coordinate, in the external coordinate reference system (CRS)
double m_dD50Coarse
The D50 for coarse sediment.
vector< CGeom2DIPoint > m_VEdgeCell
Edge cells.
static bool bCheckForIntersection(CGeomProfile *const, CGeomProfile *const, int &, int &, double &, double &, double &, double &)
Checks all line segments of a pair of coastline-normal profiles for intersection. If the lines inters...
int nInterpolateAllDeepWaterWaveValues(void)
If the user supplies multiple deep water wave height and angle values, this routine interplates these...
static void AnnounceStart(void)
Tells the user that we have started the simulation.
static int nUpdateIntervention(void)
Check to see if we have a new intervention in place (not yet implemented)
vector< int > m_VnFloodLocationID
ID for flood location.
int m_nCoastCurvatureInterval
Coast curvature interval is a length, measured in coastline points.
vector< unsigned long > m_VulProfileTimestep
Timesteps at which to save profiles.
int nCalcPotentialPlatformErosionOnProfile(int const, CGeomProfile *)
Calculates potential (i.e. unconstrained by available sediment) erosional lowering of the shore platf...
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)
bool m_bPotentialBeachErosionSave
Save potential beach (unconsolidated sediment) erosion raster GIS files?
normal_distribution< double > m_dUnitNormalDist
c++11 unit normal distribution (mean = 0, stdev = 1)
static bool bParseDate(string const *, int &, int &, int &)
Parses a date string into days, months, and years, and checks each of them.
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)
~CSimulation(void)
The CSimulation destructor.
long double m_ldGTotCoarseDepositionDiff
All-simulation total of shortfall in unconsolidated coarse sediment deposition (m,...
int nSetAllCoastpointDeepWaterWaveValues(void)
Give every coast point a value for deep water wave height and direction TODO 005 This may not be real...
double m_dCoastNormalAvgSpacing
Average spacing of the cost-normal profiles, in 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 ...
static CGeom2DIPoint PtiFollowWaveAngle(CGeom2DIPoint const *, double const, double &)
Given a cell and a wave orientation, finds the 'upwave' cell.
vector< double > m_VdSavGolFCRWCoast
Savitzky-Golay filter coefficients for the coastline vector(s)
vector< double > m_VdSavGolFCGeomProfile
Savitzky-Golay filter coefficients for the profile vectors.
int nUpdateGrid(void)
Update all cells in the raster raster grid and do some per-timestep accounting.
int m_nSimStartMonth
Start date of the simulation (month)
int nGetCoastNormalEndPoint(int const, int const, int const, CGeom2DPoint const *, double const, CGeom2DPoint *, CGeom2DIPoint *, bool const)
Finds the end point of a coastline-normal line, given the start point on the vector coastline....
int nAssignLandformsForAllCells(void)
Each timestep, classify landforms for cells that are not on the coastline.
string m_strGDALIWProjection
GDAL projection string for the initial water depth raster file.
bool m_bSuspSedSave
Save suspended sediment raster GIS files?
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)
static double dAngleSubtended(CGeom2DIPoint const *, CGeom2DIPoint const *, CGeom2DIPoint const *)
Returns the signed angle BAC (in radians) subtended between three CGeom2DIPoints B A C....
vector< string > m_VstrGDALIUSDriverDesc
GDAL driver description for the initial unconsolidated sand sediment GIS data.
string m_strDurationUnits
The duration units for this simulation.
void TruncateProfileAndAppendNew(int const, CGeomProfile *, int const, vector< CGeom2DPoint > const *, vector< vector< pair< int, int > > > const *)
Truncate a profile at the point of intersection, and do the same for all its co-incident profiles.
double m_dAccumulatedSeaLevelChange
If long-term SWL changes, the total change so far since the start of simulation.
bool m_bPolygonBoundarySave
Save polygon boundary vector GIS files?
bool bElevAboveDeanElev(int const, int const, double const, CRWCellLandform const *)
Return true if the given elevation is higher than the Dean elevation (and other conditions are met),...
void WritePolygonPreExistingSedimentTable(int const)
Writes to the log file a table showing per-polygon pre-existing unconsolidated sediment.
bool m_bStormSurgeSave
Are we saving the storm surge? TODO 007.
void DoActualPlatformErosionOnCell(int const, int const)
Calculates actual (constrained by available sediment) erosion of the consolidated shore platform on a...
vector< string > m_VstrInitialFineUnconsSedimentFile
The name of the initial fine-sized unconsolidated sediment GIS file.
double dExtCRSXToGridX(double const) const
Transforms an X-axis ordinate in the external CRS to the equivalent X-axis ordinate in the raster gri...
bool m_bActualPlatformErosionSave
Save actual (supply-limited) shore platform erosion raster GIS files?
double m_dThisIterFineSedimentToSuspension
Total fine unconsolidated sediment in suspension for this iteration (depth in m)
int nDoAllWaveEnergyToCoastLandforms(void)
Update accumulated wave energy in coastal landform objects.
vector< CSedInputEvent * > m_pVSedInputEvent
Sediment input events.
int nInsertPointIntoProfilesIfNeededThenUpdate(int const, CGeomProfile *, double const, double const, int const, CGeomProfile *, int const, bool const)
Inserts an intersection point into the profile that is to be retained, if that point is not already p...
double m_dThisIterBeachErosionFine
Total actual beach erosion (fine unconsolidated sediment) for this iteration (depth in m)
void KeepWithinValidGrid(int, int, int &, int &) const
Given two points in the grid CRS (the points assumed not to be coincident), this routine modifies the...
void DoAllPotentialBeachErosion(void)
Uses either the CERC equation or the Kamphuis (1990) equation to calculate potential (unconstrained) ...
void FillPotentialPlatformErosionHoles(void)
Fills in 'holes' in the potential platform erosion i.e. orphan cells which get omitted because of rou...
bool bSurroundedByDriftCells(int const, int const)
Returns true if this cell has four drift cells surrounding it.
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,...
bool bReadIniFile(void)
The bReadIniFile member function reads the initialization file.
bool m_bHaveFineSediment
Does this simulation consider fine-sized sediment?
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?
int m_nYMaxBoundingBox
The maximum y value of the bounding box.
int nDoCliffCollapse(int const, CRWCliff *, double &, double &, double &, double &, double &)
Simulates cliff collapse on a single cliff object, which happens when when a notch (incised into a co...
vector< string > m_VstrGDALICFDriverDesc
GDAL driver description for the initial consolidated fine sediment GIS data.
vector< double > m_VdSedimentInputLocationY
X coordinate (grid CRS) for sediment input event.
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.
vector< bool > m_bUnconsChangedThisIter
One element per layer: has the consolidated sediment of this layer been changed during this iteration...
bool m_bTotalPotentialBeachErosionSave
Save total potential beach (unconsolidated sediment) erosion raster GIS files?
unsigned long m_ulThisIterNumPotentialPlatformErosionCells
The number of grid cells on which potential platform erosion occurs, for this iteration.
string m_strGDALIWDataType
GDAL data type for the initial water depth raster file.
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 ...
double m_dMaxSWL
Maximum still water level.
long double m_ldGTotActualSandLostBeachErosion
All-simulation total of sand sediment lost via beach (unconsolidated) sediment movement (m)
double m_dDeltaSWLPerTimestep
If long-term SWL changes, the increment per timestep.
void AllPolygonsUpdateStoredUncons(int const)
Before simulating beach erosion, update the per-polygon values of pre-existing unconsolidated sedimen...
int m_nGISSave
The save number for GIS files (can be sequential, or the iteration number)
string m_strInterventionClassFile
Name of intervention class file.
static CGeom2DIPoint PtiWeightedAverage(CGeom2DIPoint const *, CGeom2DIPoint const *, double const)
Returns an integer point (grid CRS) which is the weighted average of two other grid CRS integer point...
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.
bool m_bFloodSWLSetupLine
Are we saving the flood still water level setup line? TODO 007.
bool m_bSeaMaskSave
Save sea mask raster GIS files?
void CalcTime(double const)
Calculates and displays time elapsed in terms of CPU time and real time, also calculates time per tim...
double m_dThisIterCliffCollapseErosionFineCons
This-iteration total of fine consolidated sediment produced by cliff collapse (m^3)
bool m_bInterventionClassSave
Save intervention class raster GIS files?
long double m_ldGTotCoarseSedLostCliffCollapse
All-simulation total of coarse sediment lost via cliff collapse (m)
long double m_ldGTotSandActualPlatformErosion
All-simulation total of sand sediment actual platform erosion (m)
int m_nSimStartYear
Start date of the simulation (year)
CGeom2DIPoint PtiFindClosestCoastPoint(int const, int const)
Finds the closest point on any coastline to a given point.
bool m_bTotalActualBeachErosionSave
Save total actual (supply-limited) beach (unconsolidated sediment) erosion raster GIS files?
void WritePolygonShareTable(int const)
Writes to the log file a table showing polygon to polygon shares of unconsolidated sediment transport...
bool m_bRasterCoastlineSave
Save raster coastline GIS files?
string m_strDeepWaterWavesInputFile
The name of the deep water wave stations time series file.
static string pstrChangeToBackslash(string const *)
Changes all forward slashes in the input string to backslashes, leaving the original unchanged.
static CGeom2DPoint PtFindPointInPolygon(vector< CGeom2DPoint > const *, int const)
Finds a point in a polygon: is guaranteed to succeed, as every strictly closed polygon has at least o...
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,...
double m_dThisIterDiffWaveSetupWaterLevel
TODO 007 Info needed.
static CGeom2DPoint PtGetPerpendicular(CGeom2DPoint const *, CGeom2DPoint const *, double const, int const)
Returns a CGeom2DPoint which is the 'other' point of a two-point vector passing through PtStart,...
string m_strGDALICProjection
GDAL projection string for the initial intervention class raster file.
bool m_bInterventionHeightSave
Save intervention height raster GIS files?
double m_dTotalCoarseConsInPolygons
Total coarse consolidated sediment in all polygons, before polygon-to-polygon movement (only cells in...
int m_nCoastCurvatureMovingWindowSize
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.
int nDoUnconsErosionOnPolygon(int const, CGeomCoastPolygon *, int const, double const, double &)
Erodes unconsolidated beach sediment of one texture class on the cells within a polygon....
void AnnounceReadIHGIS(void) const
Tells the user that we are now reading the Intervention height GIS file.
double m_dTotalSandUnconsInPolygons
Total sand unconsolidated sediment in all polygons, before polygon-to-polygon movement (only cells in...
void AnnounceReadInitialCoarseConsSedGIS(int const) const
Tells the user that we are now reading the initial coarse consolidated sediment depth GIS file.
bool m_bRiverineFlooding
Are we doing flooding? TODO 007.
void RasterizePolygonJoiningLine(CGeom2DIPoint const *, CGeom2DIPoint const *, int const)
Puts a polygon 'joining line' (the line which is the seaward boundary of the polygon,...
long m_lGDALMinCanWrite
The minimum integer value which GDAL can write, can be zero, INT16_MIN, INT32_MIN.
int nCreateAllProfiles(void)
Create coastline-normal profiles for all coastlines. The first profiles are created 'around' the most...
double m_dStartIterUnconsFineAllCells
Depth (m) of fine unconsolidated sediment at the start of the simulation, all cells (both inside and ...
static string strGetErrorText(int const)
Returns an error message given an error code.
bool m_bSandConsSedSave
Save sand consolidated sediment raster GIS files?
CGeomCoastPolygon * pGetPolygon(int const) const
Returns a pointer to a coast polygon, in down-coast sequence.
bool m_bSedimentInputEventSave
Save sediment inut data?
static double dTriangleAreax2(CGeom2DPoint const *, CGeom2DPoint const *, CGeom2DPoint const *)
Returns twice the signed area of a triangle.
bool m_bHaveCoarseSediment
Does this simulation consider coarse-sized sediment?
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)
CGeomLine LSmoothCoastSavitzkyGolay(CGeomLine *, int const, int const) const
Does smoothing of a CGeomLine coastline vector (is in external CRS coordinates) using a Savitzky-Gola...
bool m_bPolygonUnconsSedGainOrLossSave
Save polygon unconsolidated sediment gain or loss raster GIS files?
void MarkPolygonCells(void)
Marks cells of the raster grid that are within each coastal polygon. The flood fill code used here is...
string m_strGDALISSDriverDesc
GDAL description for the initial suspended sediment raster file.
double m_dTimeStep
The length of an iteration (a time step) in hours.
void TruncateOneProfileRetainOtherProfile(int const, CGeomProfile *, CGeomProfile *, double const, double const, int const, int const, bool const)
Truncates one intersecting profile at the point of intersection, and retains the other profile.
static void AnnounceAllocateMemory(void)
Tells the user that we are now allocating memory.
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?
int m_nXMinBoundingBox
The minimum x value of the bounding box.
double dGetD50Sand(void) const
Returns the global d50 value for sand sediment.
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)
bool m_bDeepWaterWaveAngleAndHeightSave
Save deep water wave angle and wave height raster GIS files?
unsigned long m_ulTotPotentialPlatformErosionBetweenProfiles
The number of cells on which between-profile average potential shore platform erosion occurs.
double dExtCRSYToGridY(double const) const
Transforms a Y-axis ordinate in the external CRS to the equivalent Y-axis ordinate in the raster grid...
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.
void AnnounceReadInitialFineConsSedGIS(int const) const
Tells the user that we are now reading the initial fine consolidated sediment depth GIS file.
bool m_bBeachProtectionSave
Save beach protection raster GIS files>
static string strDispTime(double const, bool const, bool const)
strDispTime returns a string formatted as h:mm:ss, given a parameter in seconds, with rounding and fr...
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.
double m_dFinalSWL
The end-of-simulation still water (m), is same as m_dOrigSWL unless SWL changes.
bool m_bDoBeachSedimentTransport
Simulate unconsolidated sediment (beach) transport?
int nGetThisProfileElevationsForCShore(int const, CGeomProfile *, int const, vector< double > *, vector< double > *, vector< double > *)
Get profile horizontal distance and bottom elevation vectors in CShore units.
unsigned long m_ulThisIterNumPotentialBeachErosionCells
The number of grid cells on which potential beach (unconsolidated sediment) erosion occurs,...
bool m_bFineConsSedSave
Save fine consolidated sediment raster GIS files?
string m_strGDALIWDriverDesc
GDAL description for the initial water depth raster file.
bool m_bShadowDowndriftBoundarySave
Save wave shadow downdrift boundary vector GIS files?
bool bIsWithinValidGrid(int const, int const) const
Checks whether the supplied point (an x-y pair, in the grid CRS) is within the raster grid,...
int nDoParallelProfileUnconsErosion(CGeomCoastPolygon *, int const, int const, int const, int const, int const, int const, vector< CGeom2DIPoint > const *, vector< double > const *, double &, double &, double &)
This routine erodes unconsolidated beach sediment (either fine, sand, or coarse) on a parallel profil...
int m_nCoastSmooth
Which method to use for coast smoothing.
bool m_bDeepWaterWavePeriodSave
Save deep water wave period raster GIS files?
string m_strGDALBasementDEMDriverDesc
GDAL description of the basement DEM raster file type.
void ModifyBreakingWavePropertiesWithinShadowZoneToCoastline(int const, int const)
Modifies the wave breaking properties at coastline points of profiles within the shadow zone.
string m_strInitialLandformFile
Name of initial landform file.
double m_dC_0
Deep water wave speed (m/s)
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?
int nCreateProfile(int const, int const, int const, int const, int &, bool const, CGeom2DIPoint const *)
Creates a single coastline-normal profile (which may be an intervention profile)
vector< string > m_VstrGDALICSDataType
GDAL data type for the initial consolidated sand sediment GIS data.
double dGridXToExtCRSX(double const) const
Given a real-valued X-axis ordinate in the raster grid CRS (i.e. not the centroid of a cell),...
double m_dThisIterBeachDepositionSand
Total beach deposition (sand unconsolidated sediment) for this iteration (depth in m)
int nReadTideDataFile(void)
Reads the tide time series data.
bool m_bCoarseConsSedSave
Save coarse consolidated sediment raster GIS files?
string m_strOGRFloodDriverDesc
bool m_bSeaAreaTSSave
Save the sea area time series file?
bool m_bScaleRasterOutput
Scale raster output?
double dGetThisIterSWL(void) const
Returns this timestep's still water level.
vector< string > m_VstrGDALICSProjection
GDAL dprojection for the initial consolidated sand sediment GIS data.
void CreateRasterizedProfile(int const, CGeomProfile *, CGeom2DIPoint const *, CGeom2DIPoint const *, vector< CGeom2DIPoint > *, vector< bool > *, bool &, bool &, bool &, bool &)
Given a pointer to a coastline-normal profile, returns an output vector of cells which are 'under' ev...
void CalcProcessStats(void)
This calculates and displays process statistics.
void DoShadowZoneAndDownDriftZone(int const, int const, int const, int const)
Traverse the shadow zone, changing wave orientation and height, and the down-drift zone,...
static double dCalcCurvature(int const, CGeom2DPoint const *, CGeom2DPoint const *, CGeom2DPoint const *)
Calculates signed Menger curvature (https://en.wikipedia.org/wiki/Menger_curvature#Definition) from t...
int nGetCoastPolygonSize(void) const
Returns the size of the coast polygon vector.
CGeom2DPoint PtGridCentroidToExt(CGeom2DIPoint const *) const
Transforms a pointer to a CGeom2DIPoint in the raster grid CRS (assumed to be the centroid of a cell)...
double m_dThisIterLeftGridUnconsCoarse
Total coarse unconsolidated sediment lost from the grid this iteration (depth in m)
void DoCoastCurvature(int const, int const)
Calculates both detailed and smoothed curvature for every point on a coastline.
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.
bool m_bOmitSearchSouthEdge
Omit the south edge of the grid from coast-end searches?
string m_strGDALRasterOutputDriverExtension
GDAL raster output driver file extension.
bool m_bBeachMaskSave
Save beach mask raster GIS files?
string m_strGDALBasementDEMProjection
GDAL projection string for the basement DEM raster file.
bool bOpenLogFile(void)
Opens the log file.
double m_dTotalSandConsInPolygons
Total sand consolidated sediment in all polygons, before polygon-to-polygon movement (only cells in p...
static void AppendEnsureNoGap(vector< CGeom2DIPoint > *, CGeom2DIPoint const *)
Appends a CGeom2DIPoint to a vector<CGeom2DIPoint>, making sure that the new end point touches the pr...
unsigned long m_ulIter
The number of the current iteration (time step)
void AnnounceLicence(void)
Tells the user about the licence.
bool m_bAvgSuspSedSave
Save average suspended sediment raster GIS files?
void WritePolygonUnsortedSequence(int const, vector< vector< int > > &)
Writes to the log file a table showing the unsorted sequence of polygon processing.
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.
int m_nNumPolygonGlobal
Number of global (all coasts) polygons.
int nReadRasterBasementDEM(void)
Reads a raster DEM of basement elevation data to the Cell array.
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...
int nTraceAllCoasts(int &)
Locates all the potential coastline start points on the edges of the raster grid, then traces vector ...
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)
string m_strGDALICDriverCode
GDAL code for the initial intervention class raster file.
ofstream FloodSetupSurgeTSStream
Flood setup surge time series file output stream.
double dCalcBeachProtectionFactor(int const, int const, double const)
Calculates the (inverse) beach protection factor as in SCAPE: 0 is fully protected,...
bool bTimeToQuit(void)
Checks to see if the simulation has gone on too long, amongst other things.
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)
void ProcessDownDriftCell(int const, int const, int const, double const, int const)
Process a single cell which is in the downdrift zone, changing its wave height.
int nDoAllPropagateWaves(void)
Simulates wave propagation along all coastline-normal profiles.
vector< double > m_VdThisIterDeepWaterWaveStationAngle
This-iteration wave orientation at deep water wave station.
bool m_bOutputProfileData
Output profile data?
double m_dThisIterDiffWaveSetupSurgeRunupWaterLevel
TODO 007 Info needed.
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.
bool bIsInterventionCell(int const, int const) const
Returns true if the cell is an intervention.
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)
bool m_bRasterNormalSave
Save raster coastline-normal GIS files?
double m_dBreakingWaveHeight
The height of breaking waves (m)
void AnnounceProgress(void)
Displays information regarding the progress of the simulation.
bool m_bTotCliffCollapseDepositionSave
Save total cliff collapse deposition raster GIS files?
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 ...
int nMarkBoundingBoxEdgeCells(void)
Mark cells which are at the edge of a bounding box which represents the valid part of the grid,...
bool bCreateErosionPotentialLookUp(vector< double > *, vector< double > *, vector< double > *)
Creates a look-up table for erosion potential, given depth over DB.
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.
vector< int > m_VnSavGolIndexCoast
Savitzky-Golay shift index for the coastline vector(s)
void AnnounceReadLGIS(void) const
Tells the user that we are now reading the Landscape category GIS file.
int m_nCoastNormalAvgSpacing
Average spacing between cost normals, measured in cells.
double m_dThisIterTopElevMax
This-iteration highest elevation of DEM.
double m_dThisIterActualPlatformErosionFineCons
Total actual platform erosion (fine consolidated sediment) for this iteration (depth in m)
vector< double > m_VdFloodLocationY
X coordinate (grid CRS) for total water level flooding.
long double m_ldGTotPotentialBeachErosion
All-simulation total of potential beach erosion (m), all size classes.
double m_dProfileMaxSlope
Maximum slope on costline-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?
static void AnnounceReadVectorFiles(void)
Now reading vector GIS files.
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)
unsigned long m_ulRandSeed[NRNG]
A seed for each of the NRNG random number generators.
double m_dDepthOfClosure
Depth of closure (in m) TODO 007 can be calculated using Hallermeier, R.J. (1978) or Birkemeier (1985...
int nCheckAllProfiles(void)
Check all coastline-normal profiles and modify the profiles if they intersect, then mark valid profil...
int nInitGridAndCalcStillWaterLevel(void)
At the beginning of each timestep: clear vector coasts, profiles, and polygons, initialize the raster...
vector< string > m_VstrGDALICCDriverDesc
GDAL driver decription for the initial consolidated coarse sediment GIS data.
double m_dOrigSWL
The start-of-simulation still water level (m)
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.
bool m_bSetupSurgeRunupFloodMaskSave
Are we saving the setup surge runup flood mask? TODO 007.
void FloodFillSea(int const, int const)
Flood-fills all sea cells starting from a given cell. The flood fill code used here is adapted from a...
static void CalcDeanProfile(vector< double > *, double const, double const, double const, bool const, int const, double const)
Calculates a Dean equilibrium profile h(y) = A * y^(2/3) where h(y) is the distance below the highest...
double m_dThisIterDiffTotWaterLevel
TODO 007 Info needed.
vector< bool > m_bConsChangedThisIter
One element per layer: has the consolidated sediment of this layer been changed during this iteration...
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_bWaveSetupSave
Are we saving the wave setup? TODO 007.
int nDoPolygonSharedBoundaries(void)
For between-polygon potential sediment routing: find which are the adjacent polygons,...
void AnnounceReadTideData(void) const
Now reading tide data file.
static bool bIsWithinPolygon(CGeom2DPoint const *, vector< CGeom2DPoint > const *)
Determines whether a point is within a polygon: however if the point is exactly on the edge of the po...
vector< double > m_VdTSDeepWaterWaveStationHeight
Time series of wave heights at deep water wave station.
double m_dClkLast
Last value returned by clock()
bool m_bShadowZoneCodesSave
Save wave shadow zones raster GIS files?
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?
bool m_bPotentialPlatformErosionSave
Save potential shore platform erosion raster GIS files?
static CGeom2DIPoint PtiPolygonCentroid(vector< CGeom2DIPoint > *)
Returns an integer point (grid CRS) which is the centroid of a polygon, given by a vector of grid CRS...
long double m_ldGTotPotentialPlatformErosion
All-simulation total of potential platform erosion (m), all size classes.
GDALDataType m_GDALWriteFloatDataType
Thw data type used by GDAL for floating point operations, can be GDT_Byte, GDT_Int16,...
void InterpolateWaveHeightToCoastPoints(int const)
Linearly interpolates wave properties from profiles to the coastline cells between two profiles.
ofstream BeachErosionTSStream
Beach sediment erosion time series file output stream.
bool m_bGDALCanWriteFloat
Is the selected GDAL output file format capable of writing floating-point values to files?
void AnnounceReadInitialCoarseUnconsSedGIS(int const) const
Tells the user that we are now reading the initial coarse unconsolidated sediment depth GIS file.
int nHandleCommandLineParams(int, char const *[])
Handles command-line parameters.
long double m_ldGTotCliffCollapseSand
All-simulation total of sand sediment from cliff collapse (m)
int FindAllInundatedCells(void)
Finds and flags all sea areas which have at least one cell at a grid edge (i.e. does not flag 'inland...
char ** m_papszGDALRasterOptions
Options for GDAL when handling raster files.
ofstream OutStream
The main output file stream.
double m_dDurationUnitsMult
Multiplier for duration units, to convert to hours.
bool m_bFloodSWLSetupSurgeRunupLine
Are we saving the flood still water level setup surge runup line? TODO 007.
void LocateAndCreateProfiles(int const, int &, int &, int const, vector< bool > *, vector< pair< int, double > > const *)
For a single coastline, locate the start points for all coastline-normal profiles (except the grid-ed...
unsigned long m_ulTotTimestep
The target number of iterations.
bool m_bOutputParallelProfileData
Output parallel profile data?
int nLandformToGrid(int const, int const)
At the end of each timestep, this routine stores the attributes from a single coastal landform object...
double m_dKamphuis
Transport parameter for the Kamphuis equation.
vector< double > m_VdTSDeepWaterWaveStationAngle
Time series of wave orientation at deep water wave station.
static vector< string > * VstrSplit(string const *, char const, vector< string > *)
From http://stackoverflow.com/questions/236129/split-a-string-in-c They implement (approximately) Pyt...
bool m_bOutputErosionPotentialData
Output erosion potential data?
int m_nLevel
TODO 007 Used in WAVESETUP + SURGE + RUNUP.
bool m_bSedimentInputThisIter
Do we have a sediment input event this iteration?
bool m_bCliffNotchSave
Save cliff notch incision depth vector GIS files?
bool m_bVectorWaveFloodLineSave
Are we saving the vector wave flood line? TODO 007.
vector< string > m_VstrGDALIUSDriverCode
GDAL driver code for the initial unconsolidated sand sediment GIS data.
bool m_bWaveAngleSave
Save wave angle raster GIS files?
void AppendPolygon(CGeomCoastPolygon *)
Appends a pointer to a coast polygon to the coast polygon vector.
static double dCalcWaveAngleToCoastNormal(double const, double const, int const)
Calculates the angle between the wave direction and a normal to the coastline tangent....
bool m_bOmitSearchEastEdge
Omit the east edge of the grid from coast-end searches?
vector< int > m_VEdgeCellEdge
The grid edge that each edge cell belongs to.
vector< CGeomCoastPolygon * > m_pVCoastPolygon
Pointers to coast polygon objects, in down-coast sequence TODO 044 Will need to use global polygon ID...
int m_nCoastSmoothWindow
The size of the window used for coast smoothing. Must be an odd number.
double m_dThisIterLeftGridUnconsFine
Total fine unconsolidated sediment lost from the grid this iteration (depth in m)
bool m_bLocalSlopeSave
Save local slope raster GIS files?
Contains CGeomILine definitions.
Contains CGeomLine definitions.