Skip to content

Commit 17bef00

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ce714bd commit 17bef00

11 files changed

+27
-27
lines changed

src/Assimilate.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ void CModel::PrepareAssimilation(const optStruct &Options,const time_struct &tt)
170170
_aDAoverride [p]=true;
171171
_aDAobsQ [p]=Qobs;
172172
_aDADrainSum [p]=0.0; //??? maybe doesnt matter
173-
if (pdown != DOESNT_EXIST) {
173+
if (pdown != DOESNT_EXIST) {
174174
_aDADrainSum [pdown]+=_pSubBasins[p]->GetDrainageArea(); //DOES THIS HANDLE NESTING RIGHT?
175175
}
176176
}
@@ -182,17 +182,17 @@ void CModel::PrepareAssimilation(const optStruct &Options,const time_struct &tt)
182182
_aDAlength [p]=0.0;
183183
_aDAoverride [p]=false;
184184
_aDAobsQ [p]=0.0;
185-
if (pdown != DOESNT_EXIST) {
185+
if (pdown != DOESNT_EXIST) {
186186
_aDADrainSum[pdown] += _aDADrainSum[p];
187187
}
188188
}
189189
ObsExists=true;
190190
break; //avoids duplicate observations
191191
}
192192
}
193-
}
193+
}
194194
else {
195-
if (pdown != DOESNT_EXIST) {
195+
if (pdown != DOESNT_EXIST) {
196196
_aDADrainSum[pdown] += _aDADrainSum[p];
197197
}
198198
}

src/DemandOptimization.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,7 @@ void CDemandOptimizer::SolveDemandProblem(CModel *pModel, const optStruct &Optio
16441644
retval = lp_lib::add_constraintex(pLinProg,i,row_val,col_ind,ROWTYPE_EQ,RHS);
16451645
ExitGracefullyIf(retval==0,"SolveDemandProblem::Error adding mass balance constraint",RUNTIME_ERR);
16461646
IncrementAndSetRowName(pLinProg,rowcount,"reach_MB_"+to_string(pSB->GetID()));
1647-
1647+
16481648
lpsbrow[p]=lp_lib::get_Nrows(pLinProg);
16491649
}
16501650
}

src/DemandOptimization.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ class CDemandOptimizer
302302
void OverrideSDCurve (const int p);
303303

304304
void AddGoalOrConstraint (const managementGoal *pGoal);
305-
305+
306306
void AddUserDecisionVar (const decision_var *pDV);
307307
void SetUserDecisionVarBounds(const string name, const double &min, const double &max);
308308
void AddUserConstant (const string name, const double &val);

src/EnKF.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,11 +458,11 @@ void CEnKFEnsemble::CloseTimeStepOps(CModel* pModel,optStruct& Options,const tim
458458
//cout<<"GRABBING OUTPUT ens: "<<e<<" nn="<<curr_nn<<" obs: "<<_output_matrix[e][j]<<" "<<obsval<<" duration "<<Options.duration<<endl;
459459
j++;
460460
break; //escape loop
461-
}
461+
}
462462
else {
463463
j++;
464464
}
465-
465+
466466
}
467467
}
468468
}

