Created
June 15, 2022 14:01
-
-
Save sunt05/3ebdb0b810fe845723a04b52fec98640 to your computer and use it in GitHub Desktop.
workaround for resolving memory limit issue when running supy for a large number of grids
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import supy as sp | |
import pandas as pd | |
# using a short period of forcing for example | |
df_forcing_test = df_forcing.loc["2021-7-1"] | |
# create an empty list to store dataframes | |
list_res = [] | |
for grid in df_state_init.index: | |
df_out, df_state_fina = sp.run_supy(df_forcing_test, df_state_init.loc[[grid]]) | |
list_res.append(df_out) | |
# concatenate the results | |
df_res = pd.concat(list_res, axis=0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment