Skip to content

Commit

Permalink
Merge branch 'feature/href_fixes' of https://github.com/BinbinZhou-NO…
Browse files Browse the repository at this point in the history
…AA/EVS into feature/href_fixes

* 'feature/href_fixes' of https://github.com/BinbinZhou-NOAA/EVS:
  Fix exevs_href_precip_stats.sh and exevs_href_spcoutlook_stats.sh
  Fix ush/cam/evs_href_prepare.sh
  Update for MDMP
  • Loading branch information
BinbinZhou-NOAA committed Nov 7, 2024
2 parents d129250 + 404609b commit 1fbbd28
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 35 deletions.
17 changes: 9 additions & 8 deletions scripts/stats/cam/exevs_href_grid2obs_stats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set -x
export machine=${machine:-"WCOSS2"}
export WORK=$DATA
cd $WORK
mkdir -p $WORK/scripts

#lvl = profile or sfc or both
export lvl='both'
Expand Down Expand Up @@ -95,43 +96,43 @@ fi
#*****************************************
# Build a POE script to collect sub-jobs
#****************************************
>run_href_all_grid2obs_poe
>$DATA/scripts/run_href_all_grid2obs_poe

#system: 10 jobs (8 on CONUS, 2 on Alaska)
if [ $verif_system = yes ] ; then
$USHevs/cam/evs_href_grid2obs_system.sh
export err=$?; err_chk
cat ${DATA}/run_all_href_system_poe.sh >> run_href_all_grid2obs_poe
cat ${DATA}/scripts/run_all_href_system_poe.sh >> $DATA/scripts/run_href_all_grid2obs_poe
fi

#profile: total 10 jobs (4 for conus and 2 for alaska)
if [ $verif_profile = yes ] ; then
$USHevs/cam/evs_href_grid2obs_profile.sh $domain
export err=$?; err_chk
cat ${DATA}/run_all_href_profile_poe.sh >> run_href_all_grid2obs_poe
cat ${DATA}/scripts/run_all_href_profile_poe.sh >> $DATA/scripts/run_href_all_grid2obs_poe
fi

#Product: 16 jobs
if [ $verif_product = yes ] ; then
$USHevs/cam/evs_href_grid2obs_product.sh
export err=$?; err_chk
cat ${DATA}/run_all_href_product_poe.sh >> run_href_all_grid2obs_poe
cat ${DATA}/scripts/run_all_href_product_poe.sh >> $DATA/scripts/run_href_all_grid2obs_poe
fi


#totall: 36 jobs for all (both conus and alaska, profile, system and product)
chmod 775 run_href_all_grid2obs_poe
chmod 775 $DATA/scripts/run_href_all_grid2obs_poe


#*************************************************
# Run the POE script to generate small stat files
#*************************************************
if [ -s run_href_all_grid2obs_poe ] ; then
if [ -s $DATA/scripts/run_href_all_grid2obs_poe ] ; then
if [ $run_mpi = yes ] ; then
mpiexec -np 72 -ppn 72 --cpu-bind verbose,depth cfp ${DATA}/run_href_all_grid2obs_poe
mpiexec -np 72 -ppn 72 --cpu-bind verbose,depth cfp ${DATA}/scripts/run_href_all_grid2obs_poe
export err=$?; err_chk
else
${DATA}/run_href_all_grid2obs_poe
${DATA}/scripts/run_href_all_grid2obs_poe
export err=$?; err_chk
fi
fi
Expand Down
15 changes: 8 additions & 7 deletions scripts/stats/cam/exevs_href_precip_stats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export err=$?; err_chk

export WORK=$DATA
cd $WORK
mkdir -p $WORK/scripts

export run_mpi=${run_mpi:-'yes'}
export verif_precip=${verif_precip:-'yes'}
Expand Down Expand Up @@ -70,33 +71,33 @@ fi
#***************************************
# Build a POE script to collect sub-jobs
# **************************************
> run_all_precip_poe.sh
>$DATA/scripts/run_all_precip_poe.sh

# Build sub-jobs for precip
if [ $verif_precip = yes ] ; then
$USHevs/cam/evs_href_precip.sh
export err=$?; err_chk
cat ${DATA}/run_all_href_precip_poe.sh >> run_all_precip_poe.sh
cat ${DATA}/scripts/run_all_href_precip_poe.sh >> $DATA/scripts/run_all_precip_poe.sh
fi

