Skip to content

Commit

Permalink
make gefs run on AWS
Browse files Browse the repository at this point in the history
  • Loading branch information
weihuang-jedi committed Aug 13, 2024
1 parent de55cc3 commit f5a03d4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
11 changes: 11 additions & 0 deletions parm/config/gefs/config.resources.AWSPW
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /usr/bin/env bash

# AWS-specific job resources

export is_exclusive="True"
export memory=None

# shellcheck disable=SC2312
for mem_var in $(env | grep '^memory_' | cut -d= -f1); do
unset "${mem_var}"
done
1 change: 1 addition & 0 deletions parm/config/gfs/config.resources.AWSPW
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# AWS-specific job resources

export is_exclusive="True"
export memory=None

# shellcheck disable=SC2312
for mem_var in $(env | grep '^memory_' | cut -d= -f1); do
Expand Down
8 changes: 4 additions & 4 deletions scripts/exgfs_wave_post_pnt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -393,14 +393,14 @@ source "${USHgfs}/preamble.sh"
then
export dtspec=3600.
# Construct the wave_outp_spec (spec) command to run on each buoy in buoy_lst.txt
sed "s/^\(.*\)$/${escaped_USHgfs}\/wave_outp_spec.sh \1 ${ymdh} spec ${escaped_SPECDATA} > ${escaped_SPECDATA}\/spec_\1.out 2>\&1/" buoy_lst.txt >> "tmpcmdfile.${FH3}"
sed "s?^\(.*\)$/${escaped_USHgfs}?wave_outp_spec.sh \1 ${ymdh} spec ${escaped_SPECDATA} > ${escaped_SPECDATA}\/spec_\1.out 2>\&1?" buoy_lst.txt >> "tmpcmdfile.${FH3}"
fi

if [ "$DOBLL_WAV" = 'YES' ]
then
export dtspec=3600.
# Construct the wave_outp_spec (bull) command to run on each buoy in buoy_lst.txt
sed "s/^\(.*\)$/${escaped_USHgfs}\/wave_outp_spec.sh \1 ${ymdh} bull ${escaped_SPECDATA} > ${escaped_SPECDATA}\/bull_\1.out 2>\&1/" buoy_lst.txt >> "tmpcmdfile.${FH3}"
sed "s?^\(.*\)$/${escaped_USHgfs}?wave_outp_spec.sh \1 ${ymdh} bull ${escaped_SPECDATA} > ${escaped_SPECDATA}\/bull_\1.out 2>\&1?" buoy_lst.txt >> "tmpcmdfile.${FH3}"
fi

split -n l/1/10 tmpcmdfile.$FH3 > cmdfile.${FH3}.01
Expand Down Expand Up @@ -517,13 +517,13 @@ source "${USHgfs}/preamble.sh"
if [ "$DOSPC_WAV" = 'YES' ]
then
# Construct wave_outp_cat (spec) call for each buoy in buoy_lst.txt
sed "s/^\(.*\)$/${escaped_USHgfs}\/wave_outp_cat.sh \1 ${FHMAX_WAV_PNT} spec > ${escaped_CATOUTDIR}\/spec_cat_\1.out 2>\&1/" buoy_lst.txt >> cmdfile.buoy
sed "s?^\(.*\)$/${escaped_USHgfs}?wave_outp_cat.sh \1 ${FHMAX_WAV_PNT} spec > ${escaped_CATOUTDIR}\/spec_cat_\1.out 2>\&1?" buoy_lst.txt >> cmdfile.buoy
fi

if [ "$DOBLL_WAV" = 'YES' ]
then
# Construct wave_outp_cat (bull) call for each buoy in buoy_lst.txt
sed "s/^\(.*\)$/${escaped_USHgfs}\/wave_outp_cat.sh \1 ${FHMAX_WAV_PNT} bull > ${escaped_CATOUTDIR}\/bull_cat_\1.out 2>\&1/" buoy_lst.txt >> cmdfile.buoy
sed "s?^\(.*\)$/${escaped_USHgfs}?wave_outp_cat.sh \1 ${FHMAX_WAV_PNT} bull > ${escaped_CATOUTDIR}\/bull_cat_\1.out 2>\&1?" buoy_lst.txt >> cmdfile.buoy
fi

if [ ${CFP_MP:-"NO"} = "YES" ]; then
Expand Down
3 changes: 2 additions & 1 deletion workflow/rocoto/rocoto.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ def _create_innermost_task(task_dict: Dict[str, Any]) -> List[str]:
strings.append(f'\t<walltime>{walltime}</walltime>\n')
strings.append(f'\t<nodes>{nodes}:ppn={ppn}:tpp={threads}</nodes>\n')
if memory is not None:
strings.append(f'\t<memory>{memory}</memory>\n')
if memory != 'None':
strings.append(f'\t<memory>{memory}</memory>\n')
if native is not None:
strings.append(f'\t<native>{native}</native>\n')
strings.append('\n')
Expand Down

0 comments on commit f5a03d4

Please sign in to comment.