src/ModelParamCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void CModel::AddFromPotMeltParamList(string *aP,class_type *aPC,int &nP,const po
112112
aP[nP]="MELT_FACTOR"; aPC[nP]=CLASS_LANDUSE; nP++;
113113
aP[nP]="DD_MELT_TEMP";aPC[nP]=CLASS_LANDUSE; nP++;
114114
aP[nP]="REFREEZE_FACTOR";aPC[nP]=CLASS_LANDUSE; nP++;
115-
}
115+
}
116116
else if(pot_melt==POTMELT_RESTRICTED)
117117
{
118118
aP[nP]="MELT_FACTOR"; aPC[nP]=CLASS_LANDUSE; nP++;

src/ParseFEWSRunInfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ bool ParseNetCDFRunInfoFile(CModel *&pModel, optStruct &Options, bool runname_ov
280280
delete[] boolean;
281281
}
282282

283-
// Other attributes with info embedded in attribute name
283+
// Other attributes with info embedded in attribute name
284284
int nAttributes;
285285
char att_name[NC_MAX_NAME];
286286
double att_value;
@@ -292,7 +292,7 @@ bool ParseNetCDFRunInfoFile(CModel *&pModel, optStruct &Options, bool runname_ov
292292
string att_name_s=to_string(att_name);
293293

294294
// NamedConstant(s) ----------------------------------------------------
295-
if (att_name_s.substr(0, 14) == "NamedConstant_")
295+
if (att_name_s.substr(0, 14) == "NamedConstant_")
296296
{
297297
string name=att_name_s.substr(14,att_name_s.length());
298298

@@ -534,7 +534,7 @@ bool ParseNetCDFStateFile(CModel *&pModel,const optStruct &Options)
534534
// .The state variable corresponding to the model start time will be used for initialization of flow/stage; all other values in the time vector are ignored
535535
// The naming convention of this attribute is one of: {QOUT, STAGE, }
536536
//
537-
bool ParseNetCDFFlowStateFile(CModel*& pModel,const optStruct& Options)
537+
bool ParseNetCDFFlowStateFile(CModel*& pModel,const optStruct& Options)
538538
{
539539
if(Options.flowinfo_filename=="") { return true; }
540540

src/ParseInput.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ bool ParseMainInputFile (CModel *&pModel,
326326
Options.aNetCDFattribs =NULL;
327327
Options.assimilate_flow =false;
328328
Options.assimilate_stage =false;
329-
Options.assimilation_start =-1.0; //start before simulation
329+
Options.assimilation_start =-1.0; //start before simulation
330330
Options.time_zone =0;
331331
Options.rvl_read_frequency =0.0; //do not read at all
332332
Options.custom_interval =1.0; //daily

src/ParseManagementFile.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ bool ParseManagementFile(CModel *&pModel,const optStruct &Options)
651651
*/
652652
if (Options.noisy) { cout << "Workflow Variable Definition Statement" << endl; }
653653

654-
workflowVar* pWV;
654+
workflowVar* pWV;
655655
if (pDO->GetWorkflowVarStruct(to_string(s[1])) != NULL){//already declared
656656
pWV=pDO->GetWorkflowVarStruct(to_string(s[1]));
657657
}
@@ -820,7 +820,7 @@ bool ParseManagementFile(CModel *&pModel,const optStruct &Options)
820820
}
821821
case(32): //----------------------------------------------
822822
{/*:LookupTableFromCSV [name] [filename.csv]
823-
format:
823+
format:
824824
HeaderX, HeaderY
825825
x1, y1
826826
x2, y2
@@ -840,15 +840,15 @@ bool ParseManagementFile(CModel *&pModel,const optStruct &Options)
840840
string name = s[1];
841841
string filename="";
842842
for (int i=2;i<Len;i++){filename+=to_string(s[i]); }
843-
843+
844844
ifstream LUCSV;
845845
LUCSV.open(filename.c_str());
846846
if (LUCSV.fail()){cout << "ERROR opening file: "<<filename<<endl; return false;}
847847

848848
CParser *ppCSV=new CParser(LUCSV,filename,line2);
849849

850850
ppCSV->Tokenize(s,Len); //headers
851-
851+
852852
N=0;
853853
do {
854854
eof=ppCSV->Tokenize(s,Len);
@@ -875,7 +875,7 @@ bool ParseManagementFile(CModel *&pModel,const optStruct &Options)
875875
delete ppCSV;
876876
break;
877877
}
878-
878+
879879
case(40): //----------------------------------------------
880880
{ /*:LoopThrough [SB_GROUP or DEMAND_GROUP] [group name] */
881881
if(Options.noisy) { cout <<"Start Loop"<<endl; }
@@ -1124,7 +1124,7 @@ bool ParseManagementFile(CModel *&pModel,const optStruct &Options)
11241124
ExitGracefully(":ResetDate must be between :WaterDemand and :EndWaterDemand commands.",BAD_DATA_WARN);
11251125
}
11261126
else {
1127-
1127+
11281128
pDO->SetCumulativeDate(s_to_i(s[1]), to_string(demand_ID));
11291129
}
11301130
break;
@@ -1358,7 +1358,7 @@ bool ParseManagementFile(CModel *&pModel,const optStruct &Options)
13581358
} //end while !end_of_file
13591359
RVM.close();
13601360

1361-
pDO->InitializeDemands (pModel,Options);
1361+
pDO->InitializeDemands (pModel,Options);
13621362
pDO->InitializePostRVMRead(pModel,Options);
13631363

13641364
if (loopCount != 0) {

src/RavenAlgParams.dat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@ ROUTE_NONE RoutingMethod
195195
ROUTE_DIFFUSIVE_WAVE RoutingMethod
196196
ROUTE_DUMP CatchmentRoute
197197

198-
POTMELT_DEGREE_DAY PotentialMelt MELT_FACTOR LULT
198+
POTMELT_DEGREE_DAY PotentialMelt MELT_FACTOR LULT
199199
POTMELT_DEGREE_DAY PotentialMelt DD_MELT_TEMP LULT
200-
POTMELT_DD_FREEZE PotentialMelt MELT_FACTOR LULT
200+
POTMELT_DD_FREEZE PotentialMelt MELT_FACTOR LULT
201201
POTMELT_DD_FREEZE PotentialMelt DD_MELT_TEMP LULT
202-
POTMELT_DD_FREEZE PotentialMelt REFREEZE_FACTOR LULT
202+
POTMELT_DD_FREEZE PotentialMelt REFREEZE_FACTOR LULT
203203
POTMELT_RESTRICTED PotentialMelt MELT_FACTOR LULT
204204
POTMELT_RESTRICTED PotentialMelt DD_MELT_TEMP LULT
205205
POTMELT_HBV PotentialMelt MELT_FACTOR LULT
@@ -226,4 +226,4 @@ POTMELT_HMETS PotentialMelt MIN_MELT_FACTOR LULT
226226
POTMELT_HMETS PotentialMelt MAX_MELT_FACTOR LULT
227227
POTMELT_HMETS PotentialMelt DD_MELT_TEMP LULT
228228
POTMELT_HMETS PotentialMelt DD_AGGRADATION LULT
229-
POTMELT_RILEY PotentialMelt MELT_FACTOR LULT
229+
POTMELT_RILEY PotentialMelt MELT_FACTOR LULT

src/SoilClass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ void CSoilClass::InitializeSoilProperties(soil_struct &S, bool is_template,int n
390390
S.evap_res_fc =S.shuttleworth_b =DefaultParameterValue(is_template,true);
391391
S.PET_correction =1.0;
392392

393-
S.albedo_wet =0.16;
393+
S.albedo_wet =0.16;
394394
S.albedo_dry =0.24;
395395

396396
//Conceptual parameters

0 commit comments

Comments
 (0)