diff --git a/mosartwmpy/_version.py b/mosartwmpy/_version.py index 788da1f..01ef120 100644 --- a/mosartwmpy/_version.py +++ b/mosartwmpy/_version.py @@ -1 +1 @@ -__version__ = "0.2.4" +__version__ = "0.2.6" diff --git a/mosartwmpy/plotting/plot.py b/mosartwmpy/plotting/plot.py index 9386ef3..b655ee3 100644 --- a/mosartwmpy/plotting/plot.py +++ b/mosartwmpy/plotting/plot.py @@ -170,14 +170,14 @@ def plot_reservoir( inflow_variable = next((o for o in model.config.get('simulation.output') if o.get('variable', '') == 'channel_inflow_upstream'), {}).get('name', None) outflow_variable = next((o for o in model.config.get('simulation.output') if - o.get('variable', '') == 'channel_outflow_downstream'), {}).get('name', None) + o.get('variable', '') == 'runoff_land'), {}).get('name', None) results = xr.open_mfdataset(f"{model.config.get('simulation.output_path')}/{model.name}/*.nc")[ [storage_variable, inflow_variable, outflow_variable]] df = pd.DataFrame(index=results.time) df['storage'] = results[storage_variable].isel(lat=ilat, lon=ilon).values.flatten() / 1e6 df['inflow'] = results[inflow_variable].isel(lat=ilat, lon=ilon).values.flatten() * 24 * 60 * 60 / 1e6 - df['outflow'] = results[outflow_variable].isel(lat=ilat, lon=ilon).values.flatten() * -1 * 24 * 60 * 60 / 1e6 + df['outflow'] = results[outflow_variable].isel(lat=ilat, lon=ilon).values.flatten() * 24 * 60 * 60 / 1e6 if start is not None: df = df[df.index >= start] if end is not None: diff --git a/mosartwmpy/reservoirs/grid.py b/mosartwmpy/reservoirs/grid.py index 791f7a8..2101c5f 100644 --- a/mosartwmpy/reservoirs/grid.py +++ b/mosartwmpy/reservoirs/grid.py @@ -48,7 +48,7 @@ def load_reservoirs(self, config: Benedict, parameters: Parameters) -> None: # drop nan grid ids self.reservoir_dependency_database = self.reservoir_dependency_database[self.reservoir_dependency_database.grid_cell_id.notna()] # set to integer - self.reservoir_dependency_database = self.reservoir_dependency_database.astype(int) + self.reservoir_dependency_database = self.reservoir_dependency_database.astype(np.int64) # create a numba typed dict with key = and value = self.grid_index_to_reservoirs_map = Dict.empty(