62using std::random_device;
99 InStream.open(strFilePathName.c_str(), ios::in);
102 if (! InStream.is_open())
105 cerr <<
ERR <<
"cannot open " << strFilePathName <<
" for input" << endl;
111 string strRec, strErr;
113 while (getline(InStream, strRec))
121 if ((! strRec.empty()) && (strRec[0] !=
QUOTE1) && (strRec[0] !=
QUOTE2))
128 size_t nPos = strRec.find(
COLON);
130 if (nPos == string::npos)
133 cerr <<
ERR <<
"on line " << nLine <<
": badly formatted (no ':') in "
134 << strFilePathName << endl
135 <<
"'" << strRec <<
"'" << endl;
139 if (nPos == strRec.size() - 1)
142 cerr <<
ERR <<
"on line " << nLine
143 <<
": badly formatted (nothing following ':') in "
144 << strFilePathName << endl
145 <<
"'" << strRec <<
"'" << endl;
150 string strRH = strRec.erase(0, nPos + 1);
157 nPos = strRH.rfind(
QUOTE1);
159 if (nPos != string::npos)
162 nPos = strRH.rfind(
QUOTE2);
164 if (nPos != string::npos)
176 "line " + to_string(nLine) +
": path and name of main datafile";
205 strErr =
"line " + to_string(nLine) +
": path for CoastalME output";
236 if (strRH.find(
'@') == string::npos)
238 "line " + to_string(nLine) +
": email address for messages";
248 if (! strErr.empty())
251 cerr <<
ERR <<
"reading " << strErr <<
" in " << strFilePathName << endl
252 <<
"'" << strRec <<
"'" << endl;
279 size_t nDotPos = strFileName.find_last_of(
'.');
280 if (nDotPos != string::npos)
282 string strExt = strFileName.substr(nDotPos + 1);
283 std::transform(strExt.begin(), strExt.end(), strExt.begin(), ::tolower);
285 if (strExt ==
"yaml" || strExt ==
"yml")
290 else if (strExt ==
"dat")
332 if (! InStream.is_open())
343 string strRec, strErr;
345 while (getline(InStream, strRec))
353 if ((! strRec.empty()) && (strRec[0] !=
QUOTE1) && (strRec[0] !=
QUOTE2))
360 nPos = strRec.find(
COLON);
362 if (nPos == string::npos)
365 cerr <<
ERR <<
"on line " << to_string(nLine)
372 string strRH = strRec.erase(0, nPos + 1);
385 nPos = strRH.rfind(
QUOTE1);
387 if (nPos != string::npos)
393 nPos = strRH.rfind(
QUOTE2);
395 if (nPos != string::npos)
419 vector<string> VstrTmp;
428 strErr =
"line " + to_string(nLine) +
": output file names";
450 strErr =
"line " + to_string(nLine) +
451 ": invalid integer for log file detail level '" + strRH +
460 strErr =
"line " + to_string(nLine) +
": log file detail level";
470 if (strRH.find(
'y') != string::npos)
481 if (VstrTmp.size() < 2)
484 "line " + to_string(nLine) +
485 ": must have both date and time for simulation start in '" +
491 if (!
bParseTime(&VstrTmp[0], nHour, nMin, nSec))
493 strErr =
"line " + to_string(nLine) +
494 ": could not understand simulation start time in '" +
500 if (!
bParseDate(&VstrTmp[1], nDay, nMonth, nYear))
502 strErr =
"line " + to_string(nLine) +
503 ": could not understand simulation start date in '" +
527 strErr =
"line " + to_string(nLine) +
528 ": units for duration of simulation";
534 nPos = strRH.rfind(
SPACE);
536 if (nPos == string::npos)
538 strErr =
"line " + to_string(nLine) +
539 ": format of duration simulation line";
553 strErr =
"line " + to_string(nLine) +
554 ": duration of simulation must be > 0";
567 "line " + to_string(nLine) +
": units for simulation timestep";
573 nPos = strRH.rfind(
SPACE);
575 if (nPos == string::npos)
578 "line " + to_string(nLine) +
": format of simulation timestep";
591 strErr =
"line " + to_string(nLine) +
592 ": invalid floating point number for timestep '" + strRH +
600 strErr =
"line " + to_string(nLine) +
601 ": timestep of simulation must be > 0";
604 strErr =
"line " + to_string(nLine) +
605 ": timestep of simulation must be < the duration of the "
618 string const strOriginal = strRH;
619 size_t nCommaPos = 0;
626 size_t const nNextComma = strOriginal.find(
',', nCommaPos);
628 if (nNextComma != string::npos)
630 strGroup = strOriginal.substr(nCommaPos, nNextComma - nCommaPos);
631 nCommaPos = nNextComma + 1;
636 strGroup = strOriginal.substr(nCommaPos);
637 nCommaPos = string::npos;
644 if (strGroup.empty())
652 strErr =
"line " + to_string(nLine) +
653 ": units for save intervals in group '" + strGroup +
"'";
658 size_t const nLastSpace = strGroup.rfind(
SPACE);
660 if (nLastSpace == string::npos)
662 strErr =
"line " + to_string(nLine) +
663 ": format of save times/intervals in group '" +
668 string strNumbers = strGroup.substr(0, nLastSpace);
672 size_t nSpacePos = 0;
677 size_t const nNextSpace = strNumbers.find(
SPACE, nSpacePos);
679 if (nNextSpace == string::npos)
682 string const strNumber =
683 strNumbers.substr(nSpacePos, nNextSpace - nSpacePos);
685 if (! strNumber.empty())
690 "line " + to_string(nLine) +
": too many save intervals";
694 double const dValue = strtod(strNumber.c_str(), NULL) * dMult;
698 nSpacePos = nNextSpace + 1;
699 }
while (nSpacePos < strNumbers.length());
701 if (! strErr.empty())
703 }
while (nCommaPos != string::npos);
705 if (! strErr.empty())
715 strErr =
"line " + to_string(nLine) +
716 ": save interval cannot be less than timestep";
729 strErr =
"line " + to_string(nLine) +
730 ": first save time cannot be less than timestep";
740 strErr =
"line " + to_string(nLine) +
": no save times specified";
764 nPos = strRH.find(
SPACE);
766 if (nPos == string::npos)
784 strTmp = strRH.substr(0, nPos);
792 strRH = strRH.substr(nPos, strRH.size() - nPos);
795 if (strRH.size() == 0)
816 strErr =
"line " + to_string(nLine) +
817 ": invalid integer for max save digits for GIS output "
826 strErr =
"line " + to_string(nLine) +
827 ": max save digits for GIS output file names must be > 1";
835 strErr =
"line " + to_string(nLine) +
836 ": must specify save digits for GIS output as sequential "
837 "or as iteration number";
844 if (strRH.find(
's') != string::npos)
850 else if (strRH.find(
'i') != string::npos)
859 strErr += to_string(nLine);
861 ": invalid code for save digits for GIS output save "
862 "number (must be s or i)";
875 strErr += to_string(nLine);
876 strErr +=
": must contain '";
880 strErr +=
"', or at least one raster GIS output code";
1434 if (! strRH.empty())
1435 strErr =
"line " + to_string(nLine) +
": unknown code '" +
1436 strRH +
"' in list of codes for raster GIS output";
1449 if (strRH.find(
"gpkg") != string::npos)
1451 "GDAL gpkg raster create() is not yet working correctly. "
1452 "Please choose another output format.";
1462 if (strRH.find(
'y') != string::npos)
1473 if (strRH.find(
'y') != string::npos)
1480 if (! strRH.empty())
1486 nPos = strRH.find(
SPACE);
1488 if (nPos != string::npos)
1494 strTmp = strRH.substr(0, nPos);
1498 strRH = strRH.substr(nPos, strRH.size() - nPos);
1502 nPos = strRH.find(
SPACE);
1503 }
while (nPos != string::npos);
1517 strErr += to_string(nLine);
1518 strErr +=
": must contain '";
1520 strErr +=
"', or '";
1522 strErr +=
"', or at least one vector GIS output code";
1697 if (! strRH.empty())
1698 strErr =
"line " + to_string(nLine) +
": unknown code '" +
1699 strRH +
"' in list of vector GIS output codes";
1710 strErr =
"line " + to_string(nLine) +
": vector GIS output format";
1716 if (! strRH.empty())
1833 if (! strRH.empty())
1834 strErr =
"line " + to_string(nLine) +
": unknown code '" +
1835 strRH +
"' in list of time series output files";
1846 strErr =
"line " + to_string(nLine) +
1847 ": invalid integer for coastline smoothing algorithm '" +
1856 strErr =
"line " + to_string(nLine) +
1857 ": coastline vector smoothing algorithm";
1865 strErr =
"line " + to_string(nLine) +
1866 ": invalid integer for coastline smoothing window '" +
1875 strErr =
"line " + to_string(nLine) +
1876 ": size of coastline vector smoothing window (must be > 0 "
1886 strErr =
"line " + to_string(nLine) +
1887 ": invalid integer for Savitzky-Golay polynomial for "
1888 "coastline smoothing '" +
1896 strErr =
"line " + to_string(nLine) +
1897 ": value of Savitzky-Golay polynomial for coastline "
1898 "smoothing (must be <= 6)";
1906 if (strRH.find(
'n') != string::npos)
1911 if (strRH.find(
's') != string::npos)
1916 if (strRH.find(
'w') != string::npos)
1921 if (strRH.find(
'e') != string::npos)
1933 "line " + to_string(nLine) +
1934 ": invalid integer for size of coastline smoothing window '" +
1943 strErr =
"line " + to_string(nLine) +
1944 ": size of profile vector smoothing window (must be >= 0, "
1945 "if > 0 must be odd)";
1953 strErr =
"line " + to_string(nLine) +
1954 ": invalid floating point number for max local slope '" +
1963 "line " + to_string(nLine) +
": max local slope must be > 0";
1972 strErr =
"line " + to_string(nLine) +
1973 ": invalid floating point number for maximum elevation of "
1974 "beach above SWL '" +
1982 strErr =
"line " + to_string(nLine) +
1983 ": maximum elevation of beach above SWL must be >= 0";
1993 strErr =
"line " + to_string(nLine) +
1994 ": invalid integer for number of sediment layers '" +
2003 strErr =
"line " + to_string(nLine) +
2004 ": must be at least one sediment layer";
2047 if (! strRH.empty())
2057 (strRH[1] ==
COLON))
2073 for (
int nLayer = 0; nLayer <
m_nLayers; nLayer++)
2075 for (
int j = 1; j <= 6; j++)
2081 if (! getline(InStream, strRec))
2083 cerr <<
ERR <<
"premature end of file in "
2095 while (strRec.empty() || (strRec[0] ==
QUOTE1) ||
2100 nPos = strRec.find(
COLON);
2102 if (nPos == string::npos)
2105 cerr <<
ERR <<
"on line " << to_string(nLine)
2114 strRH = strRec.substr(nPos + 1);
2122 nPos = strRH.rfind(
QUOTE1);
2124 if (nPos != string::npos)
2127 nPos = strRH.rfind(
QUOTE2);
2129 if (nPos != string::npos)
2150 if (! strRH.empty())
2163 (strRH[1] ==
COLON))
2182 if (! strRH.empty())
2195 (strRH[1] ==
COLON))
2214 if (! strRH.empty())
2227 (strRH[1] ==
COLON))
2246 if (! strRH.empty())
2260 (strRH[1] ==
COLON))
2279 if (! strRH.empty())
2293 (strRH[1] ==
COLON))
2312 if (! strRH.empty())
2326 (strRH[1] ==
COLON))
2344 if (! strErr.empty())
2347 cerr <<
ERR <<
"reading " << strErr <<
" in "
2349 <<
"'" << strRec <<
"'" << endl;
2360 if (! strRH.empty())
2372 (strRH[1] ==
COLON))
2390 if (! strRH.empty())
2400 (strRH[1] ==
COLON))
2419 if (! strRH.empty())
2429 (strRH[1] ==
COLON))
2455 strErr =
"line " + to_string(nLine) +
2456 ": must specify both intervention class and "
2457 "intervention height files";
2466 strErr =
"line " + to_string(nLine) +
2467 ": must specify both intervention class and "
2468 "intervention height files";
2480 (strRH[1] ==
COLON))
2502 strErr =
"line " + to_string(nLine) +
2503 ": invalid integer for wave propagation model '" + strRH +
2512 strErr =
"line " + to_string(nLine) +
2513 ": wave propagation model must be 0 or 1";
2522 strErr =
"line " + to_string(nLine) +
2523 ": invalid floating point number for sea water density '" +
2532 "line " + to_string(nLine) +
": sea water density must be > 0";
2541 strErr =
"line " + to_string(nLine) +
2542 ": invalid floating point number for initial SWL '" +
2560 strErr =
"line " + to_string(nLine) +
2561 ": invalid floating point number for final SWL '" +
2575 strErr =
"line " + to_string(nLine) +
2577 " must be either a number or a filename (filename must "
2578 "not start with a number)";
2591 strErr =
"line " + to_string(nLine) +
2592 ": invalid floating point number for deep water wave "
2604 strErr =
"line " + to_string(nLine) +
2605 ": deep water wave height must be > 0";
2622 (strRH[1] ==
COLON))
2647 strErr =
"line " + to_string(nLine) +
2648 ": filename missing for deep water wave height input";
2660 (strRH[1] ==
COLON))
2686 strErr =
"line " + to_string(nLine) +
2687 ": invalid floating point number for deep water wave "
2697 "line " + to_string(nLine) +
2698 ": deep water wave orientation must be zero degrees or more";
2702 "line " + to_string(nLine) +
2703 ": deep water wave orientation must be less than 360 degrees";
2716 strErr =
"line " + to_string(nLine) +
2717 ": invalid floating point number for wave period '" +
2725 strErr =
"line " + to_string(nLine) +
": wave period must be > 0";
2733 if (! strRH.empty())
2743 (strRH[1] ==
COLON))
2762 strErr =
"line " + to_string(nLine) +
2763 ": invalid floating point number for breaking wave height "
2764 "to depth ratio '" +
2772 strErr =
"line " + to_string(nLine) +
2773 ": breaking wave height to depth ratio must be > 0";
2783 if (strRH.find(
'y') != string::npos)
2796 strErr =
"line " + to_string(nLine) +
2797 ": invalid floating point number for R (coast platform "
2798 "resistance to erosion) '" +
2803 m_dR = strtod(strRH.c_str(), NULL);
2806 strErr =
"line " + to_string(nLine) +
2807 ": R (coast platform resistance to erosion) value must "
2819 if (strRH.find(
'y') != string::npos)
2831 strErr =
"line " + to_string(nLine) +
2832 ": invalid integer for beach sediment transport at grid "
2842 strErr =
"line " + to_string(nLine) +
2843 ": switch for handling of beach sediment at grid edges "
2844 "must be 0, 1, or 2";
2857 "line " + to_string(nLine) +
2858 ": invalid integer for beach erosion/deposition equation '" +
2869 strErr =
"line " + to_string(nLine) +
2870 ": switch for beach erosion/deposition equation must be "
2881 strErr =
"line " + to_string(nLine) +
2882 ": invalid floating point number for median particle size "
2883 "of fine sediment '" +
2891 strErr =
"line " + to_string(nLine) +
2892 ": median particle size of fine sediment must be > 0";
2905 strErr =
"line " + to_string(nLine) +
2906 ": invalid floating point number for median particle size "
2907 "of sand sediment '" +
2915 strErr =
"line " + to_string(nLine) +
2916 ": median particle size of sand sediment must be > 0";
2929 strErr =
"line " + to_string(nLine) +
2930 ": invalid floating point number for median particle size "
2931 "of coarse sediment '" +
2939 strErr =
"line " + to_string(nLine) +
2940 ": median particle size of coarse sediment must be > 0";
2955 strErr =
"line " + to_string(nLine) +
2956 ": invalid floating point number for density of beach "
2965 strErr =
"line " + to_string(nLine) +
2966 ": density of beach sediment must be > 0";
2978 strErr =
"line " + to_string(nLine) +
2979 ": invalid floating point number for porosity of beach "
2988 strErr =
"line " + to_string(nLine) +
2989 ": porosity of beach sediment must be > 0";
2999 strErr =
"line " + to_string(nLine) +
3000 ": invalid floating point number for erodibility of "
3001 "fine-sized sediment '" +
3009 strErr =
"line " + to_string(nLine) +
3010 ": relative erodibility of fine-sized sediment must be "
3020 strErr =
"line " + to_string(nLine) +
3021 ": invalid floating point number for erodibility of "
3022 "sand-sized sediment '" +
3030 strErr =
"line " + to_string(nLine) +
3031 ": relative erodibility of sand-sized sediment must be "
3041 strErr =
"line " + to_string(nLine) +
3042 ": invalid floating point number for erodibility of "
3043 "coarse-sized sediment '" +
3052 strErr =
"line " + to_string(nLine) +
3053 ": relative erodibility of coarse-sized sediment must be "
3060 strErr =
"line " + to_string(nLine) +
3061 ": must have at least one non-zero erodibility value";
3072 strErr =
"line " + to_string(nLine) +
3073 ": invalid floating point number for transport "
3074 "parameter KLS of CERC equation '" +
3079 m_dKLS = strtod(strRH.c_str(), NULL);
3094 strErr =
"line " + to_string(nLine) +
3095 ": transport parameter KLS of CERC equation must be > 0";
3107 strErr =
"line " + to_string(nLine) +
3108 ": invalid floating point number for transport "
3109 "parameter of Kamphuis equation '" +
3117 strErr =
"line " + to_string(nLine) +
3118 ": transport parameter of Kamphuis equation must be > 0";
3131 strErr =
"line " + to_string(nLine) +
3132 ": invalid floating point number for Dean profile start "
3133 "height above SWL '" +
3141 strErr =
"line " + to_string(nLine) +
3142 ": Berm height (Dean profile start height above SWL) "
3158 if (strRH.find(
'y') != string::npos)
3171 strErr =
"line " + to_string(nLine) +
3172 ": invalid floating point number for cliff resistance "
3181 strErr =
"line " + to_string(nLine) +
3182 ": cliff resistance to erosion must be > 0";
3194 strErr =
"line " + to_string(nLine) +
3195 ": invalid floating point number for cliff notch "
3196 "overhang at collapse '" +
3204 strErr =
"line " + to_string(nLine) +
3205 ": cliff notch overhang at collapse must be > 0";
3217 strErr =
"line " + to_string(nLine) +
3218 ": cliff notch base below still water level must be > 0";
3230 strErr =
"line " + to_string(nLine) +
3231 ": invalid floating point number for scale parameter A "
3232 "for cliff deposition '" +
3240 strErr =
"line " + to_string(nLine) +
3241 ": scale parameter A for cliff deposition must be 0 [= "
3254 strErr =
"line " + to_string(nLine) +
3255 ": invalid floating point number for width of cliff "
3256 "collapse talus '" +
3264 strErr =
"line " + to_string(nLine) +
3265 ": planview width of cliff deposition must be > 0";
3277 strErr =
"line " + to_string(nLine) +
3278 ": invalid floating point number for planview length of "
3279 "cliff deposition '" +
3287 strErr =
"line " + to_string(nLine) +
3288 ": planview length of cliff deposition must be > 0";
3301 strErr =
"line " + to_string(nLine) +
3302 ": invalid floating point number for height of cliff "
3303 "collapse (as a fraction of cliff elevation) '" +
3311 strErr =
"line " + to_string(nLine) +
3312 ": minimum height of cliff collapse (as a fraction of "
3313 "cliff elevation) must be >= 0";
3324 if (strRH.find(
'y') != string::npos)
3338 if (! strRH.empty())
3381 if (! strRH.empty())
3382 strErr =
"line " + to_string(nLine) +
": unknown code '" +
3384 "' in list of riverine flooding output codes";
3389 strErr =
"line " + to_string(nLine) +
3390 ": if simulating riverine flooding, must contain '" +
3392 "' or at least one vector GIS output code for riverine "
3408 strErr =
"line " + to_string(nLine) +
3409 ": invalid code for run-up equation used in simulating "
3423 if (strRH.find(
'y') != string::npos)
3435 if (! strRH.empty())
3445 (strRH[1] ==
COLON))
3461 strErr =
"line " + to_string(nLine) +
3462 ": path of location points file must not be empty if "
3463 "simulating floods";
3472 if (strRH.find(
'y') != string::npos)
3484 if (! strRH.empty())
3494 (strRH[1] ==
COLON))
3516 if (strRH.find(
'p') != string::npos)
3519 else if (strRH.find(
'c') != string::npos)
3522 else if (strRH.find(
'l') != string::npos)
3526 strErr =
"line " + to_string(nLine) +
3527 ": Sediment input type must be P, C, or L";
3538 strErr =
"line " + to_string(nLine) +
3539 ": filename missing for sediment input";
3551 (strRH[1] ==
COLON))
3574 strErr =
"line " + to_string(nLine) +
3575 ": invalid floating point number for gravitational "
3581 m_dG = strtod(strRH.c_str(), NULL);
3584 strErr =
"line " + to_string(nLine) +
3585 ": gravitational acceleration must be > 0";
3600 strErr =
"line " + to_string(nLine) +
3601 ": spacing of coastline normals must be > 0";
3610 strErr =
"line " + to_string(nLine) +
3611 ": invalid floating point number for random factor for "
3612 "spacing of coastline normals '" +
3621 "line " + to_string(nLine) +
3622 ": random factor for spacing of coastline normals must be >= 0";
3626 "line " + to_string(nLine) +
3627 ": random factor for spacing of coastline normals must be < 1";
3635 strErr =
"line " + to_string(nLine) +
3636 ": invalid floating point number for length of coastline "
3645 strErr =
"line " + to_string(nLine) +
3646 ": length of coastline normals must be > 0";
3655 strErr =
"line " + to_string(nLine) +
3656 ": invalid floating point number for start depth for wave "
3665 strErr =
"line " + to_string(nLine) +
3666 ": start depth for wave calcs must be > 0";
3678 if (strRH.find(
'y') != string::npos)
3684 strErr =
"line " + to_string(nLine) +
3685 ": cannot save profiile data if not simulating shore "
3702 for (
unsigned int j = 0; j < VstrTmp.size(); j++)
3704 VstrTmp[j] =
strTrim(&VstrTmp[j]);
3708 strErr =
"line " + to_string(nLine) +
3709 ": invalid integer for profile to be saved '" +
3714 int const nTmp = stoi(VstrTmp[j]);
3718 strErr =
"line " + to_string(nLine) +
3719 ": Profile number for saving must be >= 0";
3735 for (
unsigned int j = 0; j < VstrTmp.size(); j++)
3737 VstrTmp[j] =
strTrim(&VstrTmp[j]);
3738 unsigned long const ulTmp = atol(VstrTmp[j].c_str());
3742 strErr =
"line " + to_string(nLine) +
3743 ": Timestep for profile saves must >= 1";
3759 if (strRH.find(
'y') != string::npos)
3770 if (strRH.find(
'y') != string::npos)
3781 strErr += to_string(nLine);
3783 ": invalid integer for size of moving window for "
3784 "coastline curvature calculation '";
3798 strErr += to_string(nLine);
3800 ": size of moving window for coastline curvature "
3801 "calculation (must be > 0 and odd)";
3812 strErr += to_string(nLine);
3813 strErr +=
": invalid integer for cliff edge smoothing algorithm '";
3825 "line " + to_string(nLine) +
": cliff edge smoothing algorithm";
3833 strErr =
"line " + to_string(nLine) +
3834 ": invalid integer for cliff edge smoothing window '" +
3844 "line " + to_string(nLine) +
3845 ": size of cliff edge smoothing window (must be > 0 and odd)";
3854 strErr =
"line " + to_string(nLine) +
3855 ": invalid integer for Savitzky-Golay polynomial for "
3856 "cliff edge smoothing '" +
3865 strErr =
"line " + to_string(nLine) +
3866 ": order of Savitzky-Golay polynomial for cliff edge "
3867 "smoothing (must be 2, 4 or 6)";
3875 strErr =
"line " + to_string(nLine) +
3876 ": invalid number for cliff slope limit '" + strRH +
3885 "line " + to_string(nLine) +
": cliff slope limit must be > 0";
3891 if (! strErr.empty())
3896 <<
" and change this line:" << endl;
3897 cerr <<
"'" << strRec <<
"'" << endl
3910 bool bNoRasterFiles =
true;
3916 bNoRasterFiles =
false;
3926 bNoRasterFiles =
false;
3932 cerr <<
ERR <<
"at least one raster GIS file is needed" << endl;
3951 if (! InStream.is_open())
3963 while (getline(InStream, strRec))
3971 if ((strRec.empty()) || (strRec[0] ==
QUOTE1) || (strRec[0] ==
QUOTE2))
3977 cerr <<
ERR <<
"invalid floating point number for tide data '" << strRec
4010 if (! InStream.is_open())
4020 int nExpected = 0, nRead = 0;
4024 InStream >> nExpected;
4027 vector<double> VdDepthOverDB;
4028 vector<double> VdErosionPotential;
4029 vector<double> VdErosionPotentialFirstDeriv;
4033 while (getline(InStream, strRec))
4041 if ((strRec.empty()) || (strRec[0] ==
QUOTE1) || (strRec[0] ==
QUOTE2))
4050 for (
unsigned int i = 0; i < strTmp.size(); i++)
4053 strTmp[i] =
strTrim(&strTmp[i]);
4059 <<
"on line " + to_string(nLine) +
4060 " invalid floating point number for Erosion Potential "
4068 VdDepthOverDB.push_back(strtod(strTmp[0].c_str(), NULL));
4069 VdErosionPotential.push_back(strtod(strTmp[1].c_str(), NULL));
4070 VdErosionPotentialFirstDeriv.push_back(strtod(strTmp[2].c_str(), NULL));
4082 if (nExpected != nRead)
4084 cout <<
ERR <<
"read in " << nRead <<
" lines from "
4086 <<
" lines expected" << endl;
4097 <<
", erosion potential function cannot be positive" << endl;
4105 &VdErosionPotentialFirstDeriv))
4107 cout <<
ERR <<
"line " + to_string(nLine) +
" in "
4109 <<
": erosion potential function is unbounded for high values of "
4132 if (! InStream.is_open())
4136 <<
" for input" << endl;
4142 int nExpectedStations = 0;
4144 int nTimeStepsRead = 0;
4145 string strRec, strErr;
4148 while (getline(InStream, strRec))
4156 if ((! strRec.empty()) && (strRec[0] !=
QUOTE1) && (strRec[0] !=
QUOTE2))
4167 size_t nPos = strRec.find(
COLON);
4169 if (nPos == string::npos)
4172 cerr <<
ERR <<
"on line " << to_string(nLine)
4175 <<
"'" << strRec <<
"'" << endl;
4179 if (nPos == strRec.size() - 1)
4182 cerr <<
ERR <<
"on line " << to_string(nLine)
4183 <<
"badly formatted (nothing following ':') in "
4185 <<
"'" << strRec <<
"'" << endl;
4190 string strRH = strRec.substr(nPos + 1);
4197 nPos = strRH.rfind(
QUOTE1);
4199 if (nPos != string::npos)
4202 nPos = strRH.rfind(
QUOTE2);
4204 if (nPos != string::npos)
4218 vector<string> VstrTmp;
4228 if (VstrTmp.size() < 2)
4230 strErr =
"line " + to_string(nLine) +
4231 ": must have both date and time for start of data in";
4236 if (!
bParseTime(&VstrTmp[0], nHour, nMin, nSec))
4238 strErr =
"line " + to_string(nLine) +
4239 ": could not understand start time for data";
4244 if (!
bParseDate(&VstrTmp[1], nDay, nMonth, nYear))
4246 strErr =
"line " + to_string(nLine) +
4247 ": could not understand start date for data";
4256 strErr =
"line " + to_string(nLine) +
4257 ": start time and date for wave time series data differs "
4258 "from simulation start time and date,";
4273 "line " + to_string(nLine) +
": unknown units for timestep";
4279 nPos = strRH.rfind(
SPACE);
4281 if (nPos == string::npos)
4283 strErr =
"line " + to_string(nLine) +
": format of timestep line";
4296 strErr =
"line " + to_string(nLine) +
4297 ": invalid floating point number for timestep";
4301 dThisIter = strtod(strRH.c_str(), NULL) * dMult;
4304 strErr =
"line " + to_string(nLine) +
": timestep must be > 0";
4307 strErr =
"line " + to_string(nLine) +
4308 ": timestep must be the same as the simulation timestep";
4317 strErr =
"line " + to_string(nLine) +
4318 ": invalid integer for number of wave stations '" + strRH +
4323 nExpectedStations = stoi(strRH);
4327 if (nExpectedStations != nWaveStations)
4331 strErr =
"line " + to_string(nLine) +
4332 ": number of wave stations in " +
4334 to_string(nWaveStations) +
" but we have " +
4335 to_string(nExpectedStations) +
" stations";
4347 strErr =
"line " + to_string(nLine) +
4348 ": invalid integer for expected number of time steps '" +
4358 strErr =
"line " + to_string(nLine) +
4359 ": must have values for at least one timestep";
4376 for (
unsigned int i = 0; i < VstrTmp.size();
4380 VstrTmp[i] =
strTrim(&VstrTmp[i]);
4386 "line " + to_string(nLine) +
4387 ": invalid floating point number for deep water wave value '" +
4396 for (
int i = 0; i < nExpectedStations; i++)
4399 strtod(VstrTmp[n + 0].c_str(), NULL));
4401 strtod(VstrTmp[n + 1].c_str(), NULL));
4403 strtod(VstrTmp[n + 2].c_str(), NULL));
4420 if (! strErr.empty())
4423 cerr <<
ERR << strErr <<
" in deep water wave time series file "
4425 <<
"'" << strRec <<
"'" << endl;
4437 << nTimeStepsRead <<
" timesteps was read, but "
4439 <<
" timesteps were specified in the file's header" << endl;
4448 unsigned int const nTotExpected =
4455 << nTotExpected <<
" values expected" << endl;
4464 << nTotExpected <<
" values expected" << endl;
4473 << nTotExpected <<
" values expected" << endl;
4480 for (
int j = 0; j < nExpectedStations; j++)
4489 int const nSimulationTimeSteps =
4495 string const strTmp =
4496 "Deep water wave data will wrap every " +
4501 cout <<
NOTE << strTmp;
4519 if (! InStream.is_open())
4530 string strRec, strErr;
4533 while (getline(InStream, strRec))
4541 if ((! strRec.empty()) && (strRec[0] !=
QUOTE1) && (strRec[0] !=
QUOTE2))
4550 unsigned int nTarget = 7;
4555 if (VstrTmp.size() < nTarget)
4557 strErr =
"line " + to_string(nLine) +
4558 ": too few data items on data line '" + to_string(nRead) +
4567 strErr =
"line " + to_string(nLine) +
4568 ": invalid integer for Location ID of sediment input event '" +
4573 int const nID = stoi(
strTrim(&VstrTmp[0]));
4581 strErr =
"line " + to_string(nLine) +
": invalid Location ID '" +
4583 "' for sediment input event location event in " +
4596 strErr =
"line " + to_string(nLine) +
": invalid time and/or date '" +
4597 VstrTmp[1] +
"' for sediment input event in " +
4606 strErr =
"line " + to_string(nLine) +
4607 ": invalid floating point number '" + VstrTmp[2] +
4608 "' for fine sediment volume for sediment input event in " +
4613 double const dFineSedVol = stod(
strTrim(&VstrTmp[2]));
4615 if (dFineSedVol < 0)
4617 strErr =
"line " + to_string(nLine) +
": negative number '" +
4618 to_string(dFineSedVol) +
4619 "' for fine sediment volume for sediment input event in " +
4624 if (dFineSedVol > 0)
4632 "line " + to_string(nLine) +
": invalid floating point number '" +
4634 "' for sand-sized sediment volume for sediment input event in " +
4639 double const dSandSedVol = stod(
strTrim(&VstrTmp[3]));
4641 if (dSandSedVol < 0)
4644 "line " + to_string(nLine) +
": negative number '" +
4645 to_string(dSandSedVol) +
4646 "' for sand-sized sediment volume for sediment input event in " +
4651 if (dSandSedVol > 0)
4658 strErr =
"line " + to_string(nLine) +
4659 ": invalid floating point number '" + VstrTmp[4] +
4660 "' for coarse sediment volume for sediment input event in " +
4665 double const dCoarseSedVol = stod(
strTrim(&VstrTmp[4]));
4667 if (dCoarseSedVol < 0)
4669 strErr =
"line " + to_string(nLine) +
": negative number '" +
4670 to_string(dCoarseSedVol) +
4671 "' for coarse sediment volume of sediment input event in " +
4676 if (dCoarseSedVol > 0)
4691 strErr =
"line " + to_string(nLine) +
4692 ": invalid floating point number '" + VstrTmp[5] +
4693 "' for coast-normal length of sediment input event in " +
4698 dLen = stod(
strTrim(&VstrTmp[5]));
4702 strErr =
"line " + to_string(nLine) +
4703 ": coast-normal length of the sediment block '" +
4704 to_string(dLen) +
"' must be > 0 in " +
4713 strErr =
"line " + to_string(nLine) +
4714 ": invalid floating point number '" + VstrTmp[6] +
4715 "' for along-coast width of sediment input event in " +
4720 dWidth = stod(
strTrim(&VstrTmp[6]));
4724 strErr =
"line " + to_string(nLine) +
4725 ": along-coast width (m) of the sediment block '" +
4726 to_string(dWidth) +
"' must be > 0 in " +
4750 new CSedInputEvent(nID, ulEventTimeStep, dFineSedVol, dSandSedVol,
4751 dCoarseSedVol, dLen, dWidth);
4759 if (! strErr.empty())
4762 cerr <<
ERR << strErr <<
" in sediment input event file "
4764 <<
"'" << strRec <<
"'" << endl;
4809 auto processFilePath = [&](
string const &filePath) ->
string
4811 if (filePath.empty())
4827 (filePath[0] ==
TILDE) ||
4828 (filePath.length() > 1 && filePath[1] ==
COLON))
4834 return basePath + filePath;
4840 if (root.
HasChild(
"run_information"))
4843 if (runInfo.
HasChild(
"output_file_names"))
4845 if (runInfo.
HasChild(
"log_file_detail"))
4848 if (runInfo.
HasChild(
"csv_per_timestep_results"))
4877 if (gis.
HasChild(
"max_save_digits"))
4879 if (gis.
HasChild(
"save_digits_mode"))
4905 if (hydro.
HasChild(
"wave_propagation_model"))
4908 if (strModel ==
"COVE")
4910 else if (strModel ==
"CShore")
4913 if (hydro.
HasChild(
"seawater_density"))
4916 if (hydro.
HasChild(
"initial_water_level"))
4919 if (hydro.
HasChild(
"final_water_level"))
4924 if (hydro.
HasChild(
"wave_height_time_series"))
4927 if (hydro.
HasChild(
"wave_height_shape_file"))
4933 if (hydro.
HasChild(
"wave_orientation"))
4940 if (hydro.
HasChild(
"tide_data_file"))
4942 if (hydro.
HasChild(
"breaking_wave_ratio"))
4948 if (root.
HasChild(
"grid_and_coastline"))
4951 if (grid.
HasChild(
"coastline_smoothing"))
4954 if (strSmoothing ==
"none")
4956 else if (strSmoothing ==
"running_mean")
4958 else if (strSmoothing ==
"savitzky_golay")
4964 if (grid.
HasChild(
"coastline_smoothing_window"))
4967 if (grid.
HasChild(
"polynomial_order"))
4970 if (grid.
HasChild(
"omit_grid_edges"))
4972 if (grid.
HasChild(
"profile_smoothing_window"))
4975 if (grid.
HasChild(
"max_local_slope"))
4978 if (grid.
HasChild(
"max_beach_elevation"))
4984 if (root.
HasChild(
"layers_and_files"))
4989 if (layers.
HasChild(
"basement_dem_file"))
4992 if (layers.
HasChild(
"suspended_sediment_file"))
4995 if (layers.
HasChild(
"landform_file"))
4998 if (layers.
HasChild(
"intervention_class_file"))
5001 if (layers.
HasChild(
"intervention_height_file"))
5009 vector<string> unconsFine, unconsSand, unconsCoarse;
5010 vector<string> consFine, consSand, consCoarse;
5012 if (layer0.
HasChild(
"unconsolidated_fine"))
5013 unconsFine.push_back(processFilePath(
5015 if (layer0.
HasChild(
"unconsolidated_sand"))
5016 unconsSand.push_back(processFilePath(
5018 if (layer0.
HasChild(
"unconsolidated_coarse"))
5019 unconsCoarse.push_back(processFilePath(
5021 if (layer0.
HasChild(
"consolidated_fine"))
5024 if (layer0.
HasChild(
"consolidated_sand"))
5027 if (layer0.
HasChild(
"consolidated_coarse"))
5028 consCoarse.push_back(processFilePath(
5041 if (root.
HasChild(
"sediment_and_erosion"))
5044 if (sed.
HasChild(
"coast_platform_erosion"))
5047 if (sed.
HasChild(
"platform_erosion_resistance"))
5050 if (sed.
HasChild(
"beach_sediment_transport"))
5053 if (sed.
HasChild(
"beach_transport_at_edges"))
5056 if (sed.
HasChild(
"beach_erosion_equation"))
5061 if (sed.
HasChild(
"sediment_density"))
5064 if (sed.
HasChild(
"beach_sediment_porosity"))
5069 if (sed.
HasChild(
"kamphuis_parameter"))
5098 if (root.
HasChild(
"cliff_parameters"))
5101 if (cliff.
HasChild(
"cliff_collapse"))
5104 if (cliff.
HasChild(
"cliff_erosion_resistance"))
5107 if (cliff.
HasChild(
"notch_overhang"))
5112 if (cliff.
HasChild(
"deposition_scale_parameter_a"))
5117 if (cliff.
HasChild(
"min_talus_length"))
5120 if (cliff.
HasChild(
"min_talus_height"))
5126 if (root.
HasChild(
"flood_parameters"))
5131 if (flood.
HasChild(
"flood_coastline"))
5133 if (flood.
HasChild(
"runup_equation"))
5135 if (flood.
HasChild(
"characteristic_locations"))
5138 if (flood.
HasChild(
"flood_input_location"))
5144 if (root.
HasChild(
"sediment_input_parameters"))
5147 if (sedInput.
HasChild(
"sediment_input"))
5155 if (sedInput.
HasChild(
"details_file"))
5161 if (root.
HasChild(
"physics_and_geometry"))
5164 if (physics.
HasChild(
"gravitational_acceleration"))
5167 if (physics.
HasChild(
"normal_spacing"))
5170 if (physics.
HasChild(
"random_factor"))
5173 if (physics.
HasChild(
"normal_length"))
5176 if (physics.
HasChild(
"start_depth_ratio"))
5182 if (root.
HasChild(
"profile_and_output"))
5185 if (profile.
HasChild(
"save_profile_data"))
5188 if (profile.
HasChild(
"save_parallel_profiles"))
5191 if (profile.
HasChild(
"output_erosion_potential"))
5194 if (profile.
HasChild(
"curvature_window"))
5199 if (profile.
HasChild(
"profile_numbers"))
5204 vector<int> vecNums;
5205 vector<CYamlNode> seq = profileNums.
GetSequence();
5206 for (
auto const &node : seq)
5207 vecNums.push_back(node.GetIntValue());
5211 if (profile.
HasChild(
"profile_timesteps"))
5216 vector<int> vecTimes;
5217 vector<CYamlNode> seq = profileTimes.
GetSequence();
5218 for (
auto const &node : seq)
5219 vecTimes.push_back(node.GetIntValue());
5226 if (root.
HasChild(
"cliff_edge_processing"))
5229 if (cliffEdge.
HasChild(
"cliff_edge_smoothing"))
5231 string strSmoothing =
5233 if (strSmoothing ==
"none")
5235 else if (strSmoothing ==
"running_mean")
5237 else if (strSmoothing ==
"savitzky_golay")
5243 if (cliffEdge.
HasChild(
"cliff_edge_smoothing_window"))
5246 if (cliffEdge.
HasChild(
"cliff_edge_polynomial_order"))
5249 if (cliffEdge.
HasChild(
"cliff_slope_limit"))
5254 catch (std::exception
const &e)
5256 cerr <<
ERR <<
"Error processing YAML configuration: " << e.what() << endl;
5268 string strRec, strErr;
5288 if (! strStartDateTime.empty())
5291 if (VstrTmp.size() >= 2)
5293 int nHour, nMin, nSec, nDay, nMonth, nYear;
5294 if (
bParseTime(&VstrTmp[0], nHour, nMin, nSec))
5296 if (
bParseDate(&VstrTmp[1], nDay, nMonth, nYear))
5311 if (! strDuration.empty())
5313 string strDurationLower =
strToLower(&strDuration);
5318 string strNumeric = strDurationLower;
5320 if (strNumeric.find(
"hour") != string::npos)
5321 strNumeric = strNumeric.substr(0, strNumeric.find(
"hour"));
5322 else if (strNumeric.find(
"day") != string::npos)
5323 strNumeric = strNumeric.substr(0, strNumeric.find(
"day"));
5324 else if (strNumeric.find(
"month") != string::npos)
5325 strNumeric = strNumeric.substr(0, strNumeric.find(
"month"));
5326 else if (strNumeric.find(
"year") != string::npos)
5327 strNumeric = strNumeric.substr(0, strNumeric.find(
"year"));
5331 m_dSimDuration = strtod(strNumeric.c_str(), NULL) * dDurationMult;
5338 if (! strTimestep.empty())
5340 string strTimestepLower =
strToLower(&strTimestep);
5345 std::string strNumeric = strTimestepLower;
5347 if (strNumeric.find(
"hour") != string::npos)
5348 strNumeric = strNumeric.substr(0, strNumeric.find(
"hour"));
5349 else if (strNumeric.find(
"day") != string::npos)
5350 strNumeric = strNumeric.substr(0, strNumeric.find(
"day"));
5351 else if (strNumeric.find(
"month") != string::npos)
5352 strNumeric = strNumeric.substr(0, strNumeric.find(
"month"));
5353 else if (strNumeric.find(
"year") != string::npos)
5354 strNumeric = strNumeric.substr(0, strNumeric.find(
"year"));
5358 m_dTimeStep = strtod(strNumeric.c_str(), NULL) * dTimestepMult;
5362 "timestep of simulation must be > 0";
5366 " timestep of simulation must be < the duration of the "
5373 if (! vecSaveTimes.empty())
5378 for (
string const &strSaveTime : vecSaveTimes)
5380 if (strSaveTime.empty())
5383 string strSaveTimeLower =
strToLower(&strSaveTime);
5390 size_t nLastSpace = strSaveTimeLower.rfind(
SPACE);
5391 if (nLastSpace != string::npos)
5393 string strNumbers = strSaveTimeLower.substr(0, nLastSpace);
5398 for (
string const &strNum : VstrNumbers)
5400 if (! strNum.empty())
5404 double dValue = strtod(strNum.c_str(), NULL) * dMult;
5455 strErr =
"max save digits for GIS output file names must be > 1";
5459 if (! strSaveDigitsMode.empty())
5461 string strSaveDigitsLower =
strToLower(&strSaveDigitsMode);
5462 if (strSaveDigitsLower.find(
's') != string::npos)
5464 else if (strSaveDigitsLower.find(
'i') != string::npos)
5470 if (! rasterFiles.empty())
5524 for (
string const &rasterCode : rasterFiles)
5526 string code = rasterCode;
5527 std::transform(code.begin(), code.end(), code.begin(), ::tolower);
5529 if (code ==
"suspended_sediment")
5531 else if (code ==
"avg_suspended_sediment")
5533 else if (code ==
"fine_uncons")
5535 else if (code ==
"fine_cons")
5537 else if (code ==
"sand_uncons")
5539 else if (code ==
"sand_cons")
5541 else if (code ==
"coarse_uncons")
5543 else if (code ==
"coarse_cons")
5545 else if (code ==
"sediment_top_elevation")
5547 else if (code ==
"top_elevation")
5549 else if (code ==
"sea_depth")
5551 else if (code ==
"wave_height")
5553 else if (code ==
"wave_orientation")
5555 else if (code ==
"wave_period")
5557 else if (code ==
"potential_platform_erosion")
5559 else if (code ==
"actual_platform_erosion")
5561 else if (code ==
"total_potential_platform_erosion")
5563 else if (code ==
"total_actual_platform_erosion")
5565 else if (code ==
"potential_beach_erosion")
5567 else if (code ==
"actual_beach_erosion")
5569 else if (code ==
"total_potential_beach_erosion")
5571 else if (code ==
"total_actual_beach_erosion")
5573 else if (code ==
"beach_deposition")
5575 else if (code ==
"total_beach_deposition")
5577 else if (code ==
"landform")
5579 else if (code ==
"local_cons_sediment_slope")
5581 else if (code ==
"slope")
5583 else if (code ==
"cliff")
5585 else if (code ==
"avg_sea_depth")
5587 else if (code ==
"avg_wave_height")
5589 else if (code ==
"avg_wave_orientation")
5591 else if (code ==
"beach_protection")
5593 else if (code ==
"basement_elevation")
5595 else if (code ==
"coastline")
5597 else if (code ==
"coast_normal")
5599 else if (code ==
"active_zone")
5601 else if (code ==
"cliff_collapse")
5603 else if (code ==
"total_cliff_collapse")
5605 else if (code ==
"cliff_collapse_deposition")
5607 else if (code ==
"total_cliff_collapse_deposition")
5609 else if (code ==
"polygon")
5611 else if (code ==
"potential_platform_erosion_mask")
5613 else if (code ==
"sea_mask")
5615 else if (code ==
"beach_mask")
5617 else if (code ==
"shadow_zone_codes")
5619 else if (code ==
"deep_water_wave_angle")
5621 else if (code ==
"deep_water_wave_height")
5623 else if (code ==
"deep_water_wave_period")
5625 else if (code ==
"polygon_uncons_sediment_up_or_down_drift")
5627 else if (code ==
"polygon_uncons_sediment_gain_or_loss")
5650 if (! vectorFiles.empty())
5675 for (
string const &vectorCode : vectorFiles)
5677 string code = vectorCode;
5678 std::transform(code.begin(), code.end(), code.begin(), ::tolower);
5680 if (code ==
"coast")
5682 else if (code ==
"cliff_edge")
5684 else if (code ==
"wave_angle")
5686 else if (code ==
"normals")
5688 else if (code ==
"invalid_normals")
5690 else if (code ==
"avg_wave_angle")
5692 else if (code ==
"wave_energy")
5694 else if (code ==
"mean_wave_energy")
5696 else if (code ==
"breaking_wave_height")
5698 else if (code ==
"coast_curvature")
5700 else if (code ==
"polygon_node")
5702 else if (code ==
"polygon")
5704 else if (code ==
"cliff_notch")
5706 else if (code ==
"shadow_boundary")
5708 else if (code ==
"downdrift_boundary")
5710 else if (code ==
"deep_water_wave_angle")
5712 else if (code ==
"wave_setup")
5714 else if (code ==
"storm_surge")
5716 else if (code ==
"run_up")
5718 else if (code ==
"flood_line")
5729 if (! timeseriesFiles.empty())
5731 for (
string const ×eriesCode : timeseriesFiles)
5733 string code = timeseriesCode;
5734 std::transform(code.begin(), code.end(), code.begin(), ::tolower);
5736 if (code ==
"sea_area")
5738 if (code ==
"water_level")
5740 if (code ==
"platform_erosion")
5742 if (code ==
"cliff_collapse_erosion")
5744 if (code ==
"cliff_collapse_deposition")
5746 if (code ==
"cliff_collapse_net")
5748 if (code ==
"beach_erosion")
5750 if (code ==
"beach_deposition")
5752 if (code ==
"beach_change_net")
5754 if (code ==
"suspended")
5756 if (code ==
"wave_setup")
5758 if (code ==
"wave_runup")
5776 if (strRH.find(
'n') != string::npos)
5781 if (strRH.find(
's') != string::npos)
5786 if (strRH.find(
'w') != string::npos)
5791 if (strRH.find(
'e') != string::npos)
5864 if (! strSuspendedSed.empty())
5875 if (! strInterventionClass.empty())
5881 if (! strInterventionHeight.empty())
5898 if (! strInterventionHeight.empty())
6062 if (! floodFiles.empty())
6064 for (
string const &floodCode : floodFiles)
6066 string code = floodCode;
6067 std::transform(code.begin(), code.end(), code.begin(), ::tolower);
6069 if (code ==
"sea_area")
6114 if (strRH.find(
'p') != string::npos)
6117 else if (strRH.find(
'c') != string::npos)
6120 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
int GetCliffEdgePolynomialOrder() 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
int GetCliffEdgeSmoothingWindow() 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
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)
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?
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.
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.
bool m_bHaveConsolidatedSediment
Does this simulation consider consolidated sediment, or is it an unconsolidated sediment only simulat...
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 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_bStillWaterLevelTSSave
Save the still water level time series file?
bool m_bRunUpSave
Are we saving runup? TODO 007.
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
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 ...
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_bCliffSave
Save cliff region raster grids?
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_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?
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.
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.
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_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?
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_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.
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.
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
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.
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
string m_strTideDataFile
Name of tide data file.
vector< string > m_VstrGDALIUFDriverDesc
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_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 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?
int m_nCoastCurvatureMovingWindowSize
WHAT IS THOS FOR?
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>
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.
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_bSlopeSave
Save slope raster grids?
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_bCSVPerTimestepResults
Output per-timestep results in CSV format instead of fixed-width?
double m_dCliffSlopeLimit
Slope limit for cliff toe detection.
vector< double > m_VdThisIterDeepWaterWaveStationAngle
This-iteration wave orientation at deep water wave station.
bool m_bOutputProfileData
Output profile data?
vector< string > m_VstrGDALIUCDriverDesc
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.
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?
bool m_bLocalSlopeSave
Save local slope raster GIS files?
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 RASTER_SLOPE_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
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 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 RASTER_CLIFF_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
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
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.