Skip to content

Commit

Permalink
Add column for input file source 'rundir'
Browse files Browse the repository at this point in the history
  • Loading branch information
HansKimDWR committed Jul 23, 2024
1 parent 7ecccda commit 7ed3820
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions schimpy/archive_ts.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +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.index.name="datetime"
dfs.append(df)

Expand All @@ -162,6 +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
varlabel = "flow"
scenario_fname = f"{varlabel}_{scenario_label}.csv"
outfpath = os.path.join(ardir,scenario_fname)
Expand Down

0 comments on commit 7ed3820

Please sign in to comment.