# Build sub-jobs for snowfall
if [ $verif_snowfall = yes ] ; then
$USHevs/cam/evs_href_snowfall.sh
export err=$?; err_chk
cat ${DATA}/run_all_href_snowfall_poe.sh >> run_all_precip_poe.sh
cat ${DATA}/scripts/run_all_href_snowfall_poe.sh >> $DATA/scripts/run_all_precip_poe.sh
fi

#*************************************************
# Run the POE script to generate small stat files
#*************************************************
if [ -s ${DATA}/run_all_precip_poe.sh ] ; then
chmod 775 run_all_precip_poe.sh
if [ -s ${DATA}/scripts/run_all_precip_poe.sh ] ; then
chmod 775 ${DATA}/scripts/run_all_precip_poe.sh

if [ $run_mpi = yes ] ; then
mpiexec -n 44 -ppn 44 --cpu-bind core --depth=2 cfp ${DATA}/run_all_precip_poe.sh
mpiexec -n 44 -ppn 44 --cpu-bind core --depth=2 cfp ${DATA}/scripts/run_all_precip_poe.sh
export err=$?; err_chk
else
${DATA}/run_all_precip_poe.sh
${DATA}/scripts/run_all_precip_poe.sh
export err=$?; err_chk
fi

Expand Down
13 changes: 7 additions & 6 deletions scripts/stats/cam/exevs_href_spcoutlook_stats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set -x
export machine=${machine:-"WCOSS2"}
export WORK=$DATA
cd $WORK
mkdir -p $WORK/scripts

#*********************************
#check input data are available:
Expand Down Expand Up @@ -73,26 +74,26 @@ fi
#****************************************
# Build a POE script to collect sub-jobs
# ***************************************
>run_href_all_grid2obs_poe
>$DATA/scripts/run_href_all_grid2obs_poe

#Spc_outlook: 2 job
if [ $verif_spcoutlook = yes ] ; then
$USHevs/cam/evs_href_spcoutlook.sh
export err=$?; err_chk
cat ${DATA}/run_all_href_spcoutlook_poe.sh >> run_href_all_grid2obs_poe
cat ${DATA}/scripts/run_all_href_spcoutlook_poe.sh >> $DATA/scripts/run_href_all_grid2obs_poe
fi

chmod 775 run_href_all_grid2obs_poe

#****************************************
# Run POE script to get small stat files
# ***************************************
if [ -s run_href_all_grid2obs_poe ] ; then
if [ -s $DATA/scripts/run_href_all_grid2obs_poe ] ; then
chmod 775 $DATA/scripts/run_href_all_grid2obs_poe
if [ $run_mpi = yes ] ; then
mpiexec -np 2 -ppn 2 --cpu-bind verbose,core cfp ${DATA}/run_href_all_grid2obs_poe
mpiexec -np 2 -ppn 2 --cpu-bind verbose,core cfp ${DATA}/scripts/run_href_all_grid2obs_poe
export err=$?; err_chk
else
${DATA}/run_href_all_grid2obs_poe
${DATA}/scripts/run_href_all_grid2obs_poe
export err=$?; err_chk
fi
fi
Expand Down
7 changes: 4 additions & 3 deletions ush/cam/evs_href_gather.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ for MODL in $MODELS ; do
#************************************************
# Build sub-jobs
#***********************************************
cd $DATA/scripts
>run_gather_${verify}_${MODL}.sh

echo "export output_base=${WORK}/gather" >> run_gather_${verify}_${MODL}.sh
Expand Down Expand Up @@ -63,7 +64,7 @@ for MODL in $MODELS ; do

chmod +x run_gather_${verify}_${MODL}.sh

echo "${DATA}/run_gather_${verify}_${MODL}.sh" >> run_gather_all_poe.sh
echo "${DATA}/scripts/run_gather_${verify}_${MODL}.sh" >> run_gather_all_poe.sh

done

Expand All @@ -73,9 +74,9 @@ chmod 775 run_gather_all_poe.sh
# Run the POE script
#*****************************
if [ $run_mpi = yes ] ; then
mpiexec -np 3 -ppn 3 --cpu-bind verbose,depth cfp ${DATA}/run_gather_all_poe.sh
mpiexec -np 3 -ppn 3 --cpu-bind verbose,depth cfp ${DATA}/scripts/run_gather_all_poe.sh
export err=$?; err_chk
else
${DATA}/run_gather_all_poe.sh
${DATA}/scripts/run_gather_all_poe.sh
export err=$?; err_chk
fi
5 changes: 3 additions & 2 deletions ush/cam/evs_href_grid2obs_product.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ set -x
#*******************************************
# Build POE script to collect sub-jobs
#******************************************
cd $DATA/scripts
>run_all_href_product_poe.sh

