diff --git a/build/source/actors/HRUActor.h b/build/source/actors/HRUActor.h index 46cd18fd9d3d8c490ae48313a711677f34e01ffc..30474ad3935b1a8eec9f3423ab45c663edba796d 100644 --- a/build/source/actors/HRUActor.h +++ b/build/source/actors/HRUActor.h @@ -104,8 +104,8 @@ behavior hru_actor(stateful_actor<hru_state>* self, int refGRU, int indxGRU, int err = 0; while( err == 0 ) { - err = Run_HRU(self); + err = Run_HRU(self); if (err != 0) { // RUN FAILURE!!! Notify Parent self->send(self->state.parent, run_failure_v, self->state.indxGRU, err); @@ -115,8 +115,8 @@ behavior hru_actor(stateful_actor<hru_state>* self, int refGRU, int indxGRU, // Check if HRU is done computing if (self->state.timestep >= self->state.num_steps) { - // write out data - // aout(self) << "Sending Final Write" << std::endl; + if (debug) + aout(self) << "Sending Final Write, outputStep = " << self->state.outputStep << std::endl; self->send(self->state.file_access_actor, write_output_v, self->state.indxGRU, self->state.indxHRU, self->state.outputStep, self); @@ -125,9 +125,10 @@ behavior hru_actor(stateful_actor<hru_state>* self, int refGRU, int indxGRU, return; } - + // update Timing Variables self->state.timestep += 1; - self->state.outputStep += 1; // value to monitor how full the output structure is + self->state.outputStep += 1; + // check if we need more forcing information if (self->state.forcingStep > self->state.stepsInCurrentFFile) { // aout(self) << "Asking for more forcing data" << std::endl; @@ -136,7 +137,9 @@ behavior hru_actor(stateful_actor<hru_state>* self, int refGRU, int indxGRU, } // check if we need to write our output if (self->state.outputStep >= self->state.outputStrucSize) { - // aout(self) << "Sending Write" << std::endl; + if(debug) + aout(self) << "Sending Write, outputStep = " << self->state.outputStep << std::endl; + self->send(self->state.file_access_actor, write_output_v, self->state.indxGRU, self->state.indxHRU, self->state.outputStep, self); self->state.outputStep = 1; diff --git a/utils/netcdf/compareOutput.py b/utils/netcdf/compareOutput.py index 69fba28df215b13c868d63cffc1cec5c075c15f2..6846820346fbb4973e0df80917c7acb470c40423 100644 --- a/utils/netcdf/compareOutput.py +++ b/utils/netcdf/compareOutput.py @@ -27,10 +27,9 @@ varList = [time, scalarSWE, scalarCanopyWat, scalarAquiferStorage, scalarTotalSo scalarSurfaceRunoff, scalarSoilBaseflow, scalarSoilDrainage, scalarAquiferBaseflow, \ scalarTotalET, scalarTotalRunoff, scalarNetRadiation] -# varList = [time, scalarSWE] filename = "out.txt" -originalPath = Path('/home/k13nk/SummaProject/output/originalBench/SummaOriginal_G000001-000001_timestep.nc') -actorsPath = Path('/home/k13nk/SummaProject/output/testOutput/SummaActorsTestGRU1-1_timestep.nc') +originalPath = Path('/u1/kck540/output/SummaOriginal/Apr-1-2022/SummaOriginal_G000001-000001_timestep.nc') +actorsPath = Path('/u1/kck540/output/SummaActors/Apr-1-2022/SummaActorsGRU1-1_timestep.nc') originalDataset = xr.open_dataset(originalPath) actorsDataset = xr.open_dataset(actorsPath) @@ -55,7 +54,8 @@ for i in range(0, numHRU): dataOrig.append(data) for data in allHRUsActors[i][var].values: dataAct.append(data) - + print("Original", len(dataOrig)) + print("Actors", len(dataAct)) marginOfError = 0 if var == time: for a in range(0, len(dataAct)):