wolfhece 2.0.44__py3-none-any.whl → 2.0.46__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,11 +66,11 @@ class Comparison:
66
66
  def compare_now(self):
67
67
 
68
68
  # Check and run all the functions to use
69
- if(int(self.dictToCompar['hydro subbasin']['value']) == 1):
69
+ if(int(self.dictToCompar['hydro subbasin'][key_Param.VALUE]) == 1):
70
70
  self.hydro_subbasin()
71
- if(int(self.dictToCompar['hydro junction']['value']) == 1):
71
+ if(int(self.dictToCompar['hydro junction'][key_Param.VALUE]) == 1):
72
72
  self.hydro_junction()
73
- if(int(self.dictToCompar['hydro final']['value']) == 1):
73
+ if(int(self.dictToCompar['hydro final'][key_Param.VALUE]) == 1):
74
74
  self.hydro_final()
75
75
 
76
76
 
@@ -565,32 +565,37 @@ class Comparison:
565
565
  curCatch = self.myCatchments[idCatch]['Object']
566
566
  if(curCatch.myModel==cst.tom_UH):
567
567
 
568
- tmp = curCatch.retentionBasinDict["J18"].directFluxInRB
569
- tmpHydro = np.zeros(len(tmp))
568
+ # tmp = curCatch.retentionBasinDict["J18"].directFluxInRB
569
+ # tmpHydro = np.zeros(len(tmp))
570
570
 
571
- index = math.floor(curCatch.retentionBasinDict["J18"].timeDelay/curCatch.retentionBasinDict["J18"].deltaT)
572
- if(index==0):
573
- tmpHydro = tmp
574
- elif(index<len(tmp)):
575
- tmpHydro[:-index] = tmp[index:]
576
- else:
577
- print("ERROR: the simulation time is not long enough for this subbasin to be taken into account")
578
- sys.exit()
571
+ # index = math.floor(curCatch.retentionBasinDict["J18"].timeDelay/curCatch.retentionBasinDict["J18"].deltaT)
572
+ # if(index==0):
573
+ # tmpHydro = tmp
574
+ # elif(index<len(tmp)):
575
+ # tmpHydro[:-index] = tmp[index:]
576
+ # else:
577
+ # print("ERROR: the simulation time is not long enough for this subbasin to be taken into account")
578
+ # sys.exit()
579
+
580
+ cur_module:RetentionBasin = curCatch.retentionBasinDict["J18"]
581
+ tmpHydro = cur_module.get_direct_insideRB_inlets(unit='m3/s')
579
582
 
580
583
  y1.append(tmpHydro[:])
581
584
  elif(curCatch.myModel==cst.tom_2layers_linIF or curCatch.myModel==cst.tom_2layers_UH):
582
585
 
583
- tmp = curCatch.retentionBasinDict["J18"].directFluxInRB
584
- tmpHydro = np.zeros(len(tmp))
586
+ # tmp = curCatch.retentionBasinDict["J18"].directFluxInRB
587
+ # tmpHydro = np.zeros(len(tmp))
585
588
 
586
- index = math.floor(curCatch.retentionBasinDict["J18"].timeDelay/curCatch.retentionBasinDict["J18"].deltaT)
587
- if(index==0):
588
- tmpHydro = tmp
589
- elif(index<len(tmp)):
590
- tmpHydro[:-index] = tmp[index:]
591
- else:
592
- print("ERROR: the simulation time is not long enough for this subbasin to be taken into account")
593
- sys.exit()
589
+ # index = math.floor(curCatch.retentionBasinDict["J18"].timeDelay/curCatch.retentionBasinDict["J18"].deltaT)
590
+ # if(index==0):
591
+ # tmpHydro = tmp
592
+ # elif(index<len(tmp)):
593
+ # tmpHydro[:-index] = tmp[index:]
594
+ # else:
595
+ # print("ERROR: the simulation time is not long enough for this subbasin to be taken into account")
596
+ # sys.exit()
597
+ cur_module:RetentionBasin = curCatch.retentionBasinDict["J18"]
598
+ tmpHydro = cur_module.get_direct_insideRB_inlets(unit='m3/s')
594
599
 
595
600
  y1.append(tmpHydro[:])
596
601
  yLabels.append(curCatch.name)
@@ -793,6 +798,8 @@ class Comparison:
793
798
  surfaceMeasure=Measures.surfaceDrainedHydro
794
799
  elif(mySurf!=0.0):
795
800
  surfaceMeasure = mySurf
801
+ else:
802
+ surfaceMeasure = -1.0
796
803
  else:
797
804
  myMeasure = []
798
805
  Measures = None
@@ -948,8 +955,10 @@ class Comparison:
948
955
  beginDateRB = []
949
956
  endDateRB = []
950
957
  for ii in range(nbCatchment):
951
- beginDateRB.append(beginDate[ii] - timeDelay[ii]) # A ameliorer!!!
952
- endDateRB.append(endDate[ii] - timeDelay[ii])
958
+ # beginDateRB.append(beginDate[ii] - timeDelay[ii]) # A ameliorer!!!
959
+ # endDateRB.append(endDate[ii] - timeDelay[ii])
960
+ beginDateRB.append(beginDate[ii]) # A ameliorer!!!
961
+ endDateRB.append(endDate[ii])
953
962
 
954
963
 
955
964
  if("Station Name" in plotDict[RBNames[id]]):