Skip to content

Commit b393f11

Browse files
authored
Merge pull request #40 from CIAT-DAPA/develop
test 2 for cpt_merge
2 parents 79cded3 + 60e75d0 commit b393f11

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/aclimate_cpt/prediction_class.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -1136,21 +1136,22 @@ def cpt_merge_x_files(self, file_paths):
11361136
os.system(tmp_file)
11371137

11381138
elif platform.system() == "Linux":
1139-
os.system("chmod +x"+tmp_file)
1139+
os.system("chmod +x "+ tmp_file)
11401140
os.system(tmp_file)
11411141

11421142
# Ejecución de CPT
11431143

11441144

11451145
# verificacion de que se creó el archivo tempora;l
1146-
if not os.path.exists(tmp_file):
1147-
status = "Failed: Error en la creación del archivo temporal"
1146+
if not os.path.exists(merged_out_path):
1147+
status = "Failed: Error en la creación del archivo merged"
11481148
else:
11491149
# copia del archivo a merged out path
11501150
#os.rename(tmp_file, merged_out_path)
11511151
os.remove(file_path_1)
11521152
os.remove(file_path_2)
1153-
#os.remove(tmp_file)
1153+
os.remove(tmp_file)
1154+
os.environ["CPT_BIN_DIR"] = "/forecast/models/CPT/15.5.10/bin/"
11541155
status = "Success"
11551156
except subprocess.CalledProcessError:
11561157
status = "Failed: Error al ejecutar CPT_batch"

0 commit comments

Comments
 (0)