Skip to content

Commit 684f4d4

Browse files
Updates from local regarding shell and subprocess
1 parent f10faef commit 684f4d4

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ def run_medslik_sim(self, simdir, simname, separate_slicks=False):
367367
# Compile and start running (replacing `cd` with `cwd`)
368368
compile_script = "MODEL_SRC/compile.sh"
369369
run_script = "RUN.sh"
370-
subprocess.run(["sh", compile_script], check=True, cwd=os.path.join(model_dir, "RUN")) # nosec
371-
subprocess.run(["./" + run_script], check=True, cwd=os.path.join(model_dir, "RUN")) # nosec
370+
subprocess.run(["sh", compile_script], check=True, cwd=os.path.join(model_dir, "RUN"))
371+
subprocess.run(["./" + run_script], check=True, cwd=os.path.join(model_dir, "RUN"))
372372

373373
else:
374374
# Handle separate slicks
@@ -391,8 +391,8 @@ def run_medslik_sim(self, simdir, simname, separate_slicks=False):
391391
# Compile and start running
392392
compile_script = "MODEL_SRC/compile.sh"
393393
run_script = "RUN.sh"
394-
subprocess.run(["sh", compile_script], check=True, cwd=os.path.join(model_dir, "RUN")) # nosec
395-
subprocess.run(["./" + run_script], check=True, cwd=os.path.join(model_dir, "RUN")) # nosec
394+
subprocess.run(["sh", compile_script], check=True, cwd=os.path.join(model_dir, "RUN"))
395+
subprocess.run(["./" + run_script], check=True, cwd=os.path.join(model_dir, "RUN"))
396396

397397
# Copy output files (replacing `cp -r`)
398398
output_dest = os.path.join(simdir, simname, "out_files")

src/download/download_copernicus_parser.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ def download_copernicus(
289289
# saves the daily current or temperature netcdf in the case dir
290290
ds.to_netcdf(output_name)
291291

292-
# remove the temporary files
293-
temp_files = [os.path.join(output_path, "curr.nc"), os.path.join(output_path, "temp.nc")]
294-
for temp_file in temp_files:
295-
if os.path.exists(temp_file):
296-
os.remove(temp_file)
292+
# remove the temporary files
293+
temp_files = [os.path.join(output_path, "curr.nc"), os.path.join(output_path, "temp.nc")]
294+
for temp_file in temp_files:
295+
if os.path.exists(temp_file):
296+
os.remove(temp_file)

src/plot/plot_mdk3.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ def plot_pyngl(
330330
{plot_lat[0]} {plot_lat[1]}"
331331
],
332332
# shell=True,
333+
# shell=True,
333334
check=True,
334335
) # nosec
335336

0 commit comments

Comments
 (0)