From 932e0e3e15627b44829e99216d0874b29c11e067 Mon Sep 17 00:00:00 2001 From: Stefano Serafin <serafin@jet01.img.univie.ac.at> Date: Tue, 11 Feb 2025 14:33:32 +0100 Subject: [PATCH] minor edits --- replace_text.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/replace_text.py b/replace_text.py index 37504e7..2002089 100644 --- a/replace_text.py +++ b/replace_text.py @@ -10,8 +10,9 @@ import glob import os # Input and output text files -pathSource = "./config_files/" -pathDest = "./config_files_new/" +pathSource = "./runs/seed=181612_enssize=20_EAKF_6hrs/" +pathDest = "./runs/seed=181612_enssize=20_EAKF_6hrs/" +#pathDest = "./backup/config_files_new/" textFiles_Source = glob.glob(pathSource+"*.json") textFiles_Dest = [i.replace(pathSource,pathDest) for i in textFiles_Source] @@ -19,8 +20,8 @@ if not os.path.exists(pathDest): os.makedirs(pathDest) # searched text and replacement text -search_text = '"nens": 20' -replace_text = '"nens": 200' +search_text = '"nature_run_from_file": "./runs/seed=181612_enssize=20_EAKF_6hrs//exp_A.pickle",' +replace_text = '"nature_run_from_file": "./runs/seed=181612_enssize=20_EAKF_6hrs//exp_A1.pickle",' # Loop over each text file in our list from above for source,dest in zip(textFiles_Source,textFiles_Dest): @@ -43,4 +44,4 @@ for source,dest in zip(textFiles_Source,textFiles_Dest): # Writing the replaced data in our # text file - file.write(data) + file.write(data) \ No newline at end of file -- GitLab