Skip to content

Commit

Permalink
Change wave_init from task to metatask
Browse files Browse the repository at this point in the history
Modify the corresponding scripts to run wave_init
  successfully

 On branch feature/gefs_v13_S2SW
	modified:   ../fix/.gitignore
	modified:   ../jobs/JGEFS_WAVE_INIT
	modified:   ../parm/gefs.parm
	modified:   ../parm/gefs_wave_init.parm
	modified:   bin/wcoss2/common.sh
	modified:   bin/wcoss2/wave_init.sh
	modified:   py/GEFS_XML_For_Tasks.py
	modified:   py/user_wcoss2.conf
	modified:   ../sorc/link_gefs.sh

Refs: NOAA-EMC#114
  • Loading branch information
XianwuXue-NOAA committed Mar 27, 2023
1 parent da8f851 commit 4cabec6
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 19 deletions.
1 change: 1 addition & 0 deletions fix/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ orog
aer
lut
ugwd
wave

fix_*
product
33 changes: 20 additions & 13 deletions jobs/JGEFS_WAVE_INIT
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,7 @@ export HOMEgefs=${HOMEgefs:-${PACKAGEROOT}/gefs.${gefs_ver}}
export EXECgefs=${EXECgefs:-$HOMEgefs/exec}
export PARMgefs=${PARMgefs:-$HOMEgefs/parm}
export FIXwave=${FIXwave:-$HOMEgefs/fix/fix_wave}

##############################################
# Define COM directories
##############################################
# Have to include $COMPONENT in COM paths for downstream scripts
ver=${ver:-$(echo ${gefs_ver}|cut -c1-5)}
export COMIN=${COMIN:-$(compath.py $envir/com/$NET/${ver})/${RUN}.${PDY}/$cyc/wave}
export COMOUT=${COMOUT:-$(compath.py -o $NET/${ver})/${RUN}.${PDY}/$cyc/wave}
if [[ $SENDCOM = YES ]]; then
mkdir -p $COMOUT/rundata
fi

export CDUMP="gefs"
#############################
# Source relevant config files
#############################
Expand All @@ -88,6 +77,24 @@ for config in $configs; do
fi
done

##############################################
# Define COM directories
##############################################
# Have to include $COMPONENT in COM paths for downstream scripts
ver=${ver:-$(echo ${gefs_ver}|cut -c1-5)}
export COMIN=${COMIN:-$(compath.py $envir/com/$NET/${ver})/${RUN}.${PDY}/$cyc}
export COMOUT=${COMOUT:-$(compath.py -o $NET/${ver})/${RUN}.${PDY}/$cyc}

if [[ ${NewCOM:-"YES"} == "YES" ]]; then
#export RUNMEM="gec00"
export mem=$(echo ${RUNMEM}|cut -c3-5)
export COMIN=${COMIN}/${mem}/wave
export COMOUT=${COMOUT}/${mem}/wave
else
export COMIN=${COMIN}/wave
export COMOUT=${COMOUT}/wave
fi

export errchk=${errchk:-err_chk}
if [[ $SENDCOM == "YES" ]]; then
export wavelog=${COMOUT}/wave.log
Expand All @@ -100,7 +107,7 @@ env | sort

#############################################################
# Execute the script
$HOMEwave/scripts/exwave_init.sh
$HOMEwave/scripts/exgfs_wave_init.sh
export err=$?
if [[ $err == 0 ]]; then
echo "$job completed normally!"
Expand Down
13 changes: 13 additions & 0 deletions parm/gefs.parm
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,19 @@ export USHgefs=${USHgefs:-${HOMEgefs}/ush}
#export FIXgefs=${FIXgefs:-${HOMEgefs}/fix/fix_gefs}
export PARMgefs=${PARMgefs:-${HOMEgefs}/parm}

export HOMEgfs=${HOMEgfs:-${HOMEgefs}}
export PARMgfs=${HOMEgfs}/parm
export EXPDIR=${PARMgfs}/config
#export FIXgfs=${HOMEgfs}/fix
#export USHgfs=${HOMEgfs}/ush
#export UTILgfs=${HOMEgfs}/util
#export EXECgfs=${HOMEgfs}/exec
#export SCRgfs=${HOMEgfs}/scripts

#export FIXcice=${HOMEgfs}/fix/cice
#export FIXmom=${HOMEgfs}/fix/mom6
#export FIXreg2grb2=${HOMEgfs}/fix/reg2grb2

####################################
# CONVENIENT utility scripts and other environment parameters
export NCP="/bin/cp -p"
Expand Down
2 changes: 2 additions & 0 deletions parm/gefs_wave_init.parm
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@

# Step label
export sigMODE=${sigMODE:-init}

