Skip to content

Commit

Permalink
Merge branch 'feature/gfsv16b' of https://github.com/NOAA-EMC/global-…
Browse files Browse the repository at this point in the history
…workflow into feature/gfsv16b
  • Loading branch information
GuangPingLou-NOAA committed Jun 4, 2020
2 parents 9b36cfd + dc512dd commit 968b986
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 61 deletions.
6 changes: 6 additions & 0 deletions env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export NTHSTACK=1024000000
export job=${PBS_JOBNAME:-$step}
export jobid=${job}.${PBS_JOBID:-$$}


if [ $step = "prep" -o $step = "prepbufr" ]; then

nth_max=$(($npe_node_max / $npe_node_prep))
Expand All @@ -37,6 +38,11 @@ if [ $step = "prep" -o $step = "prepbufr" ]; then
export BACK="NO"
export sys_tp="HERA"

elif [ $step = "waveinit" -o $step = "waveprep" -o $step = "wavepostsbs" ]; then

export mpmd="--multi-prog"
export CFP_MP="YES"

elif [ $step = "anal" ]; then

export MKL_NUM_THREADS=4
Expand Down
4 changes: 3 additions & 1 deletion jobs/JWAVE_PREP
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ else
if [ ! -L $ROTDIR/${WAVECUR_DID}.${RPDY} ]; then # Check if symlink already exists in ROTDIR
$NLN $DMPDIR/${WAVECUR_DID}.${RPDY} $ROTDIR/${WAVECUR_DID}.${RPDY}
fi
$NLN $DMPDIR/$CDUMP.${PDY}/$cyc/${WAVICEFILE} $ROTDIR/$CDUMP.${PDY}/$cyc/${WAVICEFILE}
if [ ! -L $ROTDIR/${CDUMP}.${PDY}/${cyc}/${WAVICEFILE} ]; then # Check if symlink already exists in ROTDIR
$NLN $DMPDIR/$CDUMP.${PDY}/$cyc/${WAVICEFILE} $ROTDIR/$CDUMP.${PDY}/$cyc/${WAVICEFILE}
fi
export COMIN_OBS=${COMIN_OBS:-$ROTDIR/$RUN.$PDY/$cyc}
export COMIN_WAV_ICE=${COMIN_OBS}
export COMIN_WAV_WND=${COMIN_OBS}
Expand Down
3 changes: 3 additions & 0 deletions modulefiles/module_base.hera
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ module load prod_util/1.1.0
# python
module use -a /contrib/modulefiles
module load anaconda/2.3.0

# waveprep
module load cdo/1.9.5
2 changes: 0 additions & 2 deletions parm/config/config.ediag
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ echo "BEGIN: config.ediag"
# Get task specific resources
. $EXPDIR/config.resources ediag

export ANALDIAGSH="$HOMEgfs/scripts/exglobal_analdiag_fv3gfs.sh.ecf"

echo "END: config.ediag"
4 changes: 2 additions & 2 deletions parm/config/config.waveprep
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export WAV_WND_HOUR_INC=1 # This value should match with the one used in
# the wind update script
# Intake currents settings
export WAV_CUR_DT=${WAV_CUR_DT:-3}
export WAV_CUR_HF_DT=${WAV_CUR_HF_DT:-3}
export WAV_CUR_HF_FH=${WAV_CUR_HF_FH:-72}
export WAV_CUR_HF_DT=${WAV_CUR_HF_DT:-3} # Defaults to 3h for GEFSv12
export WAV_CUR_HF_FH=${WAV_CUR_HF_FH:-0} # Constant DT for GFSv16 from getgo
export WAV_CUR_CDO_SMOOTH="NO"

# Location of CDO module
Expand Down
12 changes: 10 additions & 2 deletions scripts/exwave_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@
fi

[[ ! -d $COMOUT/rundata ]] && mkdir -m 775 -p $COMOUT/rundata
echo "$USHwave/wave_grid_moddef.sh $grdID > $grdID.out 2>&1" >> cmdfile
if [ ${CFP_MP:-"NO"} = "YES" ]; then
echo "$nmoddef $USHwave/wave_grid_moddef.sh $grdID > $grdID.out 2>&1" >> cmdfile
else
echo "$USHwave/wave_grid_moddef.sh $grdID > $grdID.out 2>&1" >> cmdfile
fi

nmoddef=`expr $nmoddef + 1`

Expand Down Expand Up @@ -162,7 +166,11 @@

