Skip to content

Commit

Permalink
Fix processing rmwp track files
Browse files Browse the repository at this point in the history
  • Loading branch information
SorooshMani-NOAA committed Apr 29, 2024
1 parent fd4d80b commit 9239a74
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions singularity/info/files/hurricane_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def get_perturb_timestamp_in_track(
times_start_landfall.datetime - picked_track.datetime >= dt
].iloc[-1]

return perturb_start
return perturb_start[time_col]


def main(args):
Expand Down Expand Up @@ -198,10 +198,11 @@ def main(args):
# If a file exists, use the local file
track_raw = pd.read_csv(local_track_file, header=None)
assert len(track_raw[4].unique()) == 1
track_raw[4] = 'OFCL'
track_raw[4] = advisory

with tempfile.NamedTemporaryFile() as tmp:
track_raw.to_csv(tmp.name, index=None)
# TODO: Spaces get messed up!
track_raw.to_csv(tmp.name, header=False, index=False)
track = VortexTrack(
tmp.name, file_deck='a', advisories=[advisory]
)
Expand Down

0 comments on commit 9239a74

Please sign in to comment.