Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 27 additions & 21 deletions stormworkflow/scripts/workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,34 +82,40 @@ hurricane_data \


MESH_KWDS=""
if [ $subset_mesh == 1 ]; then
if [ $subset_mesh == 0 ]; then
echo "Copy high-res mesh..."
cp "$L_MESH_HI" $run_dir/mesh/mesh_w_bdry.grd

elif [ $subset_mesh == 1 ]; then
echo "Subset mesh..."
MESH_KWDS+="subset_n_combine"
MESH_KWDS+=" $L_MESH_HI"
MESH_KWDS+=" $L_MESH_LO"
MESH_KWDS+=" ${run_dir}/windswath"
MESH_KWDS+=" --rasters $L_DEM_LO"
MESH_KWDS+=" --out ${run_dir}/mesh"

export MESH_KWDS
sbatch \
--output "${run_dir}/output/slurm-%j.mesh.out" \
--wait \
--export=ALL,MESH_KWDS,STORM=$storm,YEAR=$year \
$run_dir/slurm/mesh.sbatch
else
# TODO: Get param_* values from somewhere
MESH_KWDS+="hurricane_mesh"
MESH_KWDS+=" --hmax $param_mesh_hmax"
MESH_KWDS+=" --hmin-low $param_mesh_hmin_low"
MESH_KWDS+=" --rate-low $param_mesh_rate_low"
MESH_KWDS+=" --transition-elev $param_mesh_trans_elev"
MESH_KWDS+=" --hmin-high $param_mesh_hmin_high"
MESH_KWDS+=" --rate-high $param_mesh_rate_high"
MESH_KWDS+=" --shapes-dir $L_SHP_DIR"
MESH_KWDS+=" --windswath ${run_dir}/windswath"
MESH_KWDS+=" --lo-dem $L_DEM_LO"
MESH_KWDS+=" --hi-dem $L_DEM_HI"
echo "InputError! subset_mesh should be 0 or 1"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally it should error out at this point, but that's not a huge issue

# # TODO: Get param_* values from somewhere
# MESH_KWDS+="hurricane_mesh"
# MESH_KWDS+=" --hmax $param_mesh_hmax"
# MESH_KWDS+=" --hmin-low $param_mesh_hmin_low"
# MESH_KWDS+=" --rate-low $param_mesh_rate_low"
# MESH_KWDS+=" --transition-elev $param_mesh_trans_elev"
# MESH_KWDS+=" --hmin-high $param_mesh_hmin_high"
# MESH_KWDS+=" --rate-high $param_mesh_rate_high"
# MESH_KWDS+=" --shapes-dir $L_SHP_DIR"
# MESH_KWDS+=" --windswath ${run_dir}/windswath"
# MESH_KWDS+=" --lo-dem $L_DEM_LO"
# MESH_KWDS+=" --hi-dem $L_DEM_HI"
fi
MESH_KWDS+=" --out ${run_dir}/mesh"
export MESH_KWDS
sbatch \
--output "${run_dir}/output/slurm-%j.mesh.out" \
--wait \
--job-name=mesh_$tag \
--export=ALL,MESH_KWDS,STORM=$storm,YEAR=$year \
$run_dir/slurm/mesh.sbatch


echo "Download necessary data..."
Expand Down