export CDUMP="gefs"
2 changes: 2 additions & 0 deletions rocoto/bin/wcoss2/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ if [[ $RocotoGen == 0 ]]; then
# For prod data
if [[ $CASEHR == "C48" ]]; then
export COMPATH=${WORKDIR}/$envir/com/${NET}:/lfs/h2/emc/ens/noscrub/xianwu.xue/GEFS_v13/z_DATA/lfs_C96_C48_NOIAU_anal/h1/ops/prod/com/gfs
#export COMPATH=${WORKDIR}/$envir/com/${NET}:/lfs/h2/emc/ens/noscrub/xianwu.xue/GEFS_v13/z_DATA/lfs_C96_C48_NOIAU_anal_20230316/h1/ops/prod/com/gfs
elif [[ $CASEHR == "C384" ]]; then
export COMPATH=${WORKDIR}/$envir/com/${NET}:/lfs/h2/emc/ens/noscrub/xianwu.xue/GEFS_v13/z_DATA/lfs_C768_C384_NOIAU_anal/h1/ops/prod/com/gfs
#export COMPATH=${WORKDIR}/$envir/com/${NET}:/lfs/h2/emc/ens/noscrub/xianwu.xue/GEFS_v13/z_DATA/lfs_C768_C384_NOIAU_anal_20230223_updated_dev/h1/ops/prod/com/gfs
else
echo "Wrong CASEHR .."
exit -1
Expand Down
3 changes: 3 additions & 0 deletions rocoto/bin/wcoss2/wave_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ module load cray-pals/$cray_pals_ver

module load prod_util/$prod_util_ver
module load prod_envir/$prod_envir_ver

module load netcdf/$netcdf_ver
module load libjpeg/$libjpeg_ver
module load cfp/$cfp_ver

export USE_CFP=YES
Expand Down
1 change: 1 addition & 0 deletions rocoto/py/GEFS_XML_For_Tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1473,6 +1473,7 @@ def get_metatask_names(taskname=""):
metatask_names.append('prdgen_hr')
metatask_names.append('prdgen_lr')
# wave
metatask_names.append('wave_init')
metatask_names.append('wave_prep')
metatask_names.append('wave_post')
metatask_names.append('wave_gempak')
Expand Down
2 changes: 1 addition & 1 deletion rocoto/py/user_wcoss2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ wave_init_nodes = 1
wave_init_ppn = 6
wave_init_tpp = 1
wave_init_memory = 20GB
wave_init_join = &LOG_DIR;/@Y@m@d/gefs_wave_init_@H.@s
wave_init_join = &LOG_DIR;/@Y@m@d/gefs_#member#_wave_init_@H.@s
wave_init_queue = &CUE2RUN;
## wave_prep****************************************************
wave_prep_walltime = 00:10:00
Expand Down
10 changes: 5 additions & 5 deletions sorc/link_gefs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if [[ -d global-workflow.fd ]] ; then

cd ${pwd}/../fix

for gw_dir in am aer lut orog chem ugwd; do
for gw_dir in am aer lut orog chem ugwd wave; do
if [[ -d $gw_dir ]]; then
rm -rf $gw_dir
fi
Expand Down Expand Up @@ -164,17 +164,18 @@ if [[ -d global-workflow.fd ]] ; then
fi

# For wave
if [[ 1 == 0 ]]; then
echo $pwd
cd $pwd
if [[ -d global-workflow.fd ]]; then
lScripts="exwave_init.sh exwave_nawips.sh exwave_post_sbs.sh exwave_prep.sh exwave_stat.sh"
lScripts="exgfs_wave_init.sh exgfs_wave_nawips.sh exgfs_wave_post_gridded_sbs.sh exgfs_wave_prep.sh exgfs_wave_prdgen_bulls.sh exgfs_wave_prdgen_gridded.sh" #exwave_stat.sh"
for sFile in $lScripts; do
$LINK ../sorc/global-workflow.fd/scripts/$sFile ../scripts/
done

lUsh="wave_ens_bull.sh wave_ens_stat.sh wave_grib2_sbs.sh wave_grid_interp_sbs.sh wave_grid_moddef.sh wave_outp_spec.sh wave_prnc_cur.sh wave_prnc_ice.sh wave_tar.sh"
lUsh=`ls ../sorc/global-workflow.fd/ush/wave_*` #"wave_ens_bull.sh wave_ens_stat.sh wave_grib2_sbs.sh wave_grid_interp_sbs.sh wave_grid_moddef.sh wave_outp_spec.sh wave_prnc_cur.sh wave_prnc_ice.sh wave_tar.sh"
for sFile in $lUsh; do
sFile=$(basename ${sFile})
echo $sFile
$LINK ../sorc/global-workflow.fd/ush/$sFile ../ush/
done

Expand All @@ -187,7 +188,6 @@ if [[ -d global-workflow.fd ]]; then
$LINK ${pwd}/global-workflow.fd/env ../
fi
fi
fi

# for CHEM
if [[ -d global-workflow.fd ]]; then
Expand Down

0 comments on commit 4cabec6

Please sign in to comment.