42using std::random_device;
75 InStream.open(strFilePathName.c_str(), ios::in);
78 if (! InStream.is_open())
81 cerr <<
ERR <<
"cannot open " << strFilePathName <<
" for input" << endl;
87 string strRec, strErr;
89 while (getline(InStream, strRec))
97 if ((! strRec.empty()) && (strRec[0] !=
QUOTE1) && (strRec[0] !=
QUOTE2))
103 size_t nPos = strRec.find(
COLON);
104 if (nPos == string::npos)
107 cerr <<
ERR <<
"on line " << nLine <<
": badly formatted (no ':') in " << strFilePathName << endl <<
"'" << strRec <<
"'" << endl;
111 if (nPos == strRec.size() - 1)
114 cerr <<
ERR <<
"on line " << nLine <<
": badly formatted (nothing following ':') in " << strFilePathName << endl <<
"'" << strRec <<
"'" << endl;
119 string strRH = strRec.erase(0, nPos+1);
125 nPos = strRH.rfind(
QUOTE1);
126 if (nPos != string::npos)
129 nPos = strRH.rfind(
QUOTE2);
130 if (nPos != string::npos)
141 strErr =
"line " + to_string(nLine) +
": path and name of main datafile";
164 strErr =
"line " + to_string(nLine) +
": path for CoastalME output";
189 if (strRH.find(
'@') == string::npos)
190 strErr =
"line " + to_string(nLine) +
": email address for messages";
198 if (! strErr.empty())
201 cerr <<
ERR <<
"reading " << strErr <<
" in " << strFilePathName << endl
202 <<
"'" << strRec <<
"'" << endl;
227 if (!InStream.is_open())
237 string strRec, strErr;
239 while (getline(InStream, strRec))
247 if ((! strRec.empty()) && (strRec[0] !=
QUOTE1) && (strRec[0] !=
QUOTE2))
253 nPos = strRec.find(
COLON);
254 if (nPos == string::npos)
257 cerr <<
ERR <<
"on line " << to_string(nLine) <<
"badly formatted (no ':') in " <<
m_strDataPathName << endl
263 string strRH = strRec.erase(0, nPos+1);
274 nPos = strRH.rfind(
QUOTE1);
275 if (nPos != string::npos)
281 nPos = strRH.rfind(
QUOTE2);
282 if (nPos != string::npos)
306 vector<string> VstrTmp;
314 strErr =
"line " + to_string(nLine) +
": output file names";
333 strErr =
"line " + to_string(nLine) +
": invalid integer for log file detail level '" + strRH +
"' in " +
m_strDataPathName;
340 strErr =
"line " + to_string(nLine) +
": log file detail level";
348 if (VstrTmp.size() < 2)
350 strErr =
"line " + to_string(nLine) +
": must have both date and time for simulation start in '" +
m_strDataPathName +
"'";
355 if (!
bParseTime(&VstrTmp[0], nHour, nMin, nSec))
357 strErr =
"line " + to_string(nLine) +
": could not understand simulation start time in '" +
m_strDataPathName +
"'";
362 if (!
bParseDate(&VstrTmp[1], nDay, nMonth, nYear))
364 strErr =
"line " + to_string(nLine) +
": could not understand simulation start date in '" +
m_strDataPathName +
"'";
385 strErr =
"line " + to_string(nLine) +
": units for duration of simulation";
390 nPos = strRH.rfind(
SPACE);
391 if (nPos == string::npos)
393 strErr =
"line " + to_string(nLine) +
": format of duration simulation line";
407 strErr =
"line " + to_string(nLine) +
": duration of simulation must be > 0";
417 strErr =
"line " + to_string(nLine) +
": units for simulation timestep";
422 nPos = strRH.rfind(
SPACE);
423 if (nPos == string::npos)
425 strErr =
"line " + to_string(nLine) +
": format of simulation timestep";
438 strErr =
"line " + to_string(nLine) +
": invalid floating point number for timestep '" + strRH +
"' in " +
m_strDataPathName;
445 strErr =
"line " + to_string(nLine) +
": timestep of simulation must be > 0";
448 strErr =
"line " + to_string(nLine) +
": timestep of simulation must be < the duration of the simulation";
460 strErr =
"line " + to_string(nLine) +
": units for save intervals";
465 nPos = strRH.rfind(
SPACE);
466 if (nPos == string::npos)
468 strErr =
"line " + to_string(nLine) +
": format of save times/intervals";
479 nPos = strRH.find(
SPACE);
480 if (nPos != string::npos)
492 strErr =
"line " + to_string(nLine) +
": too many save intervals";
498 strRH.erase(0, nPos);
502 nPos = strRH.find(
SPACE);
504 while (strRH.size() > 1);
509 strErr =
"line " + to_string(nLine) +
": must have at least two save times";
515 strErr =
"line " + to_string(nLine) +
": first save time cannot be less than timestep";
528 strErr =
"line " + to_string(nLine) +
": save interval cannot be less than timestep";
544 for (
int n = 1; n <
NRNG; n++)
550 nPos = strRH.find(
SPACE);
551 if (nPos == string::npos)
557 for (
int n = 1; n <
NRNG; n++)
567 strTmp = strRH.substr(0, nPos);
575 strRH = strRH.substr(nPos, strRH.size() - nPos);
578 if (strRH.size() == 0)
587 for (
int m = n; m <
NRNG; m++)
598 strErr =
"line " + to_string(nLine) +
": invalid integer for max save digits for GIS output file names '" + strRH +
"' in " +
m_strDataPathName;
605 strErr =
"line " + to_string(nLine) +
": max save digits for GIS output file names must be > 1";
611 strErr =
"line " + to_string(nLine) +
": must specify save digits for GIS output as sequential or as iteration number";
617 if (strRH.find(
's') != string::npos)
622 else if (strRH.find(
'i') != string::npos)
629 strErr =
"line " + to_string(nLine) +
": invalid code for save digits for GIS output save number (must be s or i)";
1100 if (! strRH.empty())
1101 strErr =
"line " + to_string(nLine) +
": unknown code '" + strRH +
"' in list of codes for raster GIS output";
1111 if (strRH.find(
"gpkg") != string::npos)
1112 strErr =
"GDAL gpkg raster create() is not yet working correctly. Please choose another output format.";
1121 if (strRH.find(
"y") != string::npos)
1130 if (strRH.find(
"y") != string::npos)
1136 if (! strRH.empty())
1141 nPos = strRH.find(
SPACE);
1142 if (nPos != string::npos)
1148 strTmp = strRH.substr(0, nPos);
1152 strRH = strRH.substr(nPos, strRH.size() - nPos);
1156 nPos = strRH.find(
SPACE);
1157 }
while (nPos != string::npos);
1330 if (! strRH.empty())
1331 strErr =
"line " + to_string(nLine) +
": unknown code '" + strRH +
"' in list of vector GIS output codes";
1341 strErr =
"line " + to_string(nLine) +
": vector GIS output format";
1346 if (! strRH.empty())
1441 if (! strRH.empty())
1442 strErr =
"line " + to_string(nLine) +
": unknown code '" + strRH +
"' in list of time series output files";
1451 strErr =
"line " + to_string(nLine) +
": invalid integer for coastline smoothing algorithm '" + strRH +
"' in " +
m_strDataPathName;
1458 strErr =
"line " + to_string(nLine) +
": coastline vector smoothing algorithm";
1466 strErr =
"line " + to_string(nLine) +
": invalid integer for coastline smoothing window '" + strRH +
"' in " +
m_strDataPathName;
1473 strErr =
"line " + to_string(nLine) +
": size of coastline vector smoothing window (must be > 0 and odd)";
1481 strErr =
"line " + to_string(nLine) +
": invalid integer for Savitsky-Golay polynomial for coastline smoothing '" + strRH +
"' in " +
m_strDataPathName;
1488 strErr =
"line " + to_string(nLine) +
": value of Savitsky-Golay polynomial for coastline smoothing (must be <= 6)";
1497 if (strRH.find(
"n") != string::npos)
1502 if (strRH.find(
"s") != string::npos)
1507 if (strRH.find(
"w") != string::npos)
1512 if (strRH.find(
"e") != string::npos)
1519 strErr =
"line " + to_string(nLine) +
": at least one edge must be omitted from coastline search";
1527 strErr =
"line " + to_string(nLine) +
": invalid integer for size of coastline smoothing window '" + strRH +
"' in " +
m_strDataPathName;
1534 strErr =
"line " + to_string(nLine) +
": size of profile vector smoothing window (must be >= 0, if > 0 must be odd)";
1542 strErr =
"line " + to_string(nLine) +
": invalid floating point number for max local slope '" + strRH +
"' in " +
m_strDataPathName;
1549 strErr =
"line " + to_string(nLine) +
": max local slope must be > 0";
1556 strErr =
"line " + to_string(nLine) +
": invalid floating point number for maximum elevation of beach above SWL '" + strRH +
"' in " +
m_strDataPathName;
1563 strErr =
"line " + to_string(nLine) +
": maximum elevation of beach above SWL must be >= 0";
1571 strErr =
"line " + to_string(nLine) +
": invalid integer for number of sediment layers '" + strRH +
"' in " +
m_strDataPathName;
1579 strErr =
"line " + to_string(nLine) +
": must be at least one sediment layer";
1621 if (! strRH.empty())
1642 for (
int nLayer = 0; nLayer <
m_nLayers; nLayer++)
1644 for (
int j = 1; j <= 6; j++)
1650 if (! getline(InStream, strRec))
1662 while (strRec.empty() || (strRec[0] ==
QUOTE1) || (strRec[0] ==
QUOTE2));
1665 nPos = strRec.find(
COLON);
1666 if (nPos == string::npos)
1669 cerr <<
ERR <<
"on line " << to_string(nLine) <<
": badly formatted (no ':') in " <<
m_strDataPathName << endl << strRec << endl;
1674 strRH = strRec.substr(nPos + 1);
1681 nPos = strRH.rfind(
QUOTE1);
1682 if (nPos != string::npos)
1685 nPos = strRH.rfind(
QUOTE2);
1686 if (nPos != string::npos)
1704 if (! strRH.empty())
1730 if (! strRH.empty())
1755 if (! strRH.empty())
1780 if (! strRH.empty())
1805 if (! strRH.empty())
1830 if (! strRH.empty())
1855 if (! strErr.empty())
1859 <<
"'" << strRec <<
"'" << endl;
1869 if (! strRH.empty())
1894 if (! strRH.empty())
1917 if (! strRH.empty())
1947 strErr =
"line " + to_string(nLine) +
": must specify both intervention class and intervention height files";
1954 strErr =
"line " + to_string(nLine) +
": must specify both intervention class and intervention height files";
1983 strErr =
"line " + to_string(nLine) +
": invalid integer for wave propagation model '" + strRH +
"' in " +
m_strDataPathName;
1990 strErr =
"line " + to_string(nLine) +
": wave propagation model must be 0 or 1";
1998 strErr =
"line " + to_string(nLine) +
": invalid floating point number for sea water density '" + strRH +
"' in " +
m_strDataPathName;
2005 strErr =
"line " + to_string(nLine) +
": sea water density must be > 0";
2012 strErr =
"line " + to_string(nLine) +
": invalid floating point number for initial SWL '" + strRH +
"' in " +
m_strDataPathName;
2028 strErr =
"line " + to_string(nLine) +
": invalid floating point number for final SWL '" + strRH +
"' in " +
m_strDataPathName;
2039 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)";
2042 if (isdigit(strRH.at(0)))
2047 strErr =
"line " + to_string(nLine) +
": invalid floating point number for deep water wave height '" + strRH +
"' in " +
m_strDataPathName;
2057 strErr =
"line " + to_string(nLine) +
": deep water wave height must be > 0";
2089 strErr =
"line " + to_string(nLine) +
": filename missing for deep water wave height input";
2120 strErr =
"line " + to_string(nLine) +
": invalid floating point number for deep water wave orientation '" + strRH +
"' in " +
m_strDataPathName;
2127 strErr =
"line " + to_string(nLine) +
": deep water wave orientation must be zero degrees or more";
2129 strErr =
"line " + to_string(nLine) +
": deep water wave orientation must be less than 360 degrees";
2140 strErr =
"line " + to_string(nLine) +
": invalid floating point number for wave period '" + strRH +
"' in " +
m_strDataPathName;
2147 strErr =
"line " + to_string(nLine) +
": wave period must be > 0";
2153 if (! strRH.empty())
2176 strErr =
"line " + to_string(nLine) +
": invalid floating point number for breaking wave height to depth ratio '" + strRH +
"' in " +
m_strDataPathName;
2183 strErr =
"line " + to_string(nLine) +
": breaking wave height to depth ratio must be > 0";
2191 if (strRH.find(
"y") != string::npos)
2202 strErr =
"line " + to_string(nLine) +
": invalid floating point number for R (coast platform resistance to erosion) '" + strRH +
"' in " +
m_strDataPathName;
2206 m_dR = strtod(strRH.c_str(), NULL);
2209 strErr =
"line " + to_string(nLine) +
": R (coast platform resistance to erosion) value must be > 0";
2218 if (strRH.find(
"y") != string::npos)
2228 strErr =
"line " + to_string(nLine) +
": invalid integer for beach sediment transport at grid edges '" + strRH +
"' in " +
m_strDataPathName;
2235 strErr =
"line " + to_string(nLine) +
": switch for handling of beach sediment at grid edges must be 0, 1, or 2";
2245 strErr =
"line " + to_string(nLine) +
": invalid integer for beach erosion/deposition equation '" + strRH +
"' in " +
m_strDataPathName;
2252 strErr =
"line " + to_string(nLine) +
": switch for beach erosion/deposition equation must be 0 or 1";
2260 strErr =
"line " + to_string(nLine) +
": invalid floating point number for median particle size of fine sediment '" + strRH +
"' in " +
m_strDataPathName;
2267 strErr =
"line " + to_string(nLine) +
": median particle size of fine sediment must be > 0";
2278 strErr =
"line " + to_string(nLine) +
": invalid floating point number for median particle size of sand sediment '" + strRH +
"' in " +
m_strDataPathName;
2285 strErr =
"line " + to_string(nLine) +
": median particle size of sand sediment must be > 0";
2296 strErr =
"line " + to_string(nLine) +
": invalid floating point number for median particle size of coarse sediment '" + strRH +
"' in " +
m_strDataPathName;
2303 strErr =
"line " + to_string(nLine) +
": median particle size of coarse sediment must be > 0";
2317 strErr =
"line " + to_string(nLine) +
": invalid floating point number for density of beach sediment '" + strRH +
"' in " +
m_strDataPathName;
2324 strErr =
"line " + to_string(nLine) +
": density of beach sediment must be > 0";
2335 strErr =
"line " + to_string(nLine) +
": invalid floating point number for porosity of beach sediment '" + strRH +
"' in " +
m_strDataPathName;
2342 strErr =
"line " + to_string(nLine) +
": porosity of beach sediment must be > 0";
2350 strErr =
"line " + to_string(nLine) +
": invalid floating point number for erodibility of fine-sized sediment '" + strRH +
"' in " +
m_strDataPathName;
2357 strErr =
"line " + to_string(nLine) +
": relative erodibility of fine-sized sediment must be between 0 and 1";
2365 strErr =
"line " + to_string(nLine) +
": invalid floating point number for erodibility of sand-sized sediment '" + strRH +
"' in " +
m_strDataPathName;
2372 strErr =
"line " + to_string(nLine) +
": relative erodibility of sand-sized sediment must be between 0 and 1";
2380 strErr =
"line " + to_string(nLine) +
": invalid floating point number for erodibility of coarse-sized sediment '" + strRH +
"' in " +
m_strDataPathName;
2388 strErr =
"line " + to_string(nLine) +
": relative erodibility of coarse-sized sediment must be between 0 and 1";
2393 strErr =
"line " + to_string(nLine) +
": must have at least one non-zero erodibility value";
2404 strErr =
"line " + to_string(nLine) +
": invalid floating point number for transport parameter KLS of CERC equation '" + strRH +
"' in " +
m_strDataPathName;
2408 m_dKLS = strtod(strRH.c_str(), NULL);
2414 strErr =
"line " + to_string(nLine) +
": transport parameter KLS of CERC equation must be > 0";
2425 strErr =
"line " + to_string(nLine) +
": invalid floating point number for transport parameter of Kamphuis equation '" + strRH +
"' in " +
m_strDataPathName;
2432 strErr =
"line " + to_string(nLine) +
": transport parameter of Kamphuis equation must be > 0";
2443 strErr =
"line " + to_string(nLine) +
": invalid floating point number for Dean profile start height above SWL '" + strRH +
"' in " +
m_strDataPathName;
2450 strErr =
"line " + to_string(nLine) +
": Berm height (Dean profile start height above SWL) must be >= 0";
2459 if (strRH.find(
"y") != string::npos)
2470 strErr =
"line " + to_string(nLine) +
": invalid floating point number for cliff resistance to erosion '" + strRH +
"' in " +
m_strDataPathName;
2477 strErr =
"line " + to_string(nLine) +
": cliff resistance to erosion must be > 0";
2488 strErr =
"line " + to_string(nLine) +
": invalid floating point number for cliff notch overhang at collapse '" + strRH +
"' in " +
m_strDataPathName;
2495 strErr =
"line " + to_string(nLine) +
": cliff notch overhang at collapse must be > 0";
2505 strErr =
"line " + to_string(nLine) +
": cliff notch base below still water level must be > 0";
2516 strErr =
"line " + to_string(nLine) +
": invalid floating point number for scale parameter A for cliff deposition '" + strRH +
"' in " +
m_strDataPathName;
2523 strErr =
"line " + to_string(nLine) +
": scale parameter A for cliff deposition must be 0 [= auto] or greater";
2534 strErr =
"line " + to_string(nLine) +
": invalid floating point number for width of cliff collapse talus '" + strRH +
"' in " +
m_strDataPathName;
2541 strErr =
"line " + to_string(nLine) +
": planview width of cliff deposition must be > 0";
2553 strErr =
"line " + to_string(nLine) +
": invalid floating point number for planview length of cliff deposition '" + strRH +
"' in " +
m_strDataPathName;
2560 strErr =
"line " + to_string(nLine) +
": planview length of cliff deposition must be > 0";
2571 strErr =
"line " + to_string(nLine) +
": invalid floating point number for height of cliff collapse (as a fraction of cliff elevation) '" + strRH +
"' in " +
m_strDataPathName;
2578 strErr =
"line " + to_string(nLine) +
": height of cliff collapse (as a fraction of cliff elevation) must be >= 0";
2587 if (strRH.find(
"y") != string::npos)
2600 if (! strRH.empty())
2634 if (! strRH.empty())
2635 strErr =
"line " + to_string(nLine) +
": unknown code '" + strRH +
"' in list of riverine flooding output codes";
2639 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";
2652 strErr =
"line " + to_string(nLine) +
": invalid code for run-up equation used in simulating floods";
2663 if (strRH.find(
"y") != string::npos)
2674 if (! strRH.empty())
2695 strErr =
"line " + to_string(nLine) +
": path of location points file must not be empty if simulating floods";
2703 if (strRH.find(
"y") != string::npos)
2714 if (! strRH.empty())
2740 if (strRH.find(
"p") != string::npos)
2742 else if (strRH.find(
"c") != string::npos)
2744 else if (strRH.find(
"l") != string::npos)
2747 strErr =
"line " + to_string(nLine) +
": Sediment input type must be P, C, or L";
2757 strErr =
"line " + to_string(nLine) +
": filename missing for sediment input";
2786 strErr =
"line " + to_string(nLine) +
": invalid floating point number for gravitational acceleration '" + strRH +
"' in " +
m_strDataPathName;
2790 m_dG = strtod(strRH.c_str(), NULL);
2793 strErr =
"line " + to_string(nLine) +
": gravitational acceleration must be > 0";
2803 strErr =
"line " + to_string(nLine) +
": spacing of coastline normals must be > 0";
2810 strErr =
"line " + to_string(nLine) +
": invalid floating point number for random factor for spacing of coastline normals '" + strRH +
"' in " +
m_strDataPathName;
2817 strErr =
"line " + to_string(nLine) +
": random factor for spacing of coastline normals must be >= 0";
2819 strErr =
"line " + to_string(nLine) +
": random factor for spacing of coastline normals must be < 1";
2826 strErr =
"line " + to_string(nLine) +
": invalid floating point number for length of coastline normals '" + strRH +
"' in " +
m_strDataPathName;
2833 strErr =
"line " + to_string(nLine) +
": length of coastline normals must be > 0";
2840 strErr =
"line " + to_string(nLine) +
": invalid floating point number for start depth for wave calcs '" + strRH +
"' in " +
m_strDataPathName;
2847 strErr =
"line " + to_string(nLine) +
": start depth for wave calcs must be > 0";
2857 if (strRH.find(
"y") != string::npos)
2863 strErr =
"line " + to_string(nLine) +
": cannot save profiile data if not simulating shore platform erosion";
2877 for (
unsigned int j = 0; j < VstrTmp.size(); j++)
2879 VstrTmp[j] =
strTrim(&VstrTmp[j]);
2883 strErr =
"line " + to_string(nLine) +
": invalid integer for profile to be saved '" + VstrTmp[j] +
"' in " +
m_strDataPathName;
2887 int nTmp = stoi(VstrTmp[j]);
2891 strErr =
"line " + to_string(nLine) +
": Profile number for saving must be >= 0";
2905 for (
unsigned int j = 0; j < VstrTmp.size(); j++)
2907 VstrTmp[j] =
strTrim(&VstrTmp[j]);
2908 unsigned long ulTmp = atol(VstrTmp[j].c_str());
2911 strErr =
"line " + to_string(nLine) +
": Timestep for profile saves must >= 1";
2925 if (strRH.find(
"y") != string::npos)
2934 if (strRH.find(
"y") != string::npos)
2942 strErr =
"line " + to_string(nLine) +
": invalid integer for size of moving window for coastline curvature calculation '" + strRH +
"' in " +
m_strDataPathName;
2948 strErr =
"line " + to_string(nLine) +
": size of moving window for coastline curvature calculation (must be > 0 and odd)";
2954 if (! strErr.empty())
2957 cerr << endl <<
ERR << strErr <<
".\nPlease edit " <<
m_strDataPathName <<
" and change this line:" << endl;
2958 cerr <<
"'" << strRec <<
"'" << endl << endl;
2969 bool bNoRasterFiles =
true;
2971 bNoRasterFiles =
false;
2976 bNoRasterFiles =
false;
2982 cerr <<
ERR <<
"at least one raster GIS file is needed" << endl;
3001 if (!InStream.is_open())
3013 while (getline(InStream, strRec))
3021 if ((strRec.empty()) || (strRec[0] ==
QUOTE1) || (strRec[0] ==
QUOTE2))
3027 cerr <<
ERR <<
"invalid floating point number for tide data '" << strRec <<
"' on line " << nLine <<
" of " <<
m_strTideDataFile << endl;
3058 if (!InStream.is_open())
3067 int nExpected = 0, nRead = 0;
3071 InStream >> nExpected;
3074 vector<double> VdDepthOverDB;
3075 vector<double> VdErosionPotential;
3076 vector<double> VdErosionPotentialFirstDeriv;
3079 while (getline(InStream, strRec))
3087 if ((strRec.empty()) || (strRec[0] ==
QUOTE1) || (strRec[0] ==
QUOTE2))
3095 for (
unsigned int i = 0; i < strTmp.size(); i++)
3098 strTmp[i] =
strTrim(&strTmp[i]);
3103 cerr <<
ERR <<
"on line " + to_string(nLine) +
" invalid floating point number for Erosion Potential Shape data '" << strTmp[i] <<
"' in " <<
m_strSCAPEShapeFunctionFile << endl;
3109 VdDepthOverDB.push_back(strtod(strTmp[0].c_str(), NULL));
3110 VdErosionPotential.push_back(strtod(strTmp[1].c_str(), NULL));
3111 VdErosionPotentialFirstDeriv.push_back(strtod(strTmp[2].c_str(), NULL));
3122 if (nExpected != nRead)
3141 cout <<
ERR <<
"line " + to_string(nLine) +
" in " <<
m_strSCAPEShapeFunctionFile <<
": erosion potential function is unbounded for high values of depth over DB" << endl;
3160 if (!InStream.is_open())
3169 int nExpectedStations = 0;
3171 int nTimeStepsRead = 0;
3172 string strRec, strErr;
3175 while (getline(InStream, strRec))
3183 if ((! strRec.empty()) && (strRec[0] !=
QUOTE1) && (strRec[0] !=
QUOTE2))
3192 size_t nPos = strRec.find(
COLON);
3193 if (nPos == string::npos)
3197 <<
"'" << strRec <<
"'" << endl;
3201 if (nPos == strRec.size() - 1)
3205 <<
"'" << strRec <<
"'" << endl;
3210 string strRH = strRec.substr(nPos + 1);
3216 nPos = strRH.rfind(
QUOTE1);
3217 if (nPos != string::npos)
3220 nPos = strRH.rfind(
QUOTE2);
3221 if (nPos != string::npos)
3235 vector<string> VstrTmp;
3244 if (VstrTmp.size() < 2)
3246 strErr =
"line " + to_string(nLine) +
": must have both date and time for start of data in";
3251 if (!
bParseTime(&VstrTmp[0], nHour, nMin, nSec))
3253 strErr =
"line " + to_string(nLine) +
": could not understand start time for data";
3258 if (!
bParseDate(&VstrTmp[1], nDay, nMonth, nYear))
3260 strErr =
"line " + to_string(nLine) +
": could not understand start date for data";
3272 strErr =
"line " + to_string(nLine) +
": start time and date for wave time series data differs from simulation start time and date,";
3285 strErr =
"line " + to_string(nLine) +
": unknown units for timestep";
3290 nPos = strRH.rfind(
SPACE);
3291 if (nPos == string::npos)
3293 strErr =
"line " + to_string(nLine) +
": format of timestep line";
3306 strErr =
"line " + to_string(nLine) +
": invalid floating point number for timestep";
3310 dThisIter = strtod(strRH.c_str(), NULL) * dMult;
3313 strErr =
"line " + to_string(nLine) +
": timestep must be > 0";
3316 strErr =
"line " + to_string(nLine) +
": timestep must be the same as the simulation timestep";
3324 strErr =
"line " + to_string(nLine) +
": invalid integer for number of wave stations '" + strRH +
"' in " +
m_strDeepWaterWavesInputFile;
3328 nExpectedStations = stoi(strRH);
3331 if (nExpectedStations != nWaveStations)
3334 strErr =
"line " + to_string(nLine) +
": number of wave stations in " +
m_strDeepWaterWaveStationsShapefile +
" is " + to_string(nWaveStations) +
" but we have " + to_string(nExpectedStations) +
" stations";
3354 strErr =
"line " + to_string(nLine) +
": must have values for at least one timestep";
3368 for (
unsigned int i = 0; i < VstrTmp.size(); i++)
3371 VstrTmp[i] =
strTrim(&VstrTmp[i]);
3376 strErr =
"line " + to_string(nLine) +
": invalid floating point number for deep water wave value '" + VstrTmp[i] +
"' in " +
m_strDeepWaterWavesInputFile;
3383 for (
int i = 0; i < nExpectedStations; i++)
3402 if (! strErr.empty())
3406 <<
"'" << strRec <<
"'" << endl;
3448 for (
int j = 0; j < nExpectedStations; j++)
3462 cout <<
NOTE << strTmp;
3480 if (!InStream.is_open())
3490 string strRec, strErr;
3493 while (getline(InStream, strRec))
3501 if ((! strRec.empty()) && (strRec[0] !=
QUOTE1) && (strRec[0] !=
QUOTE2))
3510 unsigned int nTarget = 7;
3513 if (VstrTmp.size() < nTarget)
3515 strErr =
"line " + to_string(nLine) +
": too few data items on data line '" + to_string(nRead) +
"' in " +
m_strSedimentInputEventFile;
3522 strErr =
"line " + to_string(nLine) +
": invalid integer for Location ID of sediment input event '" + VstrTmp[0] +
"' in " +
m_strSedimentInputEventFile;
3526 int nID = stoi(
strTrim(&VstrTmp[0]));
3532 strErr =
"line " + to_string(nLine) +
": invalid Location ID '" + to_string(nID) +
"' for sediment input event location event in " +
m_strSedimentInputEventFile;
3540 strErr =
"line " + to_string(nLine) +
": invalid time and/or date '" + VstrTmp[1] +
"' for sediment input event in " +
m_strSedimentInputEventFile;
3547 strErr =
"line " + to_string(nLine) +
": invalid floating point number '" + VstrTmp[2] +
"' for fine sediment volume for sediment input event in " +
m_strSedimentInputEventFile;
3551 double dFineSedVol = stod(
strTrim(&VstrTmp[2]));
3552 if (dFineSedVol < 0)
3554 strErr =
"line " + to_string(nLine) +
": negative number '" + to_string(dFineSedVol) +
"' for fine sediment volume for sediment input event in " +
m_strSedimentInputEventFile;
3558 if (dFineSedVol > 0)
3564 strErr =
"line " + to_string(nLine) +
": invalid floating point number '" + VstrTmp[3] +
"' for sand-sized sediment volume for sediment input event in " +
m_strSedimentInputEventFile;
3568 double dSandSedVol = stod(
strTrim(&VstrTmp[3]));
3569 if (dSandSedVol < 0)
3571 strErr =
"line " + to_string(nLine) +
": negative number '" + to_string(dSandSedVol) +
"' for sand-sized sediment volume for sediment input event in " +
m_strSedimentInputEventFile;
3575 if (dSandSedVol > 0)
3581 strErr =
"line " + to_string(nLine) +
": invalid floating point number '" + VstrTmp[4] +
"' for coarse sediment volume for sediment input event in " +
m_strSedimentInputEventFile;
3585 double dCoarseSedVol = stod(
strTrim(&VstrTmp[4]));
3586 if (dCoarseSedVol < 0)
3588 strErr =
"line " + to_string(nLine) +
": negative number '" + to_string(dCoarseSedVol) +
"' for coarse sediment volume of sediment input event in " +
m_strSedimentInputEventFile;
3592 if (dCoarseSedVol > 0)
3604 strErr =
"line " + to_string(nLine) +
": invalid floating point number '" + VstrTmp[5] +
"' for coast-normal length of sediment input event in " +
m_strSedimentInputEventFile;
3608 dLen = stod(
strTrim(&VstrTmp[5]));
3611 strErr =
"line " + to_string(nLine) +
": coast-normal length of the sediment block '" + to_string(dLen) +
"' must be > 0 in " +
m_strSedimentInputEventFile;
3618 strErr =
"line " + to_string(nLine) +
": invalid floating point number '" + VstrTmp[6] +
"' for along-coast width of sediment input event in " +
m_strSedimentInputEventFile;
3622 dWidth = stod(
strTrim(&VstrTmp[6]));
3625 strErr =
"line " + to_string(nLine) +
": along-coast width (m) of the sediment block '" + to_string(dWidth) +
"' must be > 0 in " +
m_strSedimentInputEventFile;
3653 if (! strErr.empty())
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?
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?
int m_nGISMaxSaveDigits
The maximum number of digits in GIS filenames. These can be sequential, or the iteration number.
bool m_bTopSurfSave
Save fop surface (sediment and sea) raster DEMs?
string m_strInitialSuspSedimentFile
Name of initial suspended sediment file.
vector< double > m_VdTSDeepWaterWaveStationPeriod
Time series of wave period at deep water wave station.
bool m_bSedimentTopSurfSave
Save sediment top surface raster DEMs?
bool m_bFineUnconsSedSave
Save fine unconsolidated sediment raster GIS files?
string m_strSedimentInputEventFile
The name of the sediment input events time series file.
double m_dNotchDepthAtCollapse
Notch overhang (i.e. length of horizontal incision) to initiate collapse (m)
bool m_bFloodSWLSetupSurgeLine
Are we saving the flood still water level setup surge line? TODO 007.
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_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 Does this work correctly?
vector< string > m_VstrGDALICCDriverCode
GDAL driver code for the initial consolidated coarse sediment GIS data.
double m_dCoastNormalLength
Length of the cost-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?
string m_strSCAPEShapeFunctionFile
Name of SCAPE shape function file.
bool m_bAvgWaveAngleSave
Save average wave angle raster GIS files?
int nReadWaveStationInputFile(int const)
Reads the deep water wave station input data. Each point in m_strDeepWaterWavesInputFile is a triad o...
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_bStillWaterLevelTSSave
Save the still water level time series file?
bool m_bRunUpSave
Are we saving runup? TODO 007.
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
Base name for CME vector GIS output files.
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.
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.
double m_dWaveDepthRatioForWaveCalcs
Start depth for wave calculations.
bool m_bWaveHeightSave
Save wave height raster GIS files?
bool m_bFloodLocation
Are we saving the flood location? TODO 007.
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
Base name for CME raster GIS output files.
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 ...
bool m_bTotCliffCollapseSave
Save total cliff collapse raster GIS files?
int nReadShapeFunctionFile(void)
Reads the shape of the erosion potential distribution (see shape function in Walkden & Hall,...
bool m_bDoShorePlatformErosion
Simulate shore platform erosion?
bool m_bSliceSave
Save slices?
bool m_bRasterPolygonSave
Save raster polygon raster GIS files?
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.
bool m_bSedimentInputAlongLine
Do we have sediment input along a line?
bool m_bSedimentInput
Do we have sediment input events?
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 Savitsky-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?
double m_dNotchBaseBelowSWL
Notch base below SWL (m)
string m_strInitialBasementDEMFile
Name of initial basement DEM file.
int m_nRunUpEquation
The run-up equation used TODO 007.
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.
bool m_bHaveWaveStationData
Do we have wave station data?
double m_dSeaWaterDensity
Density of sea water in kg/m**3.
double m_dR
Coast platform resistance to erosion R, see Walkden & Hall, 2011.
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?
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?
bool m_bMeanWaveEnergySave
Save mean wave energy raster GIS files?
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_nDeepWaterWaveDataNumTimeSteps
The duration of data for deep water waves, expressed as a number of time steps.
bool m_bRasterWaveFloodLineSave
Are we saving the raster wave flood line? TODO 007.
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 Does this work correctly?
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.
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.
double m_dCoastNormalAvgSpacing
Average spacing of the cost-normal profiles, in m.
bool m_bGISSaveDigitsSequential
Are the GIS save digits (which are part of each GIS file name) sequential, or are they the iteration ...
int m_nSimStartMonth
Start date of the simulation (month)
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 m_bStormSurgeSave
Are we saving the storm surge? TODO 007.
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?
vector< CSedInputEvent * > m_pVSedInputEvent
Sediment input events.
int m_nSimStartMin
Start time of the simulation (minutes)
bool bReadIniFile(void)
The bReadIniFile member function reads the initialization file.
bool m_bHaveFineSediment
Does this simulation consider fine-sized sediment?
double m_dCliffDepositionA
Scale parameter A for cliff deposition (m^(1/3)), may be zero for auto-calculation.
string m_strDataPathName
Folder in which the CME data file is found.
string m_strOutPath
Path for all output files.
bool m_bBeachErosionTSSave
Save the beach (unconsolidated sediment) erosion time series file?
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.
string m_strInterventionClassFile
Name of intervention class file.
bool m_bFloodSWLSetupLine
Are we saving the flood still water level setup line? TODO 007.
bool m_bSeaMaskSave
Save sea mask raster GIS files?
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 raster coastline GIS files?
string m_strDeepWaterWavesInputFile
The name of the deep water wave stations time series file.
static string pstrChangeToBackslash(string const *)
Changes all forward slashes in the input string to backslashes, leaving the original unchanged.
bool m_bInterventionHeightSave
Save intervention height raster GIS files?
int m_nCoastCurvatureMovingWindowSize
bool m_bRiverineFlooding
Are we doing flooding? TODO 007.
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 time step) 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_bBeachProtectionSave
Save beach protection raster GIS files>
double m_dFinalSWL
The end-of-simulation still water (m), is same as m_dOrigSWL unless SWL changes.
bool m_bDoBeachSedimentTransport
Simulate unconsolidated sediment (beach) transport?
bool m_bFineConsSedSave
Save fine consolidated sediment raster GIS files?
bool m_bShadowDowndriftBoundarySave
Save wave shadow downdrift boundary vector GIS files?
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.
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.
vector< double > m_VdThisIterDeepWaterWaveStationAngle
This-iteration wave orientation at deep water wave station.
bool m_bOutputProfileData
Output profile data?
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_bRasterNormalSave
Save raster coastline-normal GIS files?
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.
int m_nCoastNormalAvgSpacing
Average spacing between cost normals, measured in cells.
double m_dProfileMaxSlope
Maximum slope on costline-normal profiles.
int m_nProfileSmoothWindow
The size of the window used for running-mean coast-normal profile smoothing (must be odd)
bool m_bDoCliffCollapse
Simulate cliff collapse?
unsigned long m_ulRandSeed[NRNG]
A seed for each of the NRNG random number generators.
vector< string > m_VstrGDALICCDriverDesc
GDAL driver decription for the initial consolidated coarse sediment GIS data.
double m_dOrigSWL
The start-of-simulation still water level (m)
string m_strOutFile
Name of main output file.
bool m_bSetupSurgeRunupFloodMaskSave
Are we saving the setup surge runup flood mask? TODO 007.
bool m_bWaveSetupSave
Are we saving the wave setup? TODO 007.
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_bFloodSWLSetupSurgeRunupLine
Are we saving the flood still water level setup surge runup line? TODO 007.
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.
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?
int m_nCoastSmoothWindow
The size of the window used for coast smoothing. Must be an odd number.
bool m_bLocalSlopeSave
Save local slope raster GIS files?
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_SAND_CONS_CODE
string const TIME_SERIES_FLOOD_SETUP_SURGE_CODE
int const RTN_ERR_SCAPE_SHAPE_FUNCTION_FILE
int const UNCONS_SEDIMENT_EQUATION_KAMPHUIS
string const RASTER_COAST_NORMAL_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 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 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
string const RASTER_SAND_UNCONS_CODE
string const READING_FILE_LOCATIONS
string const VECTOR_CLIFF_NOTCH_SIZE_CODE
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_SHADOW_BOUNDARY_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_LOCAL_SLOPE_CODE
string const RASTER_FINE_CONS_CODE
string const VECTOR_POLYGON_BOUNDARY_CODE
string const RASTER_FINE_UNCONS_CODE
string const TIME_SERIES_STILL_WATER_LEVEL_CODE
int const MIN_PROFILE_SPACING
string const RASTER_SEDIMENT_TOP_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_TOTAL_CLIFF_COLLAPSE_DEPOSITION_COARSE_CODE
string const RASTER_TOP_CODE
string const VECTOR_DOWNDRIFT_BOUNDARY_CODE
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....