obsv='prepbufr'
Expand Down Expand Up @@ -116,7 +117,7 @@ for prod in mean prob ; do
echo "[[ \$? = 0 ]] && >$COMOUTrestart/product/run_href_${model}.${dom}.${valid_run}.${fhr}_product.completed" >> run_href_${model}.${dom}.${valid_run}.${fhr}.product.sh

chmod +x run_href_${model}.${dom}.${valid_run}.${fhr}.product.sh
echo "${DATA}/run_href_${model}.${dom}.${valid_run}.${fhr}.product.sh" >> run_all_href_product_poe.sh
echo "${DATA}/scripts/run_href_${model}.${dom}.${valid_run}.${fhr}.product.sh" >> run_all_href_product_poe.sh
fi

fi
Expand Down Expand Up @@ -193,7 +194,7 @@ for prod in mean prob ; do
echo "[[ \$? = 0 ]] && >$COMOUTrestart/product/run_href_${model}.${dom}.${valid_run}.${fhr}_product.completed" >> run_href_${model}.${dom}.${valid_run}.${fhr}.product.sh

chmod +x run_href_${model}.${dom}.${valid_run}.${fhr}.product.sh
echo "${DATA}/run_href_${model}.${dom}.${valid_run}.${fhr}.product.sh" >> run_all_href_product_poe.sh
echo "${DATA}/scripts/run_href_${model}.${dom}.${valid_run}.${fhr}.product.sh" >> run_all_href_product_poe.sh

fi

Expand Down
9 changes: 5 additions & 4 deletions ush/cam/evs_href_grid2obs_profile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ fi
#*******************************************
# Build POE script to collect sub-jobs
#******************************************
cd $DATA/scripts
>run_all_href_profile_poe.sh


Expand Down Expand Up @@ -141,7 +142,7 @@ for dom in $domains ; do
echo "[[ \$? = 0 ]] && >$COMOUTrestart/profile/run_href_${domain}.${valid_at}.${fhr}_profile.completed" >> run_href_${domain}.${valid_at}.${fhr}_profile.sh

chmod +x run_href_${domain}.${valid_at}.${fhr}_profile.sh
echo "${DATA}/run_href_${domain}.${valid_at}.${fhr}_profile.sh" >> run_all_href_profile_poe.sh
echo "${DATA}/scripts/run_href_${domain}.${valid_at}.${fhr}_profile.sh" >> run_all_href_profile_poe.sh

fi

Expand Down Expand Up @@ -258,7 +259,7 @@ for dom in $domains ; do


chmod +x run_href_${domain}.${valid_at}.${fhr}_profile.sh
echo "${DATA}/run_href_${domain}.${valid_at}.${fhr}_profile.sh" >> run_all_href_profile_poe.sh
echo "${DATA}/scripts/run_href_${domain}.${valid_at}.${fhr}_profile.sh" >> run_all_href_profile_poe.sh

fi
fi
Expand Down Expand Up @@ -367,7 +368,7 @@ for dom in $domains ; do
echo "[[ \$? = 0 ]] && >$COMOUTrestart/profile/run_href_${domain}.${valid_at}.${fhr}_profile.completed" >> run_href_${domain}.${valid_at}.${fhr}_profile.sh

chmod +x run_href_${domain}.${valid_at}.${fhr}_profile.sh
echo "${DATA}/run_href_${domain}.${valid_at}.${fhr}_profile.sh" >> run_all_href_profile_poe.sh
echo "${DATA}/scripts/run_href_${domain}.${valid_at}.${fhr}_profile.sh" >> run_all_href_profile_poe.sh

fi
fi
Expand Down Expand Up @@ -477,7 +478,7 @@ for dom in $domains ; do
echo "[[ \$? = 0 ]] && >$COMOUTrestart/profile/run_href_${domain}.${valid_at}.${fhr}_profile.completed" >> run_href_${domain}.${valid_at}.${fhr}_profile.sh

chmod +x run_href_${domain}.${valid_at}.${fhr}_profile.sh
echo "${DATA}/run_href_${domain}.${valid_at}.${fhr}_profile.sh" >> run_all_href_profile_poe.sh
echo "${DATA}/scripts/run_href_${domain}.${valid_at}.${fhr}_profile.sh" >> run_all_href_profile_poe.sh

fi
fi
Expand Down
5 changes: 3 additions & 2 deletions ush/cam/evs_href_grid2obs_system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set -x
#*******************************************
# Build POE script to collect sub-jobs
#******************************************
cd $DATA/scripts
>run_all_href_system_poe.sh

