From ac1cf263048916e44481ebbd72f14447975d0014 Mon Sep 17 00:00:00 2001 From: Hans Kim Date: Tue, 23 Jul 2024 15:40:32 -0700 Subject: [PATCH] Use absolute name of 'rundir' --- schimpy/archive_ts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schimpy/archive_ts.py b/schimpy/archive_ts.py index baacb11..b0d7a0e 100755 --- a/schimpy/archive_ts.py +++ b/schimpy/archive_ts.py @@ -143,7 +143,7 @@ def archive_staout(rundir,ardir,scenario_label,scenario_data, for item in scenario_data: df[item] = scenario_data[item] df["variable"] = varlabel - df["rundir"] = rundir + df["rundir"] = os.path.abspath(rundir).split("/")[-1] df.index.name="datetime" dfs.append(df) @@ -163,7 +163,7 @@ def archive_flux(rundir,ardir,scenario_label,stationfile,scenario_data,runstart) for item in scenario_data: df[item] = scenario_data[item] - df["rundir"] = rundir + df["rundir"] = os.path.abspath(rundir).split("/")[-1] varlabel = "flow" scenario_fname = f"{varlabel}_{scenario_label}.csv" outfpath = os.path.join(ardir,scenario_fname)