52using std::random_device;
88 InStream.open(strFilePathName.c_str(), ios::in);
91 if (! InStream.is_open())
94 cerr <<
ERR <<
"cannot open " << strFilePathName <<
" for input" << endl;
100 string strRec, strErr;
102 while (getline(InStream, strRec))
110 if ((! strRec.empty()) && (strRec[0] !=
QUOTE1) && (strRec[0] !=
QUOTE2))
116 size_t nPos = strRec.find(
COLON);
118 if (nPos == string::npos)
121 cerr <<
ERR <<
"on line " << nLine <<
": badly formatted (no ':') in " << strFilePathName << endl
122 <<
"'" << strRec <<
"'" << endl;
126 if (nPos == strRec.size() - 1)
129 cerr <<
ERR <<
"on line " << nLine <<
": badly formatted (nothing following ':') in " << strFilePathName << endl
130 <<
"'" << strRec <<
"'" << endl;
135 string strRH = strRec.erase(0, nPos + 1);
141 nPos = strRH.rfind(
QUOTE1);
143 if (nPos != string::npos)
146 nPos = strRH.rfind(
QUOTE2);
148 if (nPos != string::npos)
159 strErr =
"line " + to_string(nLine) +
": path and name of main datafile";
185 strErr =
"line " + to_string(nLine) +
": path for CoastalME output";
213 if (strRH.find(
'@') == string::npos)
214 strErr =
"line " + to_string(nLine) +
": email address for messages";
224 if (! strErr.empty())
227 cerr <<
ERR <<
"reading " << strErr <<
" in " << strFilePathName << endl
228 <<
"'" << strRec <<
"'" << endl;
272 if (!InStream.is_open())
282 string strRec, strErr;
284 while (getline(InStream, strRec))
292 if ((!strRec.empty()) && (strRec[0] !=
QUOTE1) && (strRec[0] !=
QUOTE2))
298 nPos = strRec.find(
COLON);
300 if (nPos == string::npos)
303 cerr <<
ERR <<
"on line " << to_string(nLine) <<
"badly formatted (no ':') in " <<
m_strDataPathName << endl
309 string strRH = strRec.erase(0, nPos + 1);
321 nPos = strRH.rfind(
QUOTE1);
323 if (nPos != string::npos)
329 nPos = strRH.rfind(
QUOTE2);
331 if (nPos != string::npos)
355 vector<string> VstrTmp;
363 strErr =
"line " + to_string(nLine) +
": output file names";
384 strErr =
"line " + to_string(nLine) +
": invalid integer for log file detail level '" + strRH +
"' in " +
m_strDataPathName;
391 strErr =
"line " + to_string(nLine) +
": log file detail level";
401 if (strRH.find(
'y') != string::npos)
411 if (VstrTmp.size() < 2)
413 strErr =
"line " + to_string(nLine) +
": must have both date and time for simulation start in '" +
m_strDataPathName +
"'";
418 if (!
bParseTime(&VstrTmp[0], nHour, nMin, nSec))
420 strErr =
"line " + to_string(nLine) +
": could not understand simulation start time in '" +
m_strDataPathName +
"'";
425 if (!
bParseDate(&VstrTmp[1], nDay, nMonth, nYear))
427 strErr =
"line " + to_string(nLine) +
": could not understand simulation start date in '" +
m_strDataPathName +
"'";
449 strErr =
"line " + to_string(nLine) +
": units for duration of simulation";
454 nPos = strRH.rfind(
SPACE);
456 if (nPos == string::npos)
458 strErr =
"line " + to_string(nLine) +
": format of duration simulation line";
472 strErr =
"line " + to_string(nLine) +
": duration of simulation must be > 0";
484 strErr =
"line " + to_string(nLine) +
": units for simulation timestep";
489 nPos = strRH.rfind(
SPACE);
491 if (nPos == string::npos)
493 strErr =
"line " + to_string(nLine) +
": format of simulation timestep";
506 strErr =
"line " + to_string(nLine) +
": invalid floating point number for timestep '" + strRH +
"' in " +
m_strDataPathName;
513 strErr =
"line " + to_string(nLine) +
": timestep of simulation must be > 0";
516 strErr =
"line " + to_string(nLine) +
": timestep of simulation must be < the duration of the simulation";
526 string const strOriginal = strRH;
527 size_t nCommaPos = 0;
534 size_t const nNextComma = strOriginal.find(
',', nCommaPos);
536 if (nNextComma != string::npos)
538 strGroup = strOriginal.substr(nCommaPos, nNextComma - nCommaPos);
539 nCommaPos = nNextComma + 1;
544 strGroup = strOriginal.substr(nCommaPos);
545 nCommaPos = string::npos;
552 if (strGroup.empty())
560 strErr =
"line " + to_string(nLine) +
": units for save intervals in group '" + strGroup +
"'";
565 size_t const nLastSpace = strGroup.rfind(
SPACE);
567 if (nLastSpace == string::npos)
569 strErr =
"line " + to_string(nLine) +
": format of save times/intervals in group '" + strGroup +
"'";
573 string strNumbers = strGroup.substr(0, nLastSpace);
577 size_t nSpacePos = 0;
582 size_t const nNextSpace = strNumbers.find(
SPACE, nSpacePos);
584 if (nNextSpace == string::npos)
587 string const strNumber = strNumbers.substr(nSpacePos, nNextSpace - nSpacePos);
589 if (!strNumber.empty())
593 strErr =
"line " + to_string(nLine) +
": too many save intervals";
597 double const dValue = strtod(strNumber.c_str(), NULL) * dMult;
601 nSpacePos = nNextSpace + 1;
602 }
while (nSpacePos < strNumbers.length());
604 if (! strErr.empty())
606 }
while (nCommaPos != string::npos);
608 if (! strErr.empty())
618 strErr =
"line " + to_string(nLine) +
": save interval cannot be less than timestep";
631 strErr =
"line " + to_string(nLine) +
": first save time cannot be less than timestep";
641 strErr =
"line " + to_string(nLine) +
": no save times specified";
662 nPos = strRH.find(
SPACE);
664 if (nPos == string::npos)
682 strTmp = strRH.substr(0, nPos);
690 strRH = strRH.substr(nPos, strRH.size() - nPos);
693 if (strRH.size() == 0)
713 strErr =
"line " + to_string(nLine) +
": invalid integer for max save digits for GIS output file names '" + strRH +
"' in " +
m_strDataPathName;
720 strErr =
"line " + to_string(nLine) +
": max save digits for GIS output file names must be > 1";
727 strErr =
"line " + to_string(nLine) +
": must specify save digits for GIS output as sequential or as iteration number";
734 if (strRH.find(
's') != string::npos)
740 else if (strRH.find(
'i') != string::npos)
749 strErr += to_string(nLine);
750 strErr +=
": invalid code for save digits for GIS output save number (must be s or i)";
763 strErr += to_string(nLine);
764 strErr +=
": must contain '";
768 strErr +=
"', or at least one raster GIS output code";
1255 if (! strRH.empty())
1256 strErr =
"line " + to_string(nLine) +
": unknown code '" + strRH +
"' in list of codes for raster GIS output";
1267 if (strRH.find(
"gpkg") != string::npos)
1268 strErr =
"GDAL gpkg raster create() is not yet working correctly. Please choose another output format.";
1278 if (strRH.find(
'y') != string::npos)
1289 if (strRH.find(
'y') != string::npos)
1296 if (! strRH.empty())
1301 nPos = strRH.find(
SPACE);
1303 if (nPos != string::npos)
1309 strTmp = strRH.substr(0, nPos);
1313 strRH = strRH.substr(nPos, strRH.size() - nPos);
1317 nPos = strRH.find(
SPACE);
1318 }
while (nPos != string::npos);
1332 strErr += to_string(nLine);
1333 strErr +=
": must contain '";
1335 strErr +=
"', or '";
1337 strErr +=
"', or at least one vector GIS output code";
1510 if (! strRH.empty())
1511 strErr =
"line " + to_string(nLine) +
": unknown code '" + strRH +
"' in list of vector GIS output codes";
1522 strErr =
"line " + to_string(nLine) +
": vector GIS output format";
1528 if (! strRH.empty())
1630 if (! strRH.empty())
1631 strErr =
"line " + to_string(nLine) +
": unknown code '" + strRH +
"' in list of time series output files";
1641 strErr =
"line " + to_string(nLine) +
": invalid integer for coastline smoothing algorithm '" + strRH +
"' in " +
m_strDataPathName;
1656 strErr =
"line " + to_string(nLine) +
": invalid integer for coastline smoothing window '" + strRH +
"' in " +
m_strDataPathName;
1663 strErr =
"line " + to_string(nLine) +
": size of coastline vector smoothing window (must be > 0 and odd)";
1671 strErr =
"line " + to_string(nLine) +
": invalid integer for Savitzky-Golay polynomial for coastline smoothing '" + strRH +
"' in " +
m_strDataPathName;
1678 strErr =
"line " + to_string(nLine) +
": value of Savitzky-Golay polynomial for coastline smoothing (must be <= 6)";
1686 if (strRH.find(
'n') != string::npos)
1691 if (strRH.find(
's') != string::npos)
1696 if (strRH.find(
'w') != string::npos)
1701 if (strRH.find(
'e') != string::npos)
1712 strErr =
"line " + to_string(nLine) +
": invalid integer for size of coastline smoothing window '" + strRH +
"' in " +
m_strDataPathName;
1719 strErr =
"line " + to_string(nLine) +
": size of profile vector smoothing window (must be >= 0, if > 0 must be odd)";
1727 strErr =
"line " + to_string(nLine) +
": invalid floating point number for max local slope '" + strRH +
"' in " +
m_strDataPathName;
1734 strErr =
"line " + to_string(nLine) +
": max local slope must be > 0";
1742 strErr =
"line " + to_string(nLine) +
": invalid floating point number for maximum elevation of beach above SWL '" + strRH +
"' in " +
m_strDataPathName;
1749 strErr =
"line " + to_string(nLine) +
": maximum elevation of beach above SWL must be >= 0";
1758 strErr =
"line " + to_string(nLine) +
": invalid integer for number of sediment layers '" + strRH +
"' in " +
m_strDataPathName;
1766 strErr =
"line " + to_string(nLine) +
": must be at least one sediment layer";
1809 if (! strRH.empty())
1832 for (
int nLayer = 0; nLayer <
m_nLayers; nLayer++)
1834 for (
int j = 1; j <= 6; j++)
1840 if (!getline(InStream, strRec))
1853 while (strRec.empty() || (strRec[0] ==
QUOTE1) || (strRec[0] ==
QUOTE2));
1856 nPos = strRec.find(
COLON);
1858 if (nPos == string::npos)
1861 cerr <<
ERR <<
"on line " << to_string(nLine) <<
": badly formatted (no ':') in " <<
m_strDataPathName << endl
1867 strRH = strRec.substr(nPos + 1);
1874 nPos = strRH.rfind(
QUOTE1);
1876 if (nPos != string::npos)
1879 nPos = strRH.rfind(
QUOTE2);
1881 if (nPos != string::npos)
1900 if (! strRH.empty())
1928 if (! strRH.empty())
1956 if (! strRH.empty())
1984 if (! strRH.empty())
2013 if (! strRH.empty())
2041 if (! strRH.empty())
2070 if (! strErr.empty())
2074 <<
"'" << strRec <<
"'" << endl;
2085 if (! strRH.empty())
2113 if (! strRH.empty())
2139 if (! strRH.empty())
2172 strErr =
"line " + to_string(nLine) +
": must specify both intervention class and intervention height files";
2181 strErr =
"line " + to_string(nLine) +
": must specify both intervention class and intervention height files";
2212 strErr =
"line " + to_string(nLine) +
": invalid integer for wave propagation model '" + strRH +
"' in " +
m_strDataPathName;
2227 strErr =
"line " + to_string(nLine) +
": invalid floating point number for sea water density '" + strRH +
"' in " +
m_strDataPathName;
2234 strErr =
"line " + to_string(nLine) +
": sea water density must be > 0";
2242 strErr =
"line " + to_string(nLine) +
": invalid floating point number for initial SWL '" + strRH +
"' in " +
m_strDataPathName;
2259 strErr =
"line " + to_string(nLine) +
": invalid floating point number for final SWL '" + strRH +
"' in " +
m_strDataPathName;
2271 strErr =
"line " + to_string(nLine) +
": deep water wave height in " +
m_strDataPathName +
" must be either a number or a filename (filename must not start with a number)";
2275 if (isdigit(strRH.at(0)))
2280 strErr =
"line " + to_string(nLine) +
": invalid floating point number for deep water wave height '" + strRH +
"' in " +
m_strDataPathName;
2290 strErr =
"line " + to_string(nLine) +
": deep water wave height must be > 0";
2326 strErr =
"line " + to_string(nLine) +
": filename missing for deep water wave height input";
2359 strErr =
"line " + to_string(nLine) +
": invalid floating point number for deep water wave orientation '" + strRH +
"' in " +
m_strDataPathName;
2366 strErr =
"line " + to_string(nLine) +
": deep water wave orientation must be zero degrees or more";
2369 strErr =
"line " + to_string(nLine) +
": deep water wave orientation must be less than 360 degrees";
2381 strErr =
"line " + to_string(nLine) +
": invalid floating point number for wave period '" + strRH +
"' in " +
m_strDataPathName;
2388 strErr =
"line " + to_string(nLine) +
": wave period must be > 0";
2395 if (! strRH.empty())
2421 strErr =
"line " + to_string(nLine) +
": invalid floating point number for breaking wave height to depth ratio '" + strRH +
"' in " +
m_strDataPathName;
2428 strErr =
"line " + to_string(nLine) +
": breaking wave height to depth ratio must be > 0";
2437 if (strRH.find(
'y') != string::npos)
2449 strErr =
"line " + to_string(nLine) +
": invalid floating point number for R (coast platform resistance to erosion) '" + strRH +
"' in " +
m_strDataPathName;
2453 m_dR = strtod(strRH.c_str(), NULL);
2456 strErr =
"line " + to_string(nLine) +
": R (coast platform resistance to erosion) value must be > 0";
2467 if (strRH.find(
'y') != string::npos)
2478 strErr =
"line " + to_string(nLine) +
": invalid integer for beach sediment transport at grid edges '" + strRH +
"' in " +
m_strDataPathName;
2496 strErr =
"line " + to_string(nLine) +
": invalid integer for beach erosion/deposition equation '" + strRH +
"' in " +
m_strDataPathName;
2512 strErr =
"line " + to_string(nLine) +
": invalid floating point number for median particle size of fine sediment '" + strRH +
"' in " +
m_strDataPathName;
2519 strErr =
"line " + to_string(nLine) +
": median particle size of fine sediment must be > 0";
2530 strErr =
"line " + to_string(nLine) +
": invalid floating point number for median particle size of sand sediment '" + strRH +
"' in " +
m_strDataPathName;
2537 strErr =
"line " + to_string(nLine) +
": median particle size of sand sediment must be > 0";
2548 strErr =
"line " + to_string(nLine) +
": invalid floating point number for median particle size of coarse sediment '" + strRH +
"' in " +
m_strDataPathName;
2555 strErr =
"line " + to_string(nLine) +
": median particle size of coarse sediment must be > 0";
2569 strErr =
"line " + to_string(nLine) +
": invalid floating point number for density of beach sediment '" + strRH +
"' in " +
m_strDataPathName;
2576 strErr =
"line " + to_string(nLine) +
": density of beach sediment must be > 0";
2588 strErr =
"line " + to_string(nLine) +
": invalid floating point number for porosity of beach sediment '" + strRH +
"' in " +
m_strDataPathName;
2595 strErr =
"line " + to_string(nLine) +
": porosity of beach sediment must be > 0";
2604 strErr =
"line " + to_string(nLine) +
": invalid floating point number for erodibility of fine-sized sediment '" + strRH +
"' in " +
m_strDataPathName;
2611 strErr =
"line " + to_string(nLine) +
": relative erodibility of fine-sized sediment must be between 0 and 1";
2619 strErr =
"line " + to_string(nLine) +
": invalid floating point number for erodibility of sand-sized sediment '" + strRH +
"' in " +
m_strDataPathName;
2626 strErr =
"line " + to_string(nLine) +
": relative erodibility of sand-sized sediment must be between 0 and 1";
2634 strErr =
"line " + to_string(nLine) +
": invalid floating point number for erodibility of coarse-sized sediment '" + strRH +
"' in " +
m_strDataPathName;
2642 strErr =
"line " + to_string(nLine) +
": relative erodibility of coarse-sized sediment must be between 0 and 1";
2647 strErr =
"line " + to_string(nLine) +
": must have at least one non-zero erodibility value";
2658 strErr =
"line " + to_string(nLine) +
": invalid floating point number for transport parameter KLS of CERC equation '" + strRH +
"' in " +
m_strDataPathName;
2662 m_dKLS = strtod(strRH.c_str(), NULL);
2669 strErr =
"line " + to_string(nLine) +
": transport parameter KLS of CERC equation must be > 0";
2681 strErr =
"line " + to_string(nLine) +
": invalid floating point number for transport parameter of Kamphuis equation '" + strRH +
"' in " +
m_strDataPathName;
2688 strErr =
"line " + to_string(nLine) +
": transport parameter of Kamphuis equation must be > 0";
2700 strErr =
"line " + to_string(nLine) +
": invalid floating point number for Dean profile start height above SWL '" + strRH +
"' in " +
m_strDataPathName;
2707 strErr =
"line " + to_string(nLine) +
": Berm height (Dean profile start height above SWL) must be >= 0";
2720 if (strRH.find(
'y') != string::npos)
2733 strErr =
"line " + to_string(nLine) +
": invalid floating point number for cliff resistance to erosion '" + strRH +
"' in " +
m_strDataPathName;
2740 strErr =
"line " + to_string(nLine) +
": cliff resistance to erosion must be > 0";
2752 strErr =
"line " + to_string(nLine) +
": invalid floating point number for cliff notch overhang at collapse '" + strRH +
"' in " +
m_strDataPathName;
2759 strErr =
"line " + to_string(nLine) +
": cliff notch overhang at collapse must be > 0";
2771 strErr =
"line " + to_string(nLine) +
": distance of cliff notch apex above MHW level must be >= 0";
2783 strErr =
"line " + to_string(nLine) +
": invalid floating point number for scale parameter A for cliff deposition '" + strRH +
"' in " +
m_strDataPathName;
2790 strErr =
"line " + to_string(nLine) +
": scale parameter A for cliff deposition must be 0 [= auto] or greater";
2802 strErr =
"line " + to_string(nLine) +
": invalid floating point number for width of cliff collapse talus '" + strRH +
"' in " +
m_strDataPathName;
2809 strErr =
"line " + to_string(nLine) +
": planview width of cliff deposition must be > 0";
2821 strErr =
"line " + to_string(nLine) +
": invalid floating point number for planview length of cliff deposition '" + strRH +
"' in " +
m_strDataPathName;
2828 strErr =
"line " + to_string(nLine) +
": planview length of cliff deposition must be > 0";
2840 strErr =
"line " + to_string(nLine) +
": invalid floating point number for height of cliff collapse (as a fraction of cliff elevation) '" + strRH +
"' in " +
m_strDataPathName;
2847 strErr =
"line " + to_string(nLine) +
": minimum height of cliff collapse (as a fraction of cliff elevation) must be >= 0";
2857 if (strRH.find(
'y') != string::npos)
2871 if (! strRH.empty())
2906 if (! strRH.empty())
2907 strErr =
"line " + to_string(nLine) +
": unknown code '" + strRH +
"' in list of riverine flooding output codes";
2911 strErr =
"line " + to_string(nLine) +
": if simulating riverine flooding, must contain '" +
VECTOR_ALL_RIVER_FLOOD_OUTPUT_CODE +
"' or at least one vector GIS output code for riverine flooding";
2924 if (strRH.find(
'y') != string::npos)
2934 if (! strRH.empty())
2958 strErr =
"line " + to_string(nLine) +
": path of location points file must not be empty if simulating floods";
2967 if (strRH.find(
'y') != string::npos)
2979 if (! strRH.empty())
3008 if (strRH.find(
'p') != string::npos)
3011 else if (strRH.find(
'c') != string::npos)
3014 else if (strRH.find(
'l') != string::npos)
3018 strErr =
"line " + to_string(nLine) +
": Sediment input type must be P, C, or L";
3029 strErr =
"line " + to_string(nLine) +
": filename missing for sediment input";
3060 strErr =
"line " + to_string(nLine) +
": invalid floating point number for gravitational acceleration '" + strRH +
"' in " +
m_strDataPathName;
3064 m_dG = strtod(strRH.c_str(), NULL);
3067 strErr =
"line " + to_string(nLine) +
": gravitational acceleration must be > 0";
3079 strErr =
"line " + to_string(nLine) +
": spacing of coastline normals must be > 0";
3087 strErr =
"line " + to_string(nLine) +
": invalid floating point number for random factor for spacing of coastline normals '" + strRH +
"' in " +
m_strDataPathName;
3094 strErr =
"line " + to_string(nLine) +
": random factor for spacing of coastline normals must be >= 0";
3096 strErr =
"line " + to_string(nLine) +
": random factor for spacing of coastline normals must be < 1";
3104 strErr =
"line " + to_string(nLine) +
": invalid floating point number for length of coastline normals '" + strRH +
"' in " +
m_strDataPathName;
3111 strErr =
"line " + to_string(nLine) +
": length of coastline normals must be > 0";
3119 strErr =
"line " + to_string(nLine) +
": invalid floating point number for start depth for wave calcs '" + strRH +
"' in " +
m_strDataPathName;
3126 strErr =
"line " + to_string(nLine) +
": start depth for wave calcs must be > 0";
3137 if (strRH.find(
'y') != string::npos)
3143 strErr =
"line " + to_string(nLine) +
": cannot save profiile data if not simulating shore platform erosion";
3158 for (
unsigned int j = 0; j < VstrTmp.size(); j++)
3160 VstrTmp[j] =
strTrim(&VstrTmp[j]);
3164 strErr =
"line " + to_string(nLine) +
": invalid integer for profile to be saved '" + VstrTmp[j] +
"' in " +
m_strDataPathName;
3168 int const nTmp = stoi(VstrTmp[j]);
3172 strErr =
"line " + to_string(nLine) +
": Profile number for saving must be >= 0";
3188 for (
unsigned int j = 0; j < VstrTmp.size(); j++)
3190 VstrTmp[j] =
strTrim(&VstrTmp[j]);
3191 unsigned long const ulTmp = atol(VstrTmp[j].c_str());
3195 strErr =
"line " + to_string(nLine) +
": Timestep for profile saves must >= 1";
3211 if (strRH.find(
'y') != string::npos)
3222 if (strRH.find(
'y') != string::npos)
3235 if (strRH.find(
'y') != string::npos)
3252 strErr += to_string(nLine);
3253 strErr +=
": invalid integer for cliff edge smoothing algorithm '";
3274 strErr =
"line " + to_string(nLine) +
": invalid integer for cliff edge smoothing window '" + strRH +
"' in " +
m_strDataPathName;
3281 strErr =
"line " + to_string(nLine) +
": size of cliff edge smoothing window (must be > 0 and odd)";
3292 strErr =
"line " + to_string(nLine) +
": invalid integer for Savitzky-Golay polynomial for cliff edge smoothing '" + strRH +
"' in " +
m_strDataPathName;
3299 strErr =
"line " + to_string(nLine) +
": order of Savitzky-Golay polynomial for cliff edge smoothing (must be 2, 4 or 6)";
3310 strErr =
"line " + to_string(nLine) +
": invalid number for cliff toe slope limit '" + strRH +
"' in " +
m_strDataPathName;
3317 strErr =
"line " + to_string(nLine) +
": cliff toe slope limit must be > 0";
3327 strErr =
"line " + to_string(nLine) +
": invalid code for run-up equation used in simulating floods";
3330 strErr =
"line " + to_string(nLine) +
": runup equation code must be between 0 and 3";
3336 if (! strErr.empty())
3339 cerr << endl <<
ERR << strErr <<
".\nPlease edit " <<
m_strDataPathName <<
" and change this line:" << endl;
3340 cerr <<
"'" << strRec <<
"'" << endl << endl;
3351 bool bNoRasterFiles =
true;
3354 bNoRasterFiles =
false;
3359 bNoRasterFiles =
false;
3365 cerr <<
ERR <<
"at least one raster GIS file is needed" << endl;
3384 if (! InStream.is_open())
3396 while (getline(InStream, strRec))
3404 if ((strRec.empty()) || (strRec[0] ==
QUOTE1) || (strRec[0] ==
QUOTE2))
3410 cerr <<
ERR <<
"invalid floating point number for tide data '" << strRec <<
"' on line " << nLine <<
" of " <<
m_strTideDataFile << endl;
3442 if (! InStream.is_open())
3451 int nExpected = 0, nRead = 0;
3455 InStream >> nExpected;
3458 vector<double> VdDepthOverDB;
3459 vector<double> VdErosionPotential;
3460 vector<double> VdErosionPotentialFirstDeriv;
3463 while (getline(InStream, strRec))
3471 if ((strRec.empty()) || (strRec[0] ==
QUOTE1) || (strRec[0] ==
QUOTE2))
3480 for (
unsigned int i = 0; i < strTmp.size(); i++)
3483 strTmp[i] =
strTrim(&strTmp[i]);
3488 cerr <<
ERR <<
"on line " + to_string(nLine) +
" invalid floating point number for Erosion Potential Shape data '" << strTmp[i] <<
"' in " <<
m_strSCAPEShapeFunctionFile << endl;
3494 VdDepthOverDB.push_back(strtod(strTmp[0].c_str(), NULL));
3495 VdErosionPotential.push_back(strtod(strTmp[1].c_str(), NULL));
3496 VdErosionPotentialFirstDeriv.push_back(strtod(strTmp[2].c_str(), NULL));
3508 if (nExpected != nRead)
3527 cout <<
ERR <<
"line " + to_string(nLine) +
" in " <<
m_strSCAPEShapeFunctionFile <<
": erosion potential function is unbounded for high values of depth over DB" << endl;
3548 if (!InStream.is_open())
3557 int nExpectedStations = 0;
3559 int nTimeStepsRead = 0;
3560 string strRec, strErr;
3563 while (getline(InStream, strRec))
3571 if ((!strRec.empty()) && (strRec[0] !=
QUOTE1) && (strRec[0] !=
QUOTE2))
3580 size_t nPos = strRec.find(
COLON);
3582 if (nPos == string::npos)
3586 <<
"'" << strRec <<
"'" << endl;
3590 if (nPos == strRec.size() - 1)
3594 <<
"'" << strRec <<
"'" << endl;
3599 string strRH = strRec.substr(nPos + 1);
3605 nPos = strRH.rfind(
QUOTE1);
3607 if (nPos != string::npos)
3610 nPos = strRH.rfind(
QUOTE2);
3612 if (nPos != string::npos)
3626 vector<string> VstrTmp;
3635 if (VstrTmp.size() < 2)
3637 strErr =
"line " + to_string(nLine) +
": must have both date and time for start of data in";
3642 if (!
bParseTime(&VstrTmp[0], nHour, nMin, nSec))
3644 strErr =
"line " + to_string(nLine) +
": could not understand start time for data";
3649 if (!
bParseDate(&VstrTmp[1], nDay, nMonth, nYear))
3651 strErr =
"line " + to_string(nLine) +
": could not understand start date for data";
3663 strErr =
"line " + to_string(nLine) +
": start time and date for wave time series data differs from simulation start time and date,";
3677 strErr =
"line " + to_string(nLine) +
": unknown units for timestep";
3682 nPos = strRH.rfind(
SPACE);
3684 if (nPos == string::npos)
3686 strErr =
"line " + to_string(nLine) +
": format of timestep line";
3699 strErr =
"line " + to_string(nLine) +
": invalid floating point number for timestep";
3703 dThisIter = strtod(strRH.c_str(), NULL) * dMult;
3706 strErr =
"line " + to_string(nLine) +
": timestep must be > 0";
3708 if (dThisIter >= 24)
3709 strErr =
"line " + to_string(nLine) +
": timestep must be < 24 hours";
3712 strErr =
"line " + to_string(nLine) +
": timestep must be the same as the simulation timestep";
3720 strErr =
"line " + to_string(nLine) +
": invalid integer for number of wave stations '" + strRH +
"' in " +
m_strDeepWaterWavesInputFile;
3724 nExpectedStations = stoi(strRH);
3727 if (nExpectedStations != nWaveStations)
3730 strErr =
"line " + to_string(nLine) +
": number of wave stations in " +
m_strDeepWaterWaveStationsShapefile +
" is " + to_string(nWaveStations) +
" but we have " + to_string(nExpectedStations) +
" stations";
3750 strErr =
"line " + to_string(nLine) +
": must have values for at least one timestep";
3765 for (
unsigned int i = 0; i < VstrTmp.size(); i++)
3768 VstrTmp[i] =
strTrim(&VstrTmp[i]);
3773 strErr =
"line " + to_string(nLine) +
": invalid floating point number for deep water wave value '" + VstrTmp[i] +
"' in " +
m_strDeepWaterWavesInputFile;
3781 for (
int i = 0; i < nExpectedStations; i++)
3800 if (! strErr.empty())
3804 <<
"'" << strRec <<
"'" << endl;
3847 for (
int j = 0; j < nExpectedStations; j++)
3862 cout <<
NOTE << strTmp;
3881 if (! InStream.is_open())
3891 string strRec, strErr;
3894 while (getline(InStream, strRec))
3902 if ((! strRec.empty()) && (strRec[0] !=
QUOTE1) && (strRec[0] !=
QUOTE2))
3911 unsigned int nTarget = 7;
3916 if (VstrTmp.size() < nTarget)
3918 strErr =
"line " + to_string(nLine) +
": too few data items on data line '" + to_string(nRead) +
"' in " +
m_strSedimentInputEventFile;
3925 strErr =
"line " + to_string(nLine) +
": invalid integer for Location ID of sediment input event '" + VstrTmp[0] +
"' in " +
m_strSedimentInputEventFile;
3929 int const nID = stoi(
strTrim(&VstrTmp[0]));
3936 strErr =
"line " + to_string(nLine) +
": invalid Location ID '" + to_string(nID) +
"' for sediment input event location event in " +
m_strSedimentInputEventFile;
3945 strErr =
"line " + to_string(nLine) +
": invalid time and/or date '" + VstrTmp[1] +
"' for sediment input event in " +
m_strSedimentInputEventFile;
3952 strErr =
"line " + to_string(nLine) +
": invalid floating point number '" + VstrTmp[2] +
"' for fine sediment volume for sediment input event in " +
m_strSedimentInputEventFile;
3956 double const dFineSedVol = stod(
strTrim(&VstrTmp[2]));
3958 if (dFineSedVol < 0)
3960 strErr =
"line " + to_string(nLine) +
": negative number '" + to_string(dFineSedVol) +
"' for fine sediment volume for sediment input event in " +
m_strSedimentInputEventFile;
3964 if (dFineSedVol > 0)
3970 strErr =
"line " + to_string(nLine) +
": invalid floating point number '" + VstrTmp[3] +
"' for sand-sized sediment volume for sediment input event in " +
m_strSedimentInputEventFile;
3974 double const dSandSedVol = stod(
strTrim(&VstrTmp[3]));
3976 if (dSandSedVol < 0)
3978 strErr =
"line " + to_string(nLine) +
": negative number '" + to_string(dSandSedVol) +
"' for sand-sized sediment volume for sediment input event in " +
m_strSedimentInputEventFile;
3982 if (dSandSedVol > 0)
3988 strErr =
"line " + to_string(nLine) +
": invalid floating point number '" + VstrTmp[4] +
"' for coarse sediment volume for sediment input event in " +
m_strSedimentInputEventFile;
3992 double const dCoarseSedVol = stod(
strTrim(&VstrTmp[4]));
3994 if (dCoarseSedVol < 0)
3996 strErr =
"line " + to_string(nLine) +
": negative number '" + to_string(dCoarseSedVol) +
"' for coarse sediment volume of sediment input event in " +
m_strSedimentInputEventFile;
4000 if (dCoarseSedVol > 0)
4013 strErr =
"line " + to_string(nLine) +
": invalid floating point number '" + VstrTmp[5] +
"' for coast-normal length of sediment input event in " +
m_strSedimentInputEventFile;
4017 dLen = stod(
strTrim(&VstrTmp[5]));
4021 strErr =
"line " + to_string(nLine) +
": coast-normal length of the sediment block '" + to_string(dLen) +
"' must be > 0 in " +
m_strSedimentInputEventFile;
4028 strErr =
"line " + to_string(nLine) +
": invalid floating point number '" + VstrTmp[6] +
"' for along-coast width of sediment input event in " +
m_strSedimentInputEventFile;
4032 dWidth = stod(
strTrim(&VstrTmp[6]));
4036 strErr =
"line " + to_string(nLine) +
": along-coast width (m) of the sediment block '" + to_string(dWidth) +
"' must be > 0 in " +
m_strSedimentInputEventFile;
4064 if (! strErr.empty())
4068 <<
"'" << strRec <<
"'" << endl;
4095 size_t nDotPos = strFileName.find_last_of(
'.');
4096 if (nDotPos != string::npos)
4098 string strExt = strFileName.substr(nDotPos + 1);
4099 std::transform(strExt.begin(), strExt.end(), strExt.begin(), ::tolower);
4101 if (strExt ==
"yaml" || strExt ==
"yml")
4106 else if (strExt ==
"dat")
4151 auto processFilePath = [&](
string const &filePath) ->
string
4153 if (filePath.empty())
4169 (filePath[0] ==
TILDE) ||
4170 (filePath.length() > 1 && filePath[1] ==
COLON))
4176 return basePath + filePath;
4182 if (root.
HasChild(
"run_information"))
4185 if (runInfo.
HasChild(
"output_file_names"))
4187 if (runInfo.
HasChild(
"log_file_detail"))
4190 if (runInfo.
HasChild(
"csv_per_timestep_results"))
4219 if (gis.
HasChild(
"max_save_digits"))
4221 if (gis.
HasChild(
"save_digits_mode"))
4247 if (hydro.
HasChild(
"wave_propagation_model"))
4250 if (strModel ==
"COVE")
4252 else if (strModel ==
"CShore")
4255 if (hydro.
HasChild(
"seawater_density"))
4258 if (hydro.
HasChild(
"initial_water_level"))
4261 if (hydro.
HasChild(
"final_water_level"))
4266 if (hydro.
HasChild(
"wave_height_time_series"))
4269 if (hydro.
HasChild(
"wave_height_shape_file"))
4275 if (hydro.
HasChild(
"wave_orientation"))
4282 if (hydro.
HasChild(
"tide_data_file"))
4284 if (hydro.
HasChild(
"breaking_wave_ratio"))
4290 if (root.
HasChild(
"grid_and_coastline"))
4293 if (grid.
HasChild(
"coastline_smoothing"))
4296 if (strSmoothing ==
"none")
4298 else if (strSmoothing ==
"running_mean")
4300 else if (strSmoothing ==
"savitzky_golay")
4306 if (grid.
HasChild(
"coastline_smoothing_window"))
4309 if (grid.
HasChild(
"polynomial_order"))
4312 if (grid.
HasChild(
"omit_grid_edges"))
4314 if (grid.
HasChild(
"profile_smoothing_window"))
4317 if (grid.
HasChild(
"max_local_slope"))
4320 if (grid.
HasChild(
"max_beach_elevation"))
4326 if (root.
HasChild(
"layers_and_files"))
4331 if (layers.
HasChild(
"basement_dem_file"))
4334 if (layers.
HasChild(
"suspended_sediment_file"))
4337 if (layers.
HasChild(
"landform_file"))
4340 if (layers.
HasChild(
"intervention_class_file"))
4343 if (layers.
HasChild(
"intervention_height_file"))
4351 vector<string> unconsFine, unconsSand, unconsCoarse;
4352 vector<string> consFine, consSand, consCoarse;
4354 if (layer0.
HasChild(
"unconsolidated_fine"))
4355 unconsFine.push_back(processFilePath(
4357 if (layer0.
HasChild(
"unconsolidated_sand"))
4358 unconsSand.push_back(processFilePath(
4360 if (layer0.
HasChild(
"unconsolidated_coarse"))
4361 unconsCoarse.push_back(processFilePath(
4363 if (layer0.
HasChild(
"consolidated_fine"))
4366 if (layer0.
HasChild(
"consolidated_sand"))
4369 if (layer0.
HasChild(
"consolidated_coarse"))
4370 consCoarse.push_back(processFilePath(
4383 if (root.
HasChild(
"sediment_and_erosion"))
4386 if (sed.
HasChild(
"coast_platform_erosion"))
4389 if (sed.
HasChild(
"platform_erosion_resistance"))
4392 if (sed.
HasChild(
"beach_sediment_transport"))
4395 if (sed.
HasChild(
"beach_transport_at_edges"))
4398 if (sed.
HasChild(
"beach_erosion_equation"))
4403 if (sed.
HasChild(
"sediment_density"))
4406 if (sed.
HasChild(
"beach_sediment_porosity"))
4411 if (sed.
HasChild(
"kamphuis_parameter"))
4440 if (root.
HasChild(
"cliff_parameters"))
4443 if (cliff.
HasChild(
"cliff_collapse"))
4446 if (cliff.
HasChild(
"cliff_erosion_resistance"))
4449 if (cliff.
HasChild(
"notch_overhang"))
4454 if (cliff.
HasChild(
"deposition_scale_parameter_a"))
4459 if (cliff.
HasChild(
"min_talus_length"))
4462 if (cliff.
HasChild(
"min_talus_height"))
4468 if (root.
HasChild(
"flood_parameters"))
4473 if (flood.
HasChild(
"flood_coastline"))
4475 if (flood.
HasChild(
"runup_equation"))
4477 if (flood.
HasChild(
"characteristic_locations"))
4480 if (flood.
HasChild(
"flood_input_location"))
4486 if (root.
HasChild(
"sediment_input_parameters"))
4489 if (sedInput.
HasChild(
"sediment_input"))
4497 if (sedInput.
HasChild(
"details_file"))
4503 if (root.
HasChild(
"physics_and_geometry"))
4506 if (physics.
HasChild(
"gravitational_acceleration"))
4509 if (physics.
HasChild(
"normal_spacing"))
4512 if (physics.
HasChild(
"random_factor"))
4515 if (physics.
HasChild(
"normal_length"))
4518 if (physics.
HasChild(
"start_depth_ratio"))
4521 if (physics.
HasChild(
"synthetic_transect_spacing"))
4527 if (root.
HasChild(
"profile_and_output"))
4530 if (profile.
HasChild(
"save_profile_data"))
4533 if (profile.
HasChild(
"save_parallel_profiles"))
4536 if (profile.
HasChild(
"output_erosion_potential"))
4539 if (profile.
HasChild(
"curvature_window"))
4544 if (profile.
HasChild(
"profile_numbers"))
4549 vector<int> vecNums;
4550 vector<CYamlNode> seq = profileNums.
GetSequence();
4551 for (
auto const &node : seq)
4552 vecNums.push_back(node.GetIntValue());
4556 if (profile.
HasChild(
"profile_timesteps"))
4561 vector<unsigned long> vecTimes;
4562 vector<CYamlNode> seq = profileTimes.
GetSequence();
4563 for (
auto const &node : seq)
4564 vecTimes.push_back(node.GetULongValue());
4571 if (root.
HasChild(
"cliff_edge_processing"))
4574 if (cliffEdge.
HasChild(
"cliff_edge_smoothing"))
4576 string strSmoothing =
4578 if (strSmoothing ==
"none")
4580 else if (strSmoothing ==
"running_mean")
4582 else if (strSmoothing ==
"savitzky_golay")
4588 if (cliffEdge.
HasChild(
"cliff_edge_smoothing_window"))
4591 if (cliffEdge.
HasChild(
"cliff_edge_polynomial_order"))
4594 if (cliffEdge.
HasChild(
"cliff_slope_limit"))
4599 catch (std::exception
const &e)
4601 cerr <<
ERR <<
"Error processing YAML configuration: " << e.what() << endl;
4613 string strRec, strErr;
4633 if (! strStartDateTime.empty())
4636 if (VstrTmp.size() >= 2)
4638 int nHour, nMin, nSec, nDay, nMonth, nYear;
4639 if (
bParseTime(&VstrTmp[0], nHour, nMin, nSec))
4641 if (
bParseDate(&VstrTmp[1], nDay, nMonth, nYear))
4656 if (! strDuration.empty())
4658 string strDurationLower =
strToLower(&strDuration);
4663 string strNumeric = strDurationLower;
4665 if (strNumeric.find(
"hour") != string::npos)
4666 strNumeric = strNumeric.substr(0, strNumeric.find(
"hour"));
4667 else if (strNumeric.find(
"day") != string::npos)
4668 strNumeric = strNumeric.substr(0, strNumeric.find(
"day"));
4669 else if (strNumeric.find(
"month") != string::npos)
4670 strNumeric = strNumeric.substr(0, strNumeric.find(
"month"));
4671 else if (strNumeric.find(
"year") != string::npos)
4672 strNumeric = strNumeric.substr(0, strNumeric.find(
"year"));
4676 m_dSimDuration = strtod(strNumeric.c_str(), NULL) * dDurationMult;
4683 if (! strTimestep.empty())
4685 string strTimestepLower =
strToLower(&strTimestep);
4690 std::string strNumeric = strTimestepLower;
4692 if (strNumeric.find(
"hour") != string::npos)
4693 strNumeric = strNumeric.substr(0, strNumeric.find(
"hour"));
4694 else if (strNumeric.find(
"day") != string::npos)
4695 strNumeric = strNumeric.substr(0, strNumeric.find(
"day"));
4696 else if (strNumeric.find(
"month") != string::npos)
4697 strNumeric = strNumeric.substr(0, strNumeric.find(
"month"));
4698 else if (strNumeric.find(
"year") != string::npos)
4699 strNumeric = strNumeric.substr(0, strNumeric.find(
"year"));
4703 m_dTimeStep = strtod(strNumeric.c_str(), NULL) * dTimestepMult;
4707 "timestep of simulation must be > 0";
4711 " timestep of simulation must be < the duration of the "
4718 if (! vecSaveTimes.empty())
4723 for (
string const &strSaveTime : vecSaveTimes)
4725 if (strSaveTime.empty())
4728 string strSaveTimeLower =
strToLower(&strSaveTime);
4735 size_t nLastSpace = strSaveTimeLower.rfind(
SPACE);
4736 if (nLastSpace != string::npos)
4738 string strNumbers = strSaveTimeLower.substr(0, nLastSpace);
4743 for (
string const &strNum : VstrNumbers)
4745 if (! strNum.empty())
4749 double dValue = strtod(strNum.c_str(), NULL) * dMult;
4800 strErr =
"max save digits for GIS output file names must be > 1";
4804 if (! strSaveDigitsMode.empty())
4806 string strSaveDigitsLower =
strToLower(&strSaveDigitsMode);
4807 if (strSaveDigitsLower.find(
's') != string::npos)
4809 else if (strSaveDigitsLower.find(
'i') != string::npos)
4815 if (! rasterFiles.empty())
4869 for (
string const &rasterCode : rasterFiles)
4871 string code = rasterCode;
4872 std::transform(code.begin(), code.end(), code.begin(), ::tolower);
4874 if (code ==
"suspended_sediment")
4876 else if (code ==
"avg_suspended_sediment")
4878 else if (code ==
"fine_uncons")
4880 else if (code ==
"fine_cons")
4882 else if (code ==
"sand_uncons")
4884 else if (code ==
"sand_cons")
4886 else if (code ==
"coarse_uncons")
4888 else if (code ==
"coarse_cons")
4890 else if (code ==
"sediment_top_elevation")
4892 else if (code ==
"top_elevation")
4894 else if (code ==
"sea_depth")
4896 else if (code ==
"wave_height")
4898 else if (code ==
"wave_orientation")
4900 else if (code ==
"wave_period")
4902 else if (code ==
"potential_platform_erosion")
4904 else if (code ==
"actual_platform_erosion")
4906 else if (code ==
"total_potential_platform_erosion")
4908 else if (code ==
"total_actual_platform_erosion")
4910 else if (code ==
"potential_beach_erosion")
4912 else if (code ==
"actual_beach_erosion")
4914 else if (code ==
"total_potential_beach_erosion")
4916 else if (code ==
"total_actual_beach_erosion")
4918 else if (code ==
"beach_deposition")
4920 else if (code ==
"total_beach_deposition")
4922 else if (code ==
"landform")
4930 else if (code ==
"avg_sea_depth")
4932 else if (code ==
"avg_wave_height")
4934 else if (code ==
"avg_wave_orientation")
4936 else if (code ==
"beach_protection")
4938 else if (code ==
"basement_elevation")
4940 else if (code ==
"coastline")
4942 else if (code ==
"coast_normal")
4944 else if (code ==
"active_zone")
4946 else if (code ==
"cliff_collapse")
4948 else if (code ==
"total_cliff_collapse")
4950 else if (code ==
"cliff_collapse_deposition")
4952 else if (code ==
"total_cliff_collapse_deposition")
4954 else if (code ==
"polygon")
4956 else if (code ==
"potential_platform_erosion_mask")
4958 else if (code ==
"sea_mask")
4960 else if (code ==
"beach_mask")
4962 else if (code ==
"shadow_zone_codes")
4964 else if (code ==
"deep_water_wave_angle")
4966 else if (code ==
"deep_water_wave_height")
4968 else if (code ==
"deep_water_wave_period")
4970 else if (code ==
"polygon_uncons_sediment_up_or_down_drift")
4972 else if (code ==
"polygon_uncons_sediment_gain_or_loss")
4995 if (! vectorFiles.empty())
5020 for (
string const &vectorCode : vectorFiles)
5022 string code = vectorCode;
5023 std::transform(code.begin(), code.end(), code.begin(), ::tolower);
5025 if (code ==
"coast")
5027 else if (code ==
"cliff_edge")
5029 else if (code ==
"wave_angle")
5031 else if (code ==
"normals")
5033 else if (code ==
"invalid_normals")
5035 else if (code ==
"avg_wave_angle")
5037 else if (code ==
"wave_energy")
5039 else if (code ==
"mean_wave_energy")
5041 else if (code ==
"breaking_wave_height")
5043 else if (code ==
"coast_curvature")
5045 else if (code ==
"polygon_node")
5047 else if (code ==
"polygon")
5049 else if (code ==
"cliff_notch")
5051 else if (code ==
"wave_transect_points")
5053 else if (code ==
"shadow_boundary")
5055 else if (code ==
"downdrift_boundary")
5057 else if (code ==
"deep_water_wave_angle")
5059 else if (code ==
"wave_setup")
5061 else if (code ==
"storm_surge")
5063 else if (code ==
"run_up")
5065 else if (code ==
"flood_line")
5076 if (! timeseriesFiles.empty())
5078 for (
string const ×eriesCode : timeseriesFiles)
5080 string code = timeseriesCode;
5081 std::transform(code.begin(), code.end(), code.begin(), ::tolower);
5083 if (code ==
"sea_area")
5085 if (code ==
"water_level")
5087 if (code ==
"platform_erosion")
5089 if (code ==
"cliff_collapse_erosion")
5091 if (code ==
"cliff_collapse_deposition")
5093 if (code ==
"cliff_collapse_net")
5095 if (code ==
"beach_erosion")
5097 if (code ==
"beach_deposition")
5099 if (code ==
"beach_change_net")
5101 if (code ==
"suspended")
5103 if (code ==
"suspended")
5105 if (code ==
"wave_setup")
5107 if (code ==
"wave_runup")
5109 if (code ==
"cliff_notch")
5127 if (strRH.find(
'n') != string::npos)
5132 if (strRH.find(
's') != string::npos)
5137 if (strRH.find(
'w') != string::npos)
5142 if (strRH.find(
'e') != string::npos)
5215 if (! strSuspendedSed.empty())
5226 if (! strInterventionClass.empty())
5232 if (! strInterventionHeight.empty())
5249 if (! strInterventionHeight.empty())
5413 if (! floodFiles.empty())
5415 for (
string const &floodCode : floodFiles)
5417 string code = floodCode;
5418 std::transform(code.begin(), code.end(), code.begin(), ::tolower);
5420 if (code ==
"sea_area")
5465 if (strRH.find(
'p') != string::npos)
5468 else if (strRH.find(
'c') != string::npos)
5471 else if (strRH.find(
'l') != string::npos)
Unified configuration class for CoastalME simulation parameters.
bool HasFinalWaterLevel() const
void SetCoastlineSmoothingWindow(int n)
string GetOmitGridEdges() const
int GetPolynomialOrder() const
bool GetFloodInput() const
string GetRunName() const
double GetBeachSedimentPorosity() const
void SetSedimentInput(bool b)
double GetFineErosivity() const
string GetInterventionHeightFile() const
void SetBeachSedimentPorosity(double d)
bool GetSaveProfileData() const
int GetCliffEdgeSmoothing() const
void SetBermHeight(double d)
int GetCoastlineSmoothingWindow() const
double GetMaxBeachElevation() const
void SetMinTalusHeight(double d)
void SetCoarseErosivity(double d)
double GetFinalWaterLevel() const
void SetCurvatureWindow(int n)
void SetMaxBeachElevation(double d)
void SetNotchBase(double d)
void SetInterventionClassFile(string const &str)
bool GetBeachSedimentTransport() const
string GetBasementDEMFile() const
double GetBreakingWaveRatio() const
void SetSeawaterDensity(double d)
double GetPlatformErosionResistance() const
void SetSaveDigitsMode(string const &str)
void SetInitialWaterLevel(double d)
void SetCliffDepositionA(double d)
double GetSedimentDensity() const
double GetNormalLength() const
void SetFloodInput(bool b)
void SetNormalLength(double d)
string GetWaveStationDataFile() const
double GetRandomFactor() const
vector< string > GetTimeSeriesFiles() const
Get time series files with keyword expansion support.
vector< string > GetFloodFiles() const
Get time series files with keyword expansion support.
string GetStartDateTime() const
vector< string > GetConsCoarseFiles() const
void SetProfileTimesteps(vector< unsigned long > const &vec)
void SetTideDataFile(string const &str)
void SetBeachErosionEquation(int n)
void SetDeepWaterWaveHeight(double d)
double GetCoarseErosivity() const
double GetCliffSlopeLimit() const
void SetFineMedianSize(double d)
vector< int > GetProfileNumbers() const
vector< string > GetUnconsFineFiles() const
int GetBeachErosionEquation() const
void SetFloodCoastline(string const &str)
string GetSaveDigitsMode() const
double GetSandMedianSize() const
int GetCurvatureWindow() const
int GetMaxSaveDigits() const
void SetRandomFactor(double d)
void SetConsSandFiles(vector< string > const &vec)
string GetInterventionClassFile() const
string GetTimestep() const
double GetNotchOverhang() const
void SetWaveStationDataFile(string const &str)
double GetCoarseMedianSize() const
double GetMaxLocalSlope() const
double GetSandErosivity() const
void SetPolynomialOrder(int n)
vector< string > GetSaveTimes() const
void SetCliffErosionResistance(double d)
void SetCliffEdgePolynomialOrder(int n)
void SetDuration(string const &str)
void SetMaxSaveDigits(int n)
void SetCoarseMedianSize(double d)
void SetCliffSlopeLimit(double d)
void SetRunName(string const &str)
void SetFloodInputLocation(string const &str)
void SetGravitationalAcceleration(double d)
void SetScaleValues(bool b)
void SetBeachTransportAtEdges(int n)
double GetSeawaterDensity() const
bool GetWorldFile() const
double GetNotchBase() const
void SetProfileNumbers(vector< int > const &vec)
int GetRunupEquation() const
void SetKamphuis(double d)
double GetMinTalusLength() const
string GetDuration() const
void SetSedimentInputLocation(string const &str)
double GetDeepWaterWaveHeight() const
void SetWaveHeightTimeSeries(string const &str)
void SetVectorFiles(vector< string > const &vec)
bool GetCSVPerTimestepResults() const
void SetDeepWaterWaveOrientation(double d)
double GetDeepWaterWaveOrientation() const
double GetCliffErosionResistance() const
void SetNormalSpacing(double d)
void SetSaveProfileData(bool b)
int GetWavePropagationModel() const
void SetConsCoarseFiles(vector< string > const &vec)
void SetSedimentDensity(double d)
void SetSandErosivity(double d)
void SetFineErosivity(double d)
vector< unsigned long > GetProfileTimesteps() const
vector< double > GetSliceElevations() const
string GetVectorFormat() const
void SetCliffEdgeSmoothing(int n)
double GetTalusWidth() const
void SetCliffEdgeSmoothingWindow(int n)
void SetProfileSmoothingWindow(int n)
int GetBeachTransportAtEdges() const
void SetUnconsSandFiles(vector< string > const &vec)
void SetSedimentInputDetails(string const &str)
void SetOmitGridEdges(string const &str)
void SetStartDateTime(string const &str)
void SetSuspendedSedFile(string const &str)
vector< string > GetUnconsSandFiles() const
void SetPlatformErosionResistance(double d)
double GetFineMedianSize() const
void SetBasementDEMFile(string const &str)
bool GetCoastPlatformErosion() const
double GetBermHeight() const
void SetUnconsCoarseFiles(vector< string > const &vec)
void SetWavePropagationModel(int n)
void SetBeachSedimentTransport(bool b)
void SetCSVPerTimestepResults(bool b)
void SetSandMedianSize(double d)
void SetFinalWaterLevel(double d)
double GetTransportKLS() const
vector< string > GetConsSandFiles() const
void SetRandomSeed(int n)
int GetProfileSmoothingWindow() const
bool GetCliffCollapse() const
double GetNormalSpacing() const
void SetRasterFormat(string const &str)
void SetWavePeriod(double d)
void SetFloodLocations(string const &str)
string GetSedimentInputType() const
vector< string > GetConsFineFiles() const
int GetCoastlineSmoothing() const
void SetRunupEquation(string const &str)
bool GetSedimentInput() const
void SetNotchOverhang(double d)
bool GetScaleValues() const
double GetSyntheticTransectSpacing() const
bool GetSaveParallelProfiles() const
void SetInterventionHeightFile(string const &str)
string GetFloodLocations() const
double GetGravitationalAcceleration() const
void SetUnconsFineFiles(vector< string > const &vec)
double GetKamphuis() const
string GetTideDataFile() const
void SetOutputErosionPotential(bool b)
void SetCliffCollapse(bool b)
string GetFloodInputLocation() const
void SetBreakingWaveRatio(double d)
double GetWavePeriod() const
void SetWorldFile(bool b)
void SetConsFineFiles(vector< string > const &vec)
vector< string > GetUnconsCoarseFiles() const
void SetTalusWidth(double d)
vector< string > GetRasterFiles() const
Get raster files with keyword expansion support.
int GetLogFileDetail() const
void SetCoastlineSmoothing(int n)
void SetMinTalusLength(double d)
void SetTransportKLS(double d)
void SetSaveTimes(vector< string > const &vec)
void SetLandformFile(string const &str)
void SetStartDepthRatio(double d)
vector< string > GetVectorFiles() const
Get vector files with keyword expansion support.
void SetRasterFiles(vector< string > const &vec)
void SetSaveParallelProfiles(bool b)
double GetMinTalusHeight() const
double GetInitialWaterLevel() const
void SetMaxLocalSlope(double d)
string GetLandformFile() const
bool GetOutputErosionPotential() const
string GetRasterFormat() const
string GetWaveHeightTimeSeries() const
int GetRandomSeed() const
string GetSedimentInputLocation() const
string GetSuspendedSedFile() const
void SetLogFileDetail(int n)
void SetTimestep(string const &str)
bool UseSystemTimeForRandomSeed() const
void SetCoastPlatformErosion(bool b)
void SetSedimentInputType(string const &str)
void SetSyntheticTransectSpacing(double d)
double m_dCliffDepositionPlanviewWidth
Planview width of cliff collapse talus (m)
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?
bool m_bCliffToeLocate
Cliff to location?
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 bReadYamlFile(void)
Reads YAML configuration file.
int m_nGISMaxSaveDigits
The maximum number of digits in GIS filenames. These can be sequential, or the iteration number.
double m_dSyntheticTransectSpacing
Approximate minimum spacing (m) between wave transects (real and synthetic) for wave interpolation de...
string m_strInitialSuspSedimentFile
Name of initial suspended sediment file.
bool m_bSlopeConsSedSave
Save slope of consolidated sediment raster GIS files?
vector< double > m_VdTSDeepWaterWaveStationPeriod
Time series of wave period at deep water wave station.
bool m_bFineUnconsSedSave
Save fine unconsolidated sediment raster GIS files?
string m_strSedimentInputEventFile
The name of the sediment input events time series file.
bool m_bHaveConsolidatedSediment
Does this simulation consider consolidated sediment, or is it an unconsolidated sediment only simulat...
bool m_bFloodSWLSetupSurgeLine
Are we saving the flood still water level setup surge line? TODO 007 Finish surge and runup stuff.
string m_strCMEIni
Folder for the CME .ini file.
bool m_bSedimentInputAtPoint
Do we have sediment inputat a point?
double m_dG
Gravitational acceleration (m**2/sec)
vector< string > m_VstrInitialCoarseUnconsSedimentFile
The name of the initial coarse-sized unconsolidated sediment GIS file.
int m_nBeachErosionDepositionEquation
Which beach erosion-deposition equation is used. Possible values are UNCONS_SEDIMENT_EQUATION_CERC an...
bool m_bCoastSave
Save coastline as vector GIS file?
bool m_bBeachDepositionTSSave
Save the beach (unconsolidated sediment) deposition time series file?
static string strRemoveSubstr(string *, string const *)
Returns a string with a substring removed, and with whitespace trimmed.
vector< string > m_VstrGDALICCDataType
GDAL data type for the initial consolidated coarse sediment GIS data.
static bool bParseTime(string const *, int &, int &, int &)
Parses a time string into hours, minutes, and seconds, and checks each of them.
double m_dWaveDataWrapHours
Number of hours after which deep water wave data wraps.
vector< string > m_VstrGDALICFDataType
GDAL data type for the initial consolidated fine sediment GIS data.
double m_dMaxUserInputWavePeriod
Used to constrain depth of closure.
bool m_bFloodSetupSurgeRunupTSSave
Save the flood setup surge runup time series file? TODO 007 Finish surge and runup stuff.
bool m_bTopSurfIncSeaSave
Save top surface (sediment, talus, and sea) raster DEMs?
vector< string > m_VstrGDALICCDriverCode
GDAL driver code for the initial consolidated coarse sediment GIS data.
bool m_bSedIncTalusTopSurfSave
Save sediment (inc talus) top surface raster DEMs?
double m_dCoastNormalLength
Length of the coastline-normal profiles, in m.
vector< string > m_VstrGDALIUFDataType
GDAL data type for the initial unconsolidated fine sediment GIS data.
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.
bool m_bAvgWaveAngleAndHeightSave
Save average wave angle and average wave height raster GIS files?
bool bConfigureFromYamlFile(CConfiguration &config)
Configures simulation from YAML file.
string m_strSCAPEShapeFunctionFile
Name of SCAPE shape function file.
bool m_bAvgWaveAngleSave
Save average wave angle raster GIS files?
int nReadWaveStationInputFile(int const)
bool m_bCliffEdgeSave
Save cliff edge vector GIS files?
bool m_bInvalidNormalsSave
Save invalid coastline-normal vector GIS files?
bool m_bShadowBoundarySave
Save wave shadow boundary vector GIS files?
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.
bool m_bActualBeachErosionSave
Save actual (supply-limited) beach (unconsolidated sediment) erosion raster GIS files?
vector< double > m_VdErosionPotential
For erosion potential lookup.
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_bRunUpSave
Are we saving runup? TODO 007 Finish surge and runup stuff.
bool m_bWaveTransectPointsSave
Save wave transect points vector GIS files?
bool m_bYamlInputFormat
Use YAML format for input datafile instead of .dat format?
bool m_bCliffCollapseDepositionSave
Save cliff collapse deposition raster GIS files?
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_dCliffTalusMinDepositionLength
Planview length of cliff deposition talus (m)
string m_strVectorGISOutFormat
Vector GIS output format.
vector< string > m_VstrGDALICFDriverCode
GDAL driver code for the initial consolidated fine sediment GIS data.
vector< string > m_VstrInitialFineConsSedimentFile
The name of the initial fine-sized consolidated sediment GIS file.
double m_dNotchIncisionAtCollapse
Notch overhang (i.e. length of horizontal incision at the apex elevation) to initiate collapse (m)
int m_nUnconsSedimentHandlingAtGridEdges
How sediment which moves off an edge of the grid is handled. Possible values are GRID_EDGE_CLOSED,...
double m_dSandErodibility
The relative erodibility (0-1) of sand unconsolidated beach sediment.
bool m_bBasementElevSave
Save basement raster DEMs?
int m_nSimStartHour
Start time of the simulation (hours)
bool m_bCoarseUnconsSedSave
Save coarse unconsolidated sediment raster GIS files?
bool m_bSuspSedTSSave
Save the suspended sediment time series file?
string m_strDeepWaterWaveStationsShapefile
The name of the deep water wave stations shape file.
vector< double > m_VdDepthOverDB
For erosion potential lookup.
bool m_bCliffCollapseNetTSSave
Save the cliff collapse net change time series file?
bool m_bPotentialPlatformErosionMaskSave
Save potential platform erosion mask raster GIS files?
vector< string > m_VstrGDALICSDriverCode
GDAL driver code for the initial consolidated sand sediment GIS data.
bool m_bFloodLocationSave
Are we saving the flood location? TODO 007 Finish surge and runup stuff.
double m_dWaveDepthRatioForWaveCalcs
Start depth for wave calculations.
bool m_bWaveHeightSave
Save wave height raster GIS files?
vector< string > m_VstrGDALIUCProjection
GDAL projection for the initial unconsolidated coarse sediment GIS data.
bool m_bLandformSave
Save coast landform raster GIS files?
static string strTrim(string const *)
Trims whitespace from both sides of a string, does not change the original string.
string m_strRasterGISOutFormat
Raster GIS output format.
bool m_bTotalBeachDepositionSave
Save total beach (unconsolidated sediment) deposition raster GIS files?
double m_dBeachSedimentPorosity
The porosity of unconsolidated beach sediment (0-1)
int m_nSimStartSec
Start time of the simulation (seconds)
int m_nSimStartDay
Start date of the simulation (day)
bool m_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_nCoastNormalSpacing
Average spacing between coastline normals, measured in cells.
bool m_bTotCliffCollapseSave
Save total cliff collapse raster GIS files?
int nReadShapeFunctionFile(void)
bool m_bDoShorePlatformErosion
Simulate shore platform erosion?
bool m_bSliceSave
Save slices?
bool m_bRasterPolygonSave
Save raster polygon raster GIS files?
double m_dInitialMeanSWL
The start-of-simulation still water level (m)
bool m_bBeachDepositionSave
Save beach (unconsolidated sediment) deposition raster GIS files?
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.
int m_nCoastSmoothingWindowSize
The size of the window used for coast smoothing. Must be an odd number.
bool m_bSedimentInputAlongLine
Do we have sediment input along a line?
bool m_bSedimentInput
Do we have sediment input events?
bool m_bFloodSWLSetupSurgeRunupLineSave
Are we saving the flood still water level setup surge runup line? TODO 007 Finish surge and runup stu...
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.
vector< double > m_VdThisIterDeepWaterWaveStationHeight
This-iteration wave height at deep water wave station.
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?
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_dDeanProfileStartAboveSWL
Berm height i.e. height above SWL of start of depositional Dean profile.
int m_nSavGolCoastPoly
The order of the coastline profile smoothing polynomial if Savitzky-Golay smoothing is used (usually ...
bool m_bSeaDepthSave
Save sea depth raster GIS files?
bool m_bWaveAngleAndHeightSave
Save wave angle and wave height raster GIS files?
string m_strInitialBasementDEMFile
Name of initial basement DEM file.
int m_nRunUpEquation
The run-up equation used TODO 007 Finish surge and runup stuff.
bool m_bWorldFile
Write a GIS World file?
static string strTrimRight(string const *)
Trims whitespace from the right side of a string, does not change the original string.
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.
double m_dFineErodibility
The relative erodibility (0-1) of fine unconsolidated beach sediment.
double m_dBreakingWaveHeightDepthRatio
Breaking wave height-to-depth ratio.
double m_dCoastNormalSpacing
Average spacing of the coastline-normal profiles, in m.
bool m_bHaveWaveStationData
Do we have wave station data?
double m_dSeaWaterDensity
Density of sea water in kg/m**3.
bool m_bSlopeSaveForCliffToe
Save slope raster grids (used for cliff toe location)?
int m_nSavGolCliffEdgePoly
The order of the cliff edge smoothing polynomial if Savitzky-Golay smoothing is used (usually 2 or 4,...
double m_dR
Coast platform resistance to erosion R, see Walkden & Hall, 2011.
bool m_bCliffCollapseTimestepSave
Are we saving the timestep at which each cliff occurred?
bool m_bRasterNormalProfileSave
Save rasterized coastline-normal profiles GIS files?
bool m_bActiveZoneSave
Save active zone raster GIS files?
vector< string > m_VstrInitialSandUnconsSedimentFile
The name of the initial sand-sized unconsolidated sediment GIS file.
bool m_bOmitSearchWestEdge
Omit the west edge of the grid from coast-end searches?
bool m_bSedimentInputAtCoast
Do we have sediment input at the coast?
int m_nCliffEdgeSmooth
Which method to use for cliff edge smoothing.
double m_dCliffErosionResistance
Resistance of cliff to notch erosion.
vector< string > m_VstrGDALIUSProjection
GDAL projection for the initial unconsolidated sand sediment GIS data.
vector< double > m_VdThisIterDeepWaterWaveStationPeriod
This-iteration wave period at deep water wave station.
double m_dD50Sand
The D50 for sand sediment.
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?
double m_dSlopeThresholdForCliffToe
Slope limit for cliff toe detection.
bool m_bMeanWaveEnergySave
Save mean wave energy raster GIS files?
bool m_bCliffToeSave
Save cliff toe raster grids?
double m_dKLS
Transport parameter KLS in the CERC equation.
int m_nWavePropagationModel
The wave propagation model used. Possible values are WAVE_MODEL_CSHORE and WAVE_MODEL_COVE.
double m_dAllCellsDeepWaterWaveAngle
Deep water wave angle for all sea cells.
vector< string > m_VstrGDALICFProjection
GDAL projection for the initial consolidated fine sediment GIS data.
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 m_nCliffEdgeSmoothWindow
The size of the window used for cliff edge smoothing. Must be an odd number.
int m_nDeepWaterWaveDataNumTimeSteps
The duration of data for deep water waves, expressed as a number of timesteps.
double m_dFinalMeanSWL
The end-of-simulation still water (m), is same as m_dInitialMeanSWL unless SWL changes.
bool m_bRasterWaveFloodLineSave
Are we saving the raster wave flood line? TODO 007 Finish surge and runup stuff.
bool m_bSWLTSSave
Save the SWL (still water level) time series file?
bool m_bBreakingWaveHeightSave
Save breaking wave height raster GIS files?
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?
bool m_bFloodSetupSurgeTSSave
Save the flood setup surge time series file? TODO 007 Finish surge and runup stuff.
bool m_bTotalPotentialPlatformErosionSave
Save total potential shore platform erosion raster GIS files?
bool m_bSetupSurgeFloodMaskSave
Are we saving the setup surge flood mask? TODO 007 Finish surge and runup stuff.
bool m_bWaveEnergySinceCollapseSave
Save wave energy since cliff collapse raster GIS files?
double m_dD50Coarse
The D50 for coarse sediment.
vector< unsigned long > m_VulProfileTimestep
Timesteps at which to save profiles.
bool m_bPotentialBeachErosionSave
Save potential beach (unconsolidated sediment) erosion raster GIS files?
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.
bool m_bGISSaveDigitsSequential
Are the GIS save digits (which are part of each GIS file name) sequential, or are they the iteration ...
int m_nSimStartMonth
Start date of the simulation (month)
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.
vector< string > m_VstrGDALIUSDriverDesc
GDAL driver description for the initial unconsolidated sand sediment GIS data.
bool m_bPolygonBoundarySave
Save polygon boundary vector GIS files?
bool bDetectFileFormat(string const &strFileName, bool &bIsYaml)
Detects whether the input file is in YAML or .dat format.
bool m_bStormSurgeSave
Are we saving the storm surge? TODO 007 Finish surge and runup stuff.
vector< string > m_VstrInitialFineUnconsSedimentFile
The name of the initial fine-sized unconsolidated sediment GIS file.
bool m_bActualPlatformErosionSave
Save actual (supply-limited) shore platform erosion raster GIS files?
double m_dNotchApexAboveMHW
Distance of notch base below SWL (m)
int m_nSimStartMin
Start time of the simulation (minutes)
bool bReadIniFile(void)
The bReadIniFile member function reads the initialisation 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?
vector< string > m_VstrGDALICFDriverDesc
GDAL driver description for the initial consolidated fine sediment GIS data.
string m_strTideDataFile
Name of tide data file.
vector< string > m_VstrGDALIUFDriverDesc
GDAL driver description for the initial unconsolidated fine sediment GIS data.
bool m_bTotalPotentialBeachErosionSave
Save total potential beach (unconsolidated sediment) erosion raster GIS files?
vector< string > m_VstrGDALIUSDataType
GDAL data type for the initial unconsolidated sand sediment GIS data.
bool bApplyConfiguration(CConfiguration const &config)
Applies configuration values to simulation member variables.
string m_strInterventionClassFile
Name of intervention class file.
bool m_bSeaMaskSave
Save sea mask raster GIS files?
bool m_bInterventionClassSave
Save intervention class raster GIS files?
int m_nSimStartYear
Start date of the simulation (year)
bool m_bTotalActualBeachErosionSave
Save total actual (supply-limited) beach (unconsolidated sediment) erosion raster GIS files?
bool m_bRasterCoastlineSave
Save rasterized 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.
bool m_bInterventionHeightSave
Save intervention height raster GIS files?
bool m_bRiverineFlooding
Are we doing riverine flooding?
bool m_bSandConsSedSave
Save sand consolidated sediment raster GIS files?
bool m_bSedimentInputEventSave
Save sediment inut data?
bool m_bHaveCoarseSediment
Does this simulation consider coarse-sized sediment?
double m_dRegularSaveInterval
The interval between regular saves, in hours.
bool m_bPolygonUnconsSedGainOrLossSave
Save polygon unconsolidated sediment gain or loss raster GIS files?
double m_dTimeStep
The length of an iteration (a timestep) in hours.
bool m_bCliffCollapseDepositionTSSave
Save the cliff collapse deposition time series file?
vector< string > m_VstrGDALIUCDriverCode
GDAL driver code for the initial unconsolidated coarse sediment GIS data.
bool m_bDeepWaterWaveAngleAndHeightSave
Save deep water wave angle and wave height raster GIS files?
double m_dCoastNormalRandSpacingFactor
Random factor for spacing of along-coast normals.
double m_dMaxUserInputWaveHeight
Maximum deep water wave height.
vector< double > m_VdSliceElev
Elevations for raster slice output.
bool m_bOutputConsolidatedProfileData
Output profile data?
bool m_bBeachProtectionSave
Save beach protection raster GIS files>
bool m_bDoBeachSedimentTransport
Simulate unconsolidated sediment (beach) transport?
bool m_bFineConsSedSave
Save fine consolidated sediment raster GIS files?
bool m_bShadowDowndriftBoundarySave
Save wave shadow downdrift boundary vector GIS files?
bool m_bCliffNotchElevTSSave
Save the cliff notch elevation time series file?
int m_nCoastSmooth
Which method to use for coast smoothing.
bool m_bDeepWaterWavePeriodSave
Save deep water wave period raster GIS files?
string m_strInitialLandformFile
Name of initial landform file.
string m_strInterventionHeightFile
Name of intervention height file.
bool m_bBeachSedimentChangeNetTSSave
Save the beach (unconsolidated sediment) net change time series file?
vector< string > m_VstrGDALICSDataType
GDAL data type for the initial consolidated sand sediment GIS data.
int nReadTideDataFile(void)
Reads the tide time series data.
bool m_bCoarseConsSedSave
Save coarse consolidated sediment raster GIS files?
bool m_bSeaAreaTSSave
Save the sea area time series file?
bool m_bScaleRasterOutput
Scale raster output?
vector< string > m_VstrGDALICSProjection
GDAL dprojection for the initial consolidated sand sediment GIS data.
double m_dD50Fine
The D50 for fine sediment.
unsigned long m_ulRandSeed[NUMBER_OF_RNGS]
A seed for each of the random number generators.
bool m_bOmitSearchSouthEdge
Omit the south edge of the grid from coast-end searches?
bool m_bBeachMaskSave
Save beach mask raster GIS files?
bool m_bAvgSuspSedSave
Save average suspended sediment raster GIS files?
double m_dBeachSedimentDensity
The density of unconsolidated beach sediment (kg/m**3)
vector< string > m_VstrInitialCoarseConsSedimentFile
The name of the initial coarse-sized consolidated sediment GIS file.
double m_dSimDuration
Duration of simulation, in hours.
bool m_bTalusSave
Save talus depth?
bool m_bCSVPerTimestepResults
Output per-timestep results in CSV format instead of fixed-width?
bool m_bCliffNotchAllSave
Are we saving all cliff notches?
vector< double > m_VdThisIterDeepWaterWaveStationAngle
This-iteration wave orientation at deep water wave station.
vector< string > m_VstrGDALIUCDriverDesc
GDAL driver description for the initial unconsolidated coarse sediment GIS data.
double m_dMaxBeachElevAboveSWL
Maximum elevation of beach above SWL (m)
bool m_bTotCliffCollapseDepositionSave
Save total cliff collapse deposition raster GIS files?
double m_dAllCellsDeepWaterWavePeriod
Deep water wave period for all sea cells.
bool bCreateErosionPotentialLookUp(vector< double > *, vector< double > *, vector< double > *)
Creates a look-up table for erosion potential, given depth over DB.
double m_dUSaveTime[SAVEMAX]
Save time, in hours from the start of the simukation, if we are not saving regularly.
double m_dProfileMaxSlope
Maximum slope on coastline-normal profiles.
int m_nProfileSmoothWindow
The size of the window used for running-mean coast-normal profile smoothing (must be odd)
bool m_bDoCliffCollapse
Simulate cliff collapse?
vector< string > m_VstrGDALICCDriverDesc
GDAL driver decription for the initial consolidated coarse sediment GIS data.
string m_strOutFile
Name of main output file.
bool m_bSetupSurgeRunupFloodMaskSave
Are we saving the setup surge runup flood mask? TODO 007 Finish surge and runup stuff.
bool m_bWaveSetupSave
Are we saving the wave setup? TODO 007 Finish surge and runup stuff.
vector< CRWSedInputEvent * > m_pVSedInputEvent
Sediment input events.
bool m_bFloodSWLSetupLineSave
Are we saving the flood still water level setup line? TODO 007 Finish surge and runup stuff.
vector< double > m_VdTSDeepWaterWaveStationHeight
Time series of wave heights at deep water wave station.
bool m_bShadowZoneCodesSave
Save wave shadow zones raster GIS files?
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?
double m_dDurationUnitsMult
Multiplier for duration units, to convert to hours.
bool m_bOutputParallelProfileData
Output parallel profile data?
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?
bool m_bCliffNotchSave
Save cliff notch incision depth vector GIS files?
bool m_bVectorWaveFloodLineSave
Are we saving the vector wave flood line? TODO 007 Finish surge and runup stuff.
vector< string > m_VstrGDALIUSDriverCode
GDAL driver code for the initial unconsolidated sand sediment GIS data.
bool m_bWaveAngleSave
Save wave angle raster GIS files?
bool m_bOmitSearchEastEdge
Omit the east edge of the grid from coast-end searches?
Simple YAML node class to represent parsed values.
vector< string > GetStringSequence() const
vector< CYamlNode > GetSequence() const
bool HasChild(string const &strKey) const
bool GetBoolValue(bool bDefault=false) const
double GetDoubleValue(double dDefault=0.0) const
CYamlNode GetChild(string const &strKey) const
int GetIntValue(int nDefault=0) const
Simple YAML parser class.
bool bParseFile(string const &strFileName)
CYamlNode GetRoot() const
This file contains global definitions for CoastalME.
string const VECTOR_FLOOD_SWL_SETUP_SURGE_LINE_CODE
string const TIME_SERIES_CLIFF_COLLAPSE_DEPOSITION_CODE
string const TIME_SERIES_SUSPENDED_SEDIMENT_CODE
string const RASTER_POTENTIAL_PLATFORM_EROSION_MASK_CODE
int const WAVE_MODEL_COVE
int const RTN_ERR_READING_SEDIMENT_INPUT_EVENT
string const RASTER_CLIFF_COLLAPSE_EROSION_FINE_CODE
string const TIME_SERIES_PLATFORM_EROSION_CODE
string const RASTER_COARSE_CONS_CODE
string const VECTOR_POLYGON_NODE_CODE
string const RASTER_USUAL_OUTPUT_CODE
string const RASTER_DEEP_WATER_WAVE_ORIENTATION_CODE
string const RASTER_DEEP_WATER_WAVE_HEIGHT_CODE
string const TIME_SERIES_FLOOD_SETUP_SURGE_RUNUP_CODE
string const VECTOR_ALL_OUTPUT_CODE
string const VECTOR_FLOOD_SWL_SETUP_SURGE_RUNUP_LINE_CODE
string const RASTER_TOTAL_CLIFF_COLLAPSE_DEPOSITION_SAND_CODE
string const RASTER_ACTIVE_ZONE_CODE
string const RASTER_CLIFF_COLLAPSE_EROSION_COARSE_CODE
string const RASTER_CLIFF_NOTCH_ALL_CODE
string const RASTER_SAND_CONS_CODE
string const TIME_SERIES_FLOOD_SETUP_SURGE_CODE
string const TIME_SERIES_CLIFF_NOTCH_ELEV_CODE
int const RTN_ERR_SCAPE_SHAPE_FUNCTION_FILE
int const UNCONS_SEDIMENT_EQUATION_KAMPHUIS
string const RASTER_COAST_NORMAL_CODE
int const DEFAULT_PROFILE_SPACING
string const VECTOR_CLIFF_EDGE_CODE
string const RASTER_AVG_SUSP_SED_CODE
string const RASTER_COAST_CODE
string const RASTER_SEDIMENT_INPUT_EVENT_CODE
string const VECTOR_WAVE_ENERGY_SINCE_COLLAPSE_CODE
string const RASTER_WAVE_ORIENTATION_CODE
string const VECTOR_RUN_UP_CODE
string const RASTER_ALL_OUTPUT_CODE
string const RASTER_CLIFF_COLLAPSE_EROSION_SAND_CODE
string const RASTER_POLYGON_UPDRIFT_OR_DOWNDRIFT_CODE
string const RASTER_WAVE_FLOOD_LINE_CODE
int const WAVE_MODEL_CSHORE
string const RASTER_COARSE_UNCONS_CODE
char const PATH_SEPARATOR
string const VECTOR_INVALID_NORMALS_CODE
string const VECTOR_CLIFF_NOTCH_ACTIVE_CODE
string const RASTER_BASEMENT_ELEVATION_CODE
string const RASTER_WAVE_HEIGHT_CODE
string const RASTER_CLIFF_COLLAPSE_DEPOSITION_COARSE_CODE
string const RASTER_INTERVENTION_CLASS_CODE
string const RASTER_POTENTIAL_PLATFORM_EROSION_CODE
string const RASTER_POTENTIAL_BEACH_EROSION_CODE
string const VECTOR_MEAN_WAVE_ENERGY_CODE
string const VECTOR_STORM_SURGE_CODE
double const D50_SAND_DEFAULT
string const RASTER_TOTAL_CLIFF_COLLAPSE_EROSION_COARSE_CODE
bool bFPIsEqual(const T d1, const T d2, const T dEpsilon)
string const VECTOR_USUAL_OUTPUT_CODE
string const RASTER_WAVE_PERIOD_CODE
int const GRID_EDGE_CLOSED
string const TIME_SERIES_CLIFF_COLLAPSE_NET_CODE
int const GRID_EDGE_RECIRCULATE
int const RTN_ERR_OPEN_DEEP_WATER_WAVE_DATA
string const RASTER_TOTAL_ACTUAL_BEACH_EROSION_CODE
string const VECTOR_NORMALS_CODE
string const RASTER_BEACH_DEPOSITION_CODE
string const RASTER_SHADOW_ZONE_CODE
string const RASTER_TOTAL_BEACH_DEPOSITION_CODE
string const VECTOR_DEEP_WATER_WAVE_ANGLE_AND_HEIGHT_CODE
double const D50_COARSE_DEFAULT
string const RASTER_BEACH_PROTECTION_CODE
string const RASTER_TOTAL_POTENTIAL_PLATFORM_EROSION_CODE
string const VECTOR_SHADOW_ZONE_BOUNDARY_CODE
string const TIME_SERIES_CLIFF_COLLAPSE_EROSION_CODE
string const RASTER_BEACH_MASK_CODE
string const RASTER_AVG_WAVE_HEIGHT_CODE
string const RASTER_SETUP_SURGE_FLOOD_MASK_CODE
string const TIME_SERIES_BEACH_EROSION_CODE
string const RASTER_TOTAL_POTENTIAL_BEACH_EROSION_CODE
int const SMOOTH_SAVITZKY_GOLAY
string const RASTER_AVG_SEA_DEPTH_CODE
int const SMOOTH_RUNNING_MEAN
string const RASTER_SAND_UNCONS_CODE
string const TIME_SERIES_SWL_CODE
string const READING_FILE_LOCATIONS
string const RASTER_SETUP_SURGE_RUNUP_FLOOD_MASK_CODE
string const RASTER_LANDFORM_CODE
string const RASTER_TOTAL_ACTUAL_PLATFORM_EROSION_CODE
int const RTN_ERR_READING_DEEP_WATER_WAVE_DATA
string const RASTER_ACTUAL_PLATFORM_EROSION_CODE
string const VECTOR_BREAKING_WAVE_HEIGHT_CODE
unsigned long const SEDIMENT_INPUT_EVENT_ERROR
int const RTN_ERR_TIDEDATAFILE
string const RASTER_SUSP_SED_CODE
string const VECTOR_COAST_CURVATURE_CODE
double const D50_FINE_DEFAULT
string const VECTOR_ALL_RIVER_FLOOD_OUTPUT_CODE
string const RASTER_CLIFF_COLLAPSE_DEPOSITION_SAND_CODE
string const RASTER_SEA_DEPTH_CODE
string const RASTER_FINE_CONS_CODE
string const RASTER_CLIFF_COLLAPSE_TIMESTEP_CODE
string const VECTOR_POLYGON_BOUNDARY_CODE
string const RASTER_FINE_UNCONS_CODE
string const VECTOR_DOWNDRIFT_ZONE_BOUNDARY_CODE
string const RASTER_SEDIMENT_TOP_CODE
string const RASTER_TOP_ELEVATION_INC_SEA_CODE
int const UNCONS_SEDIMENT_EQUATION_CERC
string const RASTER_POLYGON_GAIN_OR_LOSS_CODE
string const RASTER_TOTAL_CLIFF_COLLAPSE_EROSION_SAND_CODE
string const VECTOR_AVG_WAVE_ANGLE_AND_HEIGHT_CODE
string const TIME_SERIES_BEACH_CHANGE_NET_CODE
string const RASTER_INTERVENTION_HEIGHT_CODE
string const VECTOR_FLOOD_LINE_CODE
string const TIME_SERIES_BEACH_DEPOSITION_CODE
string const VECTOR_FLOOD_SWL_SETUP_LINE_CODE
string const VECTOR_WAVE_SETUP_CODE
string const RASTER_POLYGON_CODE
string const RASTER_ACTUAL_BEACH_EROSION_CODE
string const RASTER_INUNDATION_MASK_CODE
string const VECTOR_COAST_CODE
string const RASTER_TOTAL_CLIFF_COLLAPSE_EROSION_FINE_CODE
string const RASTER_AVG_WAVE_ORIENTATION_CODE
string const SCAPE_SHAPE_FUNCTION_FILE
string const TIME_SERIES_SEA_AREA_CODE
string const RASTER_DEEP_WATER_WAVE_PERIOD_CODE
string const RASTER_TALUS_CODE
string const RASTER_TOTAL_CLIFF_COLLAPSE_DEPOSITION_COARSE_CODE
Unified configuration class for CoastalME simulation parameters.
Contains CSimulation definitions.
bool bIsStringValidInt(string &str)
Checks to see if a string can be read as a valid integer, from https://stackoverflow....
bool bIsStringValidDouble(string &str)
Checks to see if a string can be read as a valid double number. Does not find trailing (i....
Simple YAML parser for CoastalME configuration files.