CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
Loading...
Searching...
No Matches
assign_landforms.cpp
Go to the documentation of this file.
1
12
13/* ===============================================================================================================================
14
15 This file is part of CoastalME, the Coastal Modelling Environment.
16
17 CoastalME is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
18
19 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
23===============================================================================================================================*/
24#include <assert.h>
25
26#include <iostream>
27// using std::cout;
28// using std::cerr;
29using std::endl;
30
31#ifdef _OPENMP
32#include <omp.h>
33#endif
34
35#include "cme.h"
36#include "simulation.h"
37#include "coast.h"
38#include "cliff.h"
39#include "drift.h"
40#include "intervention.h"
41
42//===============================================================================================================================
44//===============================================================================================================================
46{
47 // For each coastline, put a coastal landform at every point along the coastline
48 for (int nCoast = 0; nCoast < static_cast<int>(m_VCoast.size()); nCoast++)
49 {
50 for (int j = 0; j < m_VCoast[nCoast].nGetCoastlineSize(); j++)
51 {
52 // Get the coords of the grid cell marked as coastline for the coastal landform object
53 int const nX = m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(j)->nGetX();
54 int const nY = m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(j)->nGetY();
55
56 // Store the coastline number and the number of the coastline point in the cell so we can get these quickly later
57 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCoast(nCoast);
58 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetPointOnCoast(j);
59
60 // OK, start assigning coastal landforms. First, is there an intervention here?
61 if (bIsInterventionCell(nX, nY) || m_pRasterGrid->m_Cell[nX][nY].dGetInterventionHeight() > 0)
62 {
63 // There is, so create an intervention object on the vector coastline with these attributes
64 CACoastLandform* pIntervention = new CRWIntervention(&m_VCoast[nCoast], nCoast, j);
65 m_VCoast[nCoast].AppendCoastLandform(pIntervention);
66
67 // LogStream << j << " [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "} " << m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFCategory() << " " << m_pRasterGrid->m_Cell[nX][nY].dGetInterventionHeight() << endl;
68
69 continue;
70 }
71
72 // OK this landform is something other than an intervention. So check what we have at SWL on this cell: is it unconsolidated or consolidated sediment? Note that layer 0 is the first layer above basement
73 int const nLayer = m_pRasterGrid->m_Cell[nX][nY].nGetLayerAtElev(m_dThisIterSWL);
74
75 if (nLayer == ELEV_IN_BASEMENT)
76 {
77 // Should never happen
78 LogStream << m_ulIter << ": SWL (" << m_dThisIterSWL << ") is in basement on cell [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "}, cannot assign coastal landform for coastline " << nCoast << endl;
79
81 }
82
83 else if (nLayer == ELEV_ABOVE_SEDIMENT_TOP)
84 {
85 // Again, should never happen
86 LogStream << m_ulIter << ": SWL (" << m_dThisIterSWL << ") is above sediment-top elevation (" << m_pRasterGrid->m_Cell[nX][nY].dGetSedimentTopElev() << ") on cell [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "}, cannot assign coastal landform for coastline " << nCoast << endl;
87
89 }
90
91 double const dConsSedTop = m_pRasterGrid->m_Cell[nX][nY].dGetConsSedTopForLayerAboveBasement(nLayer);
92 bool bConsSedAtSWL = false;
93
94 if (dConsSedTop >= m_dThisIterSWL)
95 bConsSedAtSWL = true;
96
97 double dNotchBaseElev = m_dThisIterMeanSWL - m_dNotchBaseBelowSWL;
98
99 if (m_ulIter == 1)
100 {
101 // The first timestep: no coastal landforms (other than interventions) already exist, so no grid cells are flagged with coastal landform attributes. So we must update the grid now using the initial values for the coastal landform object's attributes, ready for nLandformToGrid() at the end of the first timestep
102 if (bConsSedAtSWL)
103 {
104 // First timestep: we have consolidated sediment at SWL, so this is a cliff cell. Set some initial values for the cliff object's attributes
105 // LogStream << "*** AAA [" << nX << "][" << nY << "] dNotchBaseElev = " << dNotchBaseElev << endl;
106 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetLFSubCategory(LF_SUBCAT_CLIFF_ON_COASTLINE);
107 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffNotchBaseElev(dNotchBaseElev);
108 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffNotchDepth(0);
109 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffRemaining(m_dCellSide);
110
111 // Create a cliff object on the vector coastline with these attributes
112 CACoastLandform* pCliff = new CRWCliff(&m_VCoast[nCoast], nCoast, j, m_dCellSide, 0, dNotchBaseElev, 0);
113 m_VCoast[nCoast].AppendCoastLandform(pCliff);
114
115 // LogStream << m_ulIter << ": CLIFF CREATED [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "}" << endl;
116 }
117
118 else
119 {
120 // First timestep: we have unconsolidated sediment at SWL, so this is a drift cell: create a drift object on the vector coastline with these attributes
121 CACoastLandform* pDrift = new CRWDrift(&m_VCoast[nCoast], nCoast, j);
122 m_VCoast[nCoast].AppendCoastLandform(pDrift);
123
124 // Safety check
125 if (m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFCategory() != LF_CAT_DRIFT)
126 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetLFSubCategory(LF_SUBCAT_DRIFT_MIXED);
127
128 // LogStream << m_ulIter << ": DRIFT CREATED [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "}" << endl;
129 }
130 }
131
132 else
133 {
134 // This not the first timestep
135 if (bConsSedAtSWL)
136 {
137 // We have consolidated sediment at SWL, so this is a cliff cell. Set some default values
138 double dAccumWaveEnergy = 0;
139 double dNotchDepth = 0;
140 double const dRemaining = m_dCellSide;
141
142 // Get the existing landform category of this cell
143 if (m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFCategory() == LF_CAT_CLIFF)
144 {
145 // This cell was a cliff in a previous timestep, so get the data stored in the cell, this will be stored in the cliff object on the vector coastline
146 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetLFSubCategory(LF_SUBCAT_CLIFF_ON_COASTLINE);
147 dAccumWaveEnergy = m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->dGetAccumWaveEnergy();
148 dNotchDepth = m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->dGetCliffNotchDepth();
149 dNotchBaseElev = m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->dGetCliffNotchBaseElev();
150 // LogStream << "*** BBB [" << nX << "][" << nY << "] dNotchBaseElev = " << dNotchBaseElev << endl;
151 // dRemaining = m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->dGetCliffRemaining();
152
153 // LogStream << m_ulIter << ": CLIFF RE-CREATED [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "}" << endl;
154 }
155
156 else
157 {
158 // This cell was not a cliff object in a previous timestep. Mark it as one now and set the cell with the default values for the cliff object's attributes
159 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetLFSubCategory(LF_SUBCAT_CLIFF_ON_COASTLINE);
160 dAccumWaveEnergy = m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->dGetAccumWaveEnergy();
161 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffNotchDepth(dNotchDepth);
162 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffNotchBaseElev(dNotchBaseElev);
163 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffRemaining(dRemaining);
164
165 // LogStream << m_ulIter << ": CLIFF CREATED [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "}" << endl;
166 }
167
168 // Create a cliff object on the vector coastline with these attributes
169 CACoastLandform* pCliff = new CRWCliff(&m_VCoast[nCoast], nCoast, j, m_dCellSide, dNotchDepth, dNotchBaseElev, dAccumWaveEnergy);
170 m_VCoast[nCoast].AppendCoastLandform(pCliff);
171 }
172
173 else
174 {
175 // We have unconsolidated sediment at SWL, so this is a drift cell: create a drift object on the vector coastline with these attributes
176 CACoastLandform* pDrift = new CRWDrift(&m_VCoast[nCoast], nCoast, j);
177 m_VCoast[nCoast].AppendCoastLandform(pDrift);
178
179 // Safety check
180 if (m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFCategory() != LF_CAT_DRIFT)
181 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetLFSubCategory(LF_SUBCAT_DRIFT_MIXED);
182
183 // LogStream << m_ulIter << ": DRIFT CREATED [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "}" << endl;
184 }
185 }
186 }
187 }
188
189 // // DEBUG CODE ============================================================================================================================================
190 // for (int i = 0; i < static_cast<int>(m_VCoast.size()); i++)
191 // {
192 // for (int j = 0; j < m_VCoast[i].nGetCoastlineSize(); j++)
193 // {
194 // int
195 // nX = m_VCoast[i].pPtiGetCellMarkedAsCoastline(j)->nGetX(),
196 // nY = m_VCoast[i].pPtiGetCellMarkedAsCoastline(j)->nGetY();
197 //
198 // LogStream << m_ulIter << ": coast cell " << j << " at [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "} has landform category = ";
199 //
200 // int
201 // nCat = m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFCategory(),
202 // nSubCat = m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->nGetLFSubCategory();
203 //
204 // switch (nCat)
205 // {
206 // case LF_CAT_HINTERLAND:
207 // LogStream << "hinterland";
208 // break;
209 //
210 // case LF_CAT_SEA:
211 // LogStream << "sea";
212 // break;
213 //
214 // case LF_CAT_CLIFF:
215 // LogStream << "cliff";
216 // break;
217 //
218 // case LF_CAT_DRIFT:
219 // LogStream << "drift";
220 // break;
221 //
222 // case LF_CAT_INTERVENTION:
223 // LogStream << "intervention";
224 // break;
225 //
226 // case LF_NONE:
227 // LogStream << "none";
228 // break;
229 //
230 // default:
231 // LogStream << "NONE";
232 // break;
233 // }
234 //
235 // LogStream << " and landform subcategory = ";
236 //
237 // switch (nSubCat)
238 // {
239 // case LF_SUBCAT_CLIFF_ON_COASTLINE:
240 // LogStream << "cliff on coastline";
241 // break;
242 //
243 // case LF_SUBCAT_CLIFF_INLAND:
244 // LogStream << "cliff inland";
245 // break;
246 //
247 // case LF_SUBCAT_DRIFT_MIXED:
248 // LogStream << "mixed drift";
249 // break;
250 //
251 // case LF_SUBCAT_DRIFT_TALUS:
252 // LogStream << "talus";
253 // break;
254 //
255 // case LF_SUBCAT_DRIFT_BEACH:
256 // LogStream << "beach";
257 // break;
258 //
259 // case LF_SUBCAT_DRIFT_DUNES:
260 // LogStream << "dunes";
261 // break;
262 //
263 // case LF_SUBCAT_INTERVENTION_STRUCT:
264 // LogStream << "structural intervention";
265 // break;
266 //
267 // case LF_SUBCAT_INTERVENTION_NON_STRUCT:
268 // LogStream << "non-structural intervention";
269 // break;
270 //
271 // case LF_NONE:
272 // LogStream << "none";
273 // break;
274 //
275 // default:
276 // LogStream << "NONE";
277 // break;
278 // }
279 // LogStream << endl;
280 // }
281 // }
282 // // DEBUG CODE ============================================================================================================================================
283
284 return RTN_OK;
285}
286
287//===============================================================================================================================
289//===============================================================================================================================
290int CSimulation::nLandformToGrid(int const nCoast, int const nPoint)
291{
292 // What is the coastal landform here?
293 CACoastLandform* pCoastLandform = m_VCoast[nCoast].pGetCoastLandform(nPoint);
294 int const nCategory = pCoastLandform->nGetLandFormCategory();
295
296 if (nCategory == LF_CAT_CLIFF)
297 {
298 // It's a cliff
299 CRWCliff const* pCliff = reinterpret_cast<CRWCliff*>(pCoastLandform);
300
301 int const nX = m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(nPoint)->nGetX();
302 int const nY = m_VCoast[nCoast].pPtiGetCellMarkedAsCoastline(nPoint)->nGetY();
303
304 if (!pCliff->bHasCollapsed())
305 {
306 // The cliff has not collapsed. Get attribute values from the cliff object
307 double const dNotchBaseElev = pCliff->dGetNotchBaseElev();
308 double const dNotchDepth = pCliff->dGetNotchDepth();
309 double const dRemaining = pCliff->dGetRemaining();
310
311 // LogStream << "*** CCC [" << nX << "][" << nY << "] dNotchBaseElev = " << dNotchBaseElev << endl;
312
313 // And store some attribute values in the cliff cell
314 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetLFSubCategory(LF_SUBCAT_CLIFF_ON_COASTLINE);
315 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffNotchBaseElev(dNotchBaseElev);
316 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffNotchDepth(dNotchDepth);
317 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetCliffRemaining(dRemaining);
318 }
319
320 else
321 {
322 // The cliff has collapsed: all sediment above the base of the erosional notch is gone from this cliff object via cliff collapse, so this cell is no longer a cliff
323 m_pRasterGrid->m_Cell[nX][nY].SetInContiguousSea();
324
325 // Check the x-y extremities of the contiguous sea for the bounding box (used later in wave propagation)
326 if (nX < m_nXMinBoundingBox)
328
329 if (nX > m_nXMaxBoundingBox)
331
332 if (nY < m_nYMinBoundingBox)
334
335 if (nY > m_nYMaxBoundingBox)
337
338 // LogStream << m_ulIter << ": CLIFF REMOVED [" << nX << "][" << nY << "] = {" << dGridCentroidXToExtCRSX(nX) << ", " << dGridCentroidYToExtCRSY(nY) << "} is no longer a cliff landform" << endl;
339
340 int const nTopLayer = m_pRasterGrid->m_Cell[nX][nY].nGetTopLayerAboveBasement();
341
342 // Safety check
343 if (nTopLayer == INT_NODATA)
345
346 // Update the cell's layer elevations
347 m_pRasterGrid->m_Cell[nX][nY].CalcAllLayerElevsAndD50();
348
349 // And update the cell's sea depth
350 m_pRasterGrid->m_Cell[nX][nY].SetSeaDepth();
351 }
352
353 // Always accumulate wave energy
354 m_pRasterGrid->m_Cell[nX][nY].pGetLandform()->SetAccumWaveEnergy(pCliff->dGetTotAccumWaveEnergy());
355 }
356
357 else if (nCategory == LF_CAT_DRIFT)
358 {
359 // It's drift, so calculate D50 TODO 002 Why might we need this?
360 }
361
362 return RTN_OK;
363}
364
365//===============================================================================================================================
367//===============================================================================================================================
369{
370 // First pass: collect information about cells that need to be changed. This avoids race conditions from reading neighbour cells while writing to current cells
371 vector<vector<int>> vCellUpdates(m_nXGridSize, vector<int>(m_nYGridSize, -1));
372
373 // Read-only phase: determine what changes need to be made
374#ifdef _OPENMP
375#pragma omp parallel for collapse(2)
376#endif
377
378 for (int nX = 0; nX < m_nXGridSize; nX++)
379 {
380 for (int nY = 0; nY < m_nYGridSize; nY++)
381 {
382 // Get this cell's landform category
383 CRWCellLandform const* pLandform = m_pRasterGrid->m_Cell[nX][nY].pGetLandform();
384 int const nCat = pLandform->nGetLFCategory();
385
386 // Store what action to take (to avoid writing during read phase)
387 int nAction = -1; // -1 = no change, others defined below
388
389 if (m_pRasterGrid->m_Cell[nX][nY].bBasementElevIsMissingValue())
390 {
391 nAction = 0; // Set to unknown landform
392 }
393
395 {
396 if (m_pRasterGrid->m_Cell[nX][nY].bIsInundated())
397 {
398 nAction = 1; // Set to submerged sediment input
399 }
400
401 else
402 {
403 nAction = 2; // Set to not submerged sediment input
404 }
405 }
406
407 else if (nCat == LF_CAT_SEA)
408 {
409 // This is a sea cell. Is it surrounded by drift cells, or drift and cliff?
410 if (bSurroundedByDriftCells(nX, nY))
411 {
412 nAction = 3; // Set to beach
413 }
414
415 else if (m_pRasterGrid->m_Cell[nX][nY].dGetSedimentTopElev() > m_dThisIterSWL)
416 {
417 nAction = 4; // Set to island
418 }
419
420 // else keep as sea (no action needed)
421 }
422
423 else if (!m_pRasterGrid->m_Cell[nX][nY].bIsCoastline())
424 {
425 // Is not coastline
426 if (nCat == LF_CAT_CLIFF)
427 {
428 nAction = 5; // Set to former cliff
429 }
430
431 else if ((nCat != LF_CAT_DRIFT) && (nCat != LF_CAT_INTERVENTION))
432 {
433 nAction = 6; // Set to hinterland
434 }
435 }
436
437 vCellUpdates[nX][nY] = nAction;
438 }
439 }
440
441 // Write phase: apply the changes
442 for (int nX = 0; nX < m_nXGridSize; nX++)
443 {
444 for (int nY = 0; nY < m_nYGridSize; nY++)
445 {
446 int const nAction = vCellUpdates[nX][nY];
447
448 if (nAction == -1)
449 continue; // No change
450
451 CRWCellLandform* pLandform = m_pRasterGrid->m_Cell[nX][nY].pGetLandform();
452
453 switch (nAction)
454 {
455 case 0: // Set to unknown landform
456 pLandform->SetLFCategory(LF_NONE);
457 break;
458
459 case 1: // Set to submerged sediment input
461 m_pRasterGrid->m_Cell[nX][nY].SetInContiguousSea();
462 break;
463
464 case 2: // Set to not submerged sediment input
466 break;
467
468 case 3: // Set to beach
470 break;
471
472 case 4: // Set to island
473 pLandform->SetLFCategory(LF_CAT_ISLAND);
474 break;
475
476 case 5: // Set to former cliff
478 break;
479
480 case 6: // Set to hinterland
482 break;
483 }
484 }
485 }
486
487 return RTN_OK;
488}
489//===============================================================================================================================
491//===============================================================================================================================
492bool CSimulation::bSurroundedByDriftCells(int const nX, int const nY)
493{
494 int nXTmp;
495 int nYTmp;
496 int nAdjacent = 0;
497
498 // North
499 nXTmp = nX;
500 nYTmp = nY - 1;
501
502 if (bIsWithinValidGrid(nXTmp, nYTmp))
503 {
504 CRWCellLandform const* pLandform = m_pRasterGrid->m_Cell[nXTmp][nYTmp].pGetLandform();
505 int const nCat = pLandform->nGetLFCategory();
506
507 if ((nCat == LF_CAT_DRIFT) || (nCat == LF_CAT_CLIFF))
508 nAdjacent++;
509 }
510
511 // East
512 nXTmp = nX + 1;
513 nYTmp = nY;
514
515 if (bIsWithinValidGrid(nXTmp, nYTmp))
516 {
517 CRWCellLandform const* pLandform = m_pRasterGrid->m_Cell[nXTmp][nYTmp].pGetLandform();
518 int const nCat = pLandform->nGetLFCategory();
519
520 if ((nCat == LF_CAT_DRIFT) || (nCat == LF_CAT_CLIFF))
521 nAdjacent++;
522 }
523
524 // South
525 nXTmp = nX;
526 nYTmp = nY + 1;
527
528 if (bIsWithinValidGrid(nXTmp, nYTmp))
529 {
530 CRWCellLandform const* pLandform = m_pRasterGrid->m_Cell[nXTmp][nYTmp].pGetLandform();
531 int const nCat = pLandform->nGetLFCategory();
532
533 if ((nCat == LF_CAT_DRIFT) || (nCat == LF_CAT_CLIFF))
534 nAdjacent++;
535 }
536
537 // West
538 nXTmp = nX - 1;
539 nYTmp = nY;
540
541 if (bIsWithinValidGrid(nXTmp, nYTmp))
542 {
543 CRWCellLandform const* pLandform = m_pRasterGrid->m_Cell[nXTmp][nYTmp].pGetLandform();
544 int const nCat = pLandform->nGetLFCategory();
545
546 if ((nCat == LF_CAT_DRIFT) || (nCat == LF_CAT_CLIFF))
547 nAdjacent++;
548 }
549
550 if (nAdjacent == 4)
551 {
552 // This cell has four LF_CAT_DRIFT neighbours
553 return true;
554 }
555
556 return false;
557}
Abstract class, used as a base class for landform objects on the coastline.
double dGetTotAccumWaveEnergy(void) const
Get total accumulated wave energy.
int nGetLandFormCategory(void) const
Get the landform category.
Real-world class used to represent the landform of a cell.
int nGetLFCategory(void) const
Get the landform category.
void SetLFCategory(int const)
Set the landform category.
void SetLFSubCategory(int const)
Set the both the landform sub-category, and the landform category.
Real-world class used to represent the 'cliff' category of coastal landform object.
Definition cliff.h:33
bool bHasCollapsed(void) const
Returns the value of the cliff collapse switch.
Definition cliff.cpp:60
double dGetNotchBaseElev(void) const
Returns the elevation of the base of the erosional notch.
Definition cliff.cpp:72
double dGetNotchDepth(void) const
Returns the horizontal depth of the cliff's erosional notch (the 'overhang')
Definition cliff.cpp:96
double dGetRemaining(void) const
Returns the length (in external CRS units) of the cliff's remaining sediment 'behind' the erosional n...
Definition cliff.cpp:84
Real-world class used to represent the 'drift' category of coastal landform object.
Definition drift.h:32
Real-world class used to represent the 'intervention' category of coastal landform objects.
int m_nYMinBoundingBox
The minimum y value of the bounding box.
Definition simulation.h:544
double m_dThisIterSWL
The still water level for this timestep (this includes tidal changes and any long-term SWL change)
Definition simulation.h:712
CGeomRasterGrid * m_pRasterGrid
Pointer to the raster grid object.
int m_nXGridSize
The size of the grid in the x direction.
Definition simulation.h:457
int nAssignLandformsForAllCoasts(void)
Each timestep, classify coastal landforms and assign a coastal landform object to every point on ever...
ofstream LogStream
vector< CRWCoast > m_VCoast
The coastline objects.
int m_nYGridSize
The size of the grid in the y direction.
Definition simulation.h:460
int m_nXMaxBoundingBox
The maximum x value of the bounding box.
Definition simulation.h:541
double m_dNotchBaseBelowSWL
Notch base below SWL (m)
Definition simulation.h:919
double dGridCentroidYToExtCRSY(int const) const
Definition gis_utils.cpp:98
int nAssignLandformsForAllCells(void)
Each timestep, classify landforms for cells that are not on the coastline.
bool bSurroundedByDriftCells(int const, int const)
Returns true if this cell has four drift cells surrounding it.
int m_nYMaxBoundingBox
The maximum y value of the bounding box.
Definition simulation.h:547
int m_nXMinBoundingBox
The minimum x value of the bounding box.
Definition simulation.h:538
bool bIsWithinValidGrid(int const, int const) const
unsigned long m_ulIter
The number of the current iteration (time step)
Definition simulation.h:598
double dGridCentroidXToExtCRSX(int const) const
Definition gis_utils.cpp:87
double m_dCellSide
Length of a cell side (in external CRS units)
Definition simulation.h:658
bool bIsInterventionCell(int const, int const) const
Returns true if the cell is an intervention.
Definition utils.cpp:2946
double m_dThisIterMeanSWL
The mean still water level for this timestep (does not include tidal changes, but includes any long-t...
Definition simulation.h:715
int nLandformToGrid(int const, int const)
At the end of each timestep, this routine stores the attributes from a single coastal landform object...
Contains CRWCliff definitions.
This file contains global definitions for CoastalME.
int const LF_SUBCAT_DRIFT_BEACH
Definition cme.h:554
int const INT_NODATA
Definition cme.h:476
int const RTN_ERR_NO_TOP_LAYER
Definition cme.h:741
int const LF_CAT_SEA
Definition cme.h:536
int const LF_SUBCAT_CLIFF_ON_COASTLINE
Definition cme.h:548
int const ELEV_ABOVE_SEDIMENT_TOP
Definition cme.h:769
int const LF_CAT_SEDIMENT_INPUT
Definition cme.h:538
int const LF_CAT_SEDIMENT_INPUT_SUBMERGED
Definition cme.h:539
int const LF_CAT_DRIFT
Definition cme.h:544
int const LF_SUBCAT_CLIFF_INLAND
Definition cme.h:549
int const RTN_OK
Definition cme.h:695
int const LF_SUBCAT_DRIFT_MIXED
Definition cme.h:552
int const LF_CAT_SEDIMENT_INPUT_NOT_SUBMERGED
Definition cme.h:540
int const LF_NONE
Definition cme.h:532
int const RTN_ERR_CANNOT_ASSIGN_COASTAL_LANDFORM
Definition cme.h:745
int const ELEV_IN_BASEMENT
Definition cme.h:768
int const LF_CAT_CLIFF
Definition cme.h:543
int const LF_CAT_ISLAND
Definition cme.h:537
int const LF_CAT_HINTERLAND
Definition cme.h:535
int const LF_CAT_INTERVENTION
Definition cme.h:545
Contains CRWCoast definitions.
Contains CRWDrift definitions.
Contains CRWIntervention definitions.
Contains CSimulation definitions.