if [ "$NTASKS" -gt '1' ]
then
${wavempexec} ${wavenproc} ${wave_mpmd} cmdfile
if [ ${CFP_MP:-"NO"} = "YES" ]; then
${wavempexec} -n ${wavenproc} ${wave_mpmd} cmdfile
else
${wavempexec} ${wavenproc} ${wave_mpmd} cmdfile
fi
exit=$?
else
./cmdfile
Expand Down
85 changes: 42 additions & 43 deletions scripts/exwave_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -638,55 +638,55 @@
touch cmdfile
chmod 744 cmdfile

ymdh_rtofs=${PDY}00 # RTOFS runs once daily
ymdh_end=`$NDATE ${FHMAX_WAV_CUR} ${ymdh_rtofs}`
NDATE_DT=${WAV_CUR_HF_DT}
FLGHF='T'
ymdh_rtofs=${PDY}00 # RTOFS runs once daily use ${PDY}00
ymdh_end=`$NDATE ${FHMAX_WAV_CUR} ${PDY}00`
NDATE_DT=${WAV_CUR_HF_DT}
FLGHF='T'

if [ ${CFP_MP:-"NO"} = "YES" ]; then nm=0 ; fi # Counter for MP CFP
while [ "$ymdh_rtofs" -le "$ymdh_end" ]
do
if [ ${CFP_MP:-"NO"} = "YES" ]; then nm=0 ; fi # Counter for MP CFP
while [ "$ymdh_rtofs" -le "$ymdh_end" ]
do
# Timing has to be made relative to the single 00z RTOFS cycle for that PDY
fhr_rtofs=`${NHOUR} ${ymdh_rtofs} ${PDY}00`
fext='f'
fhr_rtofs=`${NHOUR} ${ymdh_rtofs} ${PDY}00`
fext='f'

fh3_rtofs=`printf "%03d" "${fhr_rtofs#0}"`
fh3_rtofs=`printf "%03d" "${fhr_rtofs#0}"`

curfile1h=${COMIN_WAV_CUR}/rtofs_glo_2ds_${fext}${fh3_rtofs}_1hrly_prog.nc
curfile3h=${COMIN_WAV_CUR}/rtofs_glo_2ds_${fext}${fh3_rtofs}_3hrly_prog.nc
curfile1h=${COMIN_WAV_CUR}/rtofs_glo_2ds_${fext}${fh3_rtofs}_1hrly_prog.nc
curfile3h=${COMIN_WAV_CUR}/rtofs_glo_2ds_${fext}${fh3_rtofs}_3hrly_prog.nc

if [ -s ${curfile1h} ] && [ "${FLGHF}" = "T" ] ; then
curfile=${curfile1h}
elif [ -s ${curfile3h} ]; then
curfile=${curfile3h}
FLGHF='F'
else
echo ' '
set $setoff
echo ' '
echo '************************************** '
echo "*** FATAL ERROR: NO CUR FILE $curfile *** "
echo '************************************** '
echo ' '
set $seton
postmsg "$jlogfile" "FATAL ERROR - NO CURRENT FILE (RTOFS)"
err=11;export err;${errchk}
exit 0
echo ' '
fi
if [ -s ${curfile1h} ] && [ "${FLGHF}" = "T" ] ; then
curfile=${curfile1h}
elif [ -s ${curfile3h} ]; then
curfile=${curfile3h}
FLGHF='F'
else
echo ' '
set $setoff
echo ' '
echo '************************************** '
echo "*** FATAL ERROR: NO CUR FILE $curfile *** "
echo '************************************** '
echo ' '
set $seton
postmsg "$jlogfile" "FATAL ERROR - NO CURRENT FILE (RTOFS)"
err=11;export err;${errchk}
exit 0
echo ' '
fi

if [ ${CFP_MP:-"NO"} = "YES" ]; then
echo "$nm $USHwave/wave_prnc_cur.sh $ymdh_rtofs $curfile $fhr_rtofs > cur_$ymdh_rtofs.out 2>&1" >> cmdfile
nm=`expr $nm + 1`
else
echo "$USHwave/wave_prnc_cur.sh $ymdh_rtofs $curfile $fhr_rtofs > cur_$ymdh_rtofs.out 2>&1" >> cmdfile
fi
if [ ${CFP_MP:-"NO"} = "YES" ]; then
echo "$nm $USHwave/wave_prnc_cur.sh $ymdh_rtofs $curfile $fhr_rtofs > cur_$ymdh_rtofs.out 2>&1" >> cmdfile
nm=`expr $nm + 1`
else
echo "$USHwave/wave_prnc_cur.sh $ymdh_rtofs $curfile $fhr_rtofs > cur_$ymdh_rtofs.out 2>&1" >> cmdfile
fi

