Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Baseflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void CmvBaseflow::GetRatesOfChange( const double *storage,
const time_struct &tt,
double *rates) const
{
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
(pHRU->GetHRUType()==HRU_ROCK)){return;}//Lake/Water/Rock

const soil_struct *pSoil=NULL;
Expand Down
4 changes: 2 additions & 2 deletions src/CapillaryRise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void CmvCapillaryRise::GetRatesOfChange( const double *storage,
const time_struct &tt,
double *rates) const
{
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
(pHRU->GetHRUType()==HRU_ROCK)){return;}//Lake/Water/Rock

const soil_struct *pSoil=NULL;
Expand Down Expand Up @@ -163,7 +163,7 @@ void CmvCapillaryRise::ApplyConstraints( const double *storage,
const time_struct &tt,
double *rates) const
{
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
(pHRU->GetHRUType()==HRU_ROCK)){return;}//Lake/Water/Rock

double min_stor=g_min_storage;
Expand Down
4 changes: 2 additions & 2 deletions src/HydroUnits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,11 +491,11 @@ void CHydroUnit::AdjustHRUForcing(const forcing_type Ftyp,force_struct &F, const
else if (adj==ADJ_ADDITIVE ){F.temp_ave+=epsilon; }
else if (adj==ADJ_REPLACE ){F.temp_ave =epsilon;}
}
else if(Ftyp==F_TEMP_DAILY_MIN)
else if(Ftyp==F_TEMP_DAILY_MIN)
{
//handled in AdjustDailyHRUForcings
}
else if(Ftyp==F_TEMP_DAILY_MAX)
else if(Ftyp==F_TEMP_DAILY_MAX)
{
//handled in AdjustDailyHRUForcings
}
Expand Down
4 changes: 2 additions & 2 deletions src/Interflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void CmvInterflow::GetRatesOfChange(const double *state_v
const time_struct &tt,
double *rates) const
{
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
(pHRU->GetHRUType()==HRU_ROCK)){return;}//Lake/Water/Rock

double stor = state_vars[iFrom[0]];
Expand Down Expand Up @@ -139,7 +139,7 @@ void CmvInterflow::ApplyConstraints( const double *state_vars,
const time_struct &tt,
double *rates) const
{
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
(pHRU->GetHRUType()==HRU_ROCK)){return;}//Lake/Water/Rock

//cant remove more than is there
Expand Down
2 changes: 1 addition & 1 deletion src/ModelInitialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ void CModel::InitializeRoutingNetwork()
if (need_upstream){
long long SBID;
int nUp;

for (int p=0;p<_nSubBasins;p++)
{
SBID=_pSubBasins[p]->GetID();
Expand Down
6 changes: 6 additions & 0 deletions src/ParsePropertyFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,8 +845,11 @@ bool ParseClassPropertiesFile(CModel *&pModel,
{
p->Tokenize(s,Len);
done=false;
int j = 0;
while (!done)
{
j += 1;
ExitGracefullyIf(j>=MAX_SURVEY_PTS,"ParseClassPropertiesFile: Maximum number of channel points exceeded (max 500).",BAD_DATA); // check against MAX_SURVEY_PTS
if (IsComment(s[0], Len)){}//comment line
else if (Len==2) {x[countSP]=s_to_d(s[0]); y[countSP]=s_to_d(s[1]);countSP++;}
else {p->ImproperFormat(s); break;}
Expand All @@ -859,8 +862,11 @@ bool ParseClassPropertiesFile(CModel *&pModel,
{
p->Tokenize(s,Len);
done=false;
int j = 0;
while (!done)
{
j += 1;
ExitGracefullyIf(j>=MAX_SURVEY_PTS,"ParseClassPropertiesFile: Maximum number of roughness points exceeded (max 500).",BAD_DATA); // check against MAX_SURVEY_PTS
if (IsComment(s[0], Len)){}//comment line
else if (Len==2 ){xz[countRS]=s_to_d(s[0]);n [countRS]=s_to_d(s[1]);countRS++;}
else {p->ImproperFormat(s); break;}
Expand Down
4 changes: 2 additions & 2 deletions src/Percolation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void CmvPercolation::GetRatesOfChange( const double *state_v
const time_struct &tt,
double *rates) const
{
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
(pHRU->GetHRUType()==HRU_ROCK)){return;}//Lake/Water/Rock

double stor,max_stor;
Expand Down Expand Up @@ -342,7 +342,7 @@ void CmvPercolation::ApplyConstraints(const double *state_vars,
const time_struct &tt,
double *rates) const
{
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
(pHRU->GetHRUType()==HRU_ROCK)){return;}//Lake/Water/Rock

double min_stor=g_min_storage;
Expand Down
2 changes: 1 addition & 1 deletion src/RavenInclude.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ const int MAX_SOIL_PROFILES =200; ///< Max number of soil profiles
const int MAX_VEG_CLASSES =200; ///< Max number of vegetation classes
const int MAX_LULT_CLASSES =200; ///< Max number of lult classes
const int MAX_TERRAIN_CLASSES =50; ///< Max number of terrain classes
const int MAX_SURVEY_PTS =50; ///< Max number of survey points
const int MAX_SURVEY_PTS =500; ///< Max number of survey points
const int MAX_CONSTITUENTS =10; ///< Max number of transported constituents
const int MAX_RIVER_SEGS =50; ///< Max number of river segments
const int MAX_FILENAME_LENGTH =256; ///< Max filename length
Expand Down
4 changes: 2 additions & 2 deletions src/Recharge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void CmvRecharge::GetRatesOfChange( const double *storage,
const time_struct &tt,
double *rates) const
{
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
(pHRU->GetHRUType()==HRU_ROCK) || (pHRU->GetHRUType()==HRU_MASKED_GLACIER)){return;}//Lake/Water/Rock

if( _type==RECHARGE_FROMFILE){
Expand Down Expand Up @@ -195,7 +195,7 @@ void CmvRecharge::ApplyConstraints( const double *state_vars,
const time_struct &tt,
double *rates) const
{
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
if ((pHRU->GetHRUType()==HRU_LAKE) || (pHRU->GetHRUType()==HRU_WATER) ||
(pHRU->GetHRUType()==HRU_ROCK) || (pHRU->GetHRUType()==HRU_MASKED_GLACIER)){return;}//Lake/Water/Rock

if (_type==RECHARGE_FROMFILE)
Expand Down
2 changes: 1 addition & 1 deletion src/UpdateForcings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ void CModel::UpdateHRUForcingFunctions(const optStruct &Options,
ApplyForcingPerturbation(F_SNOWFALL, F, k, Options, tt);

if (_pHydroUnits[k]->GetHRUType()==HRU_MASKED_GLACIER){ // disable all precip from masked portion
F.precip=F.precip_daily_ave=F.precip_5day=0;
F.precip=F.precip_daily_ave=F.precip_5day=0;
}

//-------------------------------------------------------------------
Expand Down
Loading