GeezerVison is showing github.com — fix statvar name typo · PRMS-Python/PRMS-Python@ccb57a4
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: prms_python/optimizer.py +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -109,7 +109,7 @@ def srad(self, reference_srad_path, station_nhru, n_sims=10, method='',\ |
109 | 109 | if station_nhru == 'basin': |
110 | 110 | self.srad_hru = 'basin_swrad_1' |
111 | 111 | else: # get variable at a specific hru |
112 | | - self.srad_hru = 'swrad_{}'.format(station_hru) |
| 112 | + self.srad_hru = 'swrad_{}'.format(station_nhru) |
113 | 113 |
|
114 | 114 | srad_start_time = dt.datetime.now() |
115 | 115 | srad_start_time = srad_start_time.replace(second=0, microsecond=0) |
@@ -298,11 +298,11 @@ def plot_optimization(self, stage, freq='daily', method='time_series',\ |
298 | 298 | if (stage=='swrad'): |
299 | 299 | if not self.srad_outputs: |
300 | 300 | raise ValueError('You have not run any srad optimizations') |
301 | | - var_name = self.srad_hru |
| 301 | + var_name = self.srad_hru # name in statvar file |
302 | 302 | #indices that measured and simulated share (intersection) |
303 | 303 | X = self.measured_srad |
304 | 304 | idx = X.index.intersection(self.srad_outputs[0]['statvar']\ |
305 | | - ['{}_{}'.format(stage, self.srad_hru)].index) |
| 305 | + ['{}'.format(var_name)].index) |
306 | 306 | X = X[idx] |
307 | 307 | orig = load_statvar(OPJ(self.input_dir, 'statvar.dat'))['{}'\ |
308 | 308 | .format(var_name)][idx] |
|