if [ $fhr_rtofs -ge ${WAV_CUR_HF_FH} ] ; then
NDATE_DT=${WAV_CUR_DT}
fi
ymdh_rtofs=`$NDATE $NDATE_DT $ymdh_rtofs`
done
if [ $fhr_rtofs -ge ${WAV_CUR_HF_FH} ] ; then
NDATE_DT=${WAV_CUR_DT}
fi
ymdh_rtofs=`$NDATE $NDATE_DT $ymdh_rtofs`
done

# Set number of processes for mpmd
wavenproc=`wc -l cmdfile | awk '{print $1}'`
Expand Down Expand Up @@ -747,7 +747,6 @@
do
echo $file
cat $file >> cur.${WAVECUR_FID}
rm -f $file
done

cp -f cur.${WAVECUR_FID} ${COMOUT}/rundata/${COMPONENTwave}.${WAVECUR_FID}.$cycle.cur
Expand Down
9 changes: 4 additions & 5 deletions sorc/checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [[ ! -d fv3gfs.fd ]] ; then
rm -f ${topdir}/checkout-fv3gfs.log
git clone https://github.com/ufs-community/ufs-weather-model fv3gfs.fd >> ${topdir}/checkout-fv3gfs.log 2>&1
cd fv3gfs.fd
git checkout GFS.v16.0.4
git checkout GFS.v16.0.5
git submodule update --init --recursive
cd ${topdir}
else
Expand All @@ -19,10 +19,9 @@ fi
echo gsi checkout ...
if [[ ! -d gsi.fd ]] ; then
rm -f ${topdir}/checkout-gsi.log
git clone --recursive gerrit:ProdGSI gsi.fd >> ${topdir}/checkout-gsi.log 2>&1
git clone --recursive https://github.com/NOAA-EMC/GSI.git gsi.fd >> ${topdir}/checkout-gsi.log 2>&1
cd gsi.fd
# git checkout gfsda.v16.0.0
git checkout feature/parallel_ncio
git checkout release/gfsda.v16.0.0
git submodule update
cd ${topdir}
else
Expand Down Expand Up @@ -78,7 +77,7 @@ if [[ ! -d verif-global.fd ]] ; then
rm -f ${topdir}/checkout-verif-global.log
git clone --recursive https://github.com/NOAA-EMC/EMC_verif-global.git verif-global.fd >> ${topdir}/checkout-verif-global.log 2>&1
cd verif-global.fd
git checkout verif_global_v1.7.2
git checkout verif_global_v1.8.0
cd ${topdir}
else
echo 'Skip. Directory verif-global.fd already exist.'
Expand Down
2 changes: 1 addition & 1 deletion ush/wave_prnc_cur.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fi
# Cleanup
rm -f cur_temp[123].nc cur_5min_??.nc cur_glo_uv_${PDY}_${fext}${fh3}.nc weights.nc

if [ ${fhr} -gt ${WAVHINDH} ]
if [ ${fhr} -gt 0 ]
then
sed -e "s/HDRFL/F/g" ${FIXwave}/ww3_prnc.cur.${WAVECUR_FID}.inp.tmpl > ww3_prnc.inp
else
Expand Down
9 changes: 4 additions & 5 deletions ush/wave_tar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

# Use LOUD variable to turn on/off trace. Defaults to YES (on).
export LOUD=${LOUD:-YES}; [[ $LOUD = yes ]] && export LOUD=YES
[[ "$LOUD" != YES ]] && set +x
[[ "$LOUD" != YES ]] && set -x

cd $DATA
postmsg "$jlogfile" "Making TAR FILE"
Expand Down Expand Up @@ -98,6 +98,7 @@
set +x
echo ' '
echo ' Making tar file ...'
set -x

count=0
countMAX=5
Expand All @@ -106,14 +107,12 @@
while [ "$count" -lt "$countMAX" ] && [ "$tardone" = 'no' ]
do

[[ "$LOUD" = YES ]] && set -v
# JY nf=`ls $ID.*.$type | wc -l | awk '{ print $1 }'`
nf=`ls | awk '/'$ID.*.$filext'/ {a++} END {print a}'`
if [ "$nf" = "$nb" ]
nbm2=$(( $nb - 2 ))
if [ $nf -ge $nbm2 ]
then
tar -cf $ID.$cycle.${type}_tar ./$ID.*.$filext
exit=$?
set +v; [[ "$LOUD" = YES ]] && set -x

if [ "$exit" != '0' ]
then
Expand Down

0 comments on commit 968b986

Please sign in to comment.