export obsv=prepbufr
Expand Down Expand Up @@ -177,7 +178,7 @@ for dom in CONUS Alaska ; do
echo "[[ \$? = 0 ]] && >$COMOUTrestart/system/run_href_${domain}.${valid_at}.${fhr}_system.completed" >> run_href_${domain}.${valid_at}.${fhr}_system.sh

chmod +x run_href_${domain}.${valid_at}.${fhr}_system.sh
echo "${DATA}/run_href_${domain}.${valid_at}.${fhr}_system.sh" >> run_all_href_system_poe.sh
echo "${DATA}/scripts/run_href_${domain}.${valid_at}.${fhr}_system.sh" >> run_all_href_system_poe.sh

fi

Expand Down Expand Up @@ -292,7 +293,7 @@ for dom in CONUS Alaska ; do
echo "[[ \$? = 0 ]] && >$COMOUTrestart/system/run_href_${domain}.${valid_at}.${fhr}_system.completed" >> run_href_${domain}.${valid_at}.${fhr}_system.sh

chmod +x run_href_${domain}.${valid_at}.${fhr}_system.sh
echo "${DATA}/run_href_${domain}.${valid_at}.${fhr}_system.sh" >> run_all_href_system_poe.sh
echo "${DATA}/scripts/run_href_${domain}.${valid_at}.${fhr}_system.sh" >> run_all_href_system_poe.sh

fi

Expand Down
3 changes: 2 additions & 1 deletion ush/cam/evs_href_precip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set -x
#*******************************************
# Build POE script to collect sub-jobs
#******************************************
cd $DATA/scripts
>run_all_href_precip_poe.sh


Expand Down Expand Up @@ -491,7 +492,7 @@ for obsvtype in ccpa mrms ; do
echo "[[ \$? = 0 ]] && >$COMOUTrestart/${prod}/run_href_precip_${prod}.${obsv}.f${fhr}.v${vhr}.completed" >> run_href_precip_${prod}.${obsv}.f${fhr}.v${vhr}.sh

chmod +x run_href_precip_${prod}.${obsv}.f${fhr}.v${vhr}.sh
echo "${DATA}/run_href_precip_${prod}.${obsv}.f${fhr}.v${vhr}.sh" >> run_all_href_precip_poe.sh
echo "${DATA}/scripts/run_href_precip_${prod}.${obsv}.f${fhr}.v${vhr}.sh" >> run_all_href_precip_poe.sh

fi #end if check input files

Expand Down
3 changes: 2 additions & 1 deletion ush/cam/evs_href_snowfall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ set -x
# Build POE script to collect sub-jobs
#******************************************
export write_job_cards=yes
cd $DATA/scripts
>run_all_href_snowfall_poe.sh

mkdir -p $COMOUTsmall/HREF_SNOW
Expand Down Expand Up @@ -138,7 +139,7 @@ for obsv in 6h 24h ; do
echo "[[ \$? = 0 ]] && >$COMOUTrestart/snow/run_href_snow${obsv}.${fhr}.${vhr}.completed" >> run_href_snow${obsv}.${fhr}.${vhr}.sh

chmod +x run_href_snow${obsv}.${fhr}.${vhr}.sh
echo "${DATA}/run_href_snow${obsv}.${fhr}.${vhr}.sh" >> run_all_href_snowfall_poe.sh
echo "${DATA}/scripts/run_href_snow${obsv}.${fhr}.${vhr}.sh" >> run_all_href_snowfall_poe.sh

fi
fi #end if check restart
Expand Down
3 changes: 2 additions & 1 deletion ush/cam/evs_href_spcoutlook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ cd $WORK
#*******************************************
# Build POE script to collect sub-jobs
#******************************************
cd $DATA/scripts
>run_all_href_spcoutlook_poe.sh

obsv='prepbufr'
Expand Down Expand Up @@ -163,7 +164,7 @@ for prod in mean ; do
echo "[[ \$? = 0 ]] && >$COMOUTrestart/spcoutlook/run_href_${model}.${dom}.${valid}.${fhr}_spcoutlook.completed" >> run_href_${model}.${dom}.${valid}.${fhr}_spcoutlook.sh

chmod +x run_href_${model}.${dom}.${valid}.${fhr}_spcoutlook.sh
echo "${DATA}/run_href_${model}.${dom}.${valid}.${fhr}_spcoutlook.sh" >> run_all_href_spcoutlook_poe.sh
echo "${DATA}/scripts/run_href_${model}.${dom}.${valid}.${fhr}_spcoutlook.sh" >> run_all_href_spcoutlook_poe.sh

fi

Expand Down

0 comments on commit 1fbbd28

Please sign in to comment.