interpolation dynamic spi

This commit is contained in:
自由的飞翔 2018-12-29 17:48:37 +08:00
parent 9acf345f14
commit db59924956
1 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ def calc_spi_by_exe(path, scale, type='spi', forecast_data=None):
spi_path = DATA_BASE_PATH + 'spei.exe' spi_path = DATA_BASE_PATH + 'spei.exe'
else: else:
spi_path = DATA_BASE_PATH + 'exc/spei' spi_path = DATA_BASE_PATH + 'exc/spei'
input_path = os.path.join(DATA_BASE_PATH, "exc", "input.csv") input_path = os.path.join(DATA_BASE_PATH, "temp", "input.csv")
print(input_path[1:]) print(input_path[1:])
prepare_data_file(path, input_path, type, forecast_data) prepare_data_file(path, input_path, type, forecast_data)
@ -113,7 +113,7 @@ def calc_spi_by_exe(path, scale, type='spi', forecast_data=None):
args = [spi_path, str(scale), input_path[1:], out_path] args = [spi_path, str(scale), input_path[1:], out_path]
args = spi_path + ' 1 ' + input_path + ' ' + out_path args = spi_path + ' 1 ' + input_path + ' ' + out_path
call_exe(args) call_exe(args)
return read_from_out_path(type, os.path.join(DATA_BASE_PATH, "res", out_path)) return read_from_out_path(type, os.path.join(DATA_BASE_PATH, "temp", out_path))
def call_exe(args): def call_exe(args):