Skip to content

Commit

Permalink
Fix RMWP setup issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SorooshMani-NOAA committed May 2, 2024
1 parent 5e53977 commit 1397b37
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
25 changes: 22 additions & 3 deletions singularity/info/files/hurricane_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
from shapely.geometry import box, base
from stormevents import StormEvent
from stormevents.nhc import VortexTrack
from stormevents.nhc.track import (
combine_tracks,
correct_ofcl_based_on_carq_n_hollandb,
separate_tracks,
)


logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -194,18 +199,32 @@ def main(args):

else: # read from preprocessed file
advisory = 'OFCL'

# If a file exists, use the local file
track_raw = pd.read_csv(local_track_file, header=None, dtype=str)
assert len(track_raw[4].unique()) == 1
track_raw[4] = advisory

with tempfile.NamedTemporaryFile() as tmp:
# TODO: Spaces get messed up!
track_raw.to_csv(tmp.name, header=False, index=False)
track = VortexTrack(

unfixed_track = VortexTrack(
tmp.name, file_deck='a', advisories=[advisory]
)
carq_track = event.track(file_deck='a', advisories=['CARQ'])
unfix_dict = {
**separate_tracks(unfixed_track.data),
**separate_tracks(carq_track.data),
}

fix_dict = correct_ofcl_based_on_carq_n_hollandb(unfix_dict)
fix_track = combine_tracks(fix_dict)

track = VortexTrack(
fix_track[fix_track.advisory == advisory],
file_deck='a',
advisories=[advisory]
)


forecast_start = None # TODO?
Expand Down
1 change: 0 additions & 1 deletion singularity/scripts/workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ singularity run $SINGULARITY_BINDFLAGS $L_IMG_DIR/info.sif \
--preprocessed-tracks-dir "$L_TRACK_DIR" \
$storm $year

exit 0

MESH_KWDS=""
if [ $subset_mesh == 1 ]; then
Expand Down

0 comments on commit 1397b37

Please sign in to comment.