diff --git a/gempak/ush/gefs_avgspr_meta.sh b/gempak/ush/gefs_avgspr_meta.sh index 112f4e76a..8dee1e2b6 100755 --- a/gempak/ush/gefs_avgspr_meta.sh +++ b/gempak/ush/gefs_avgspr_meta.sh @@ -52,40 +52,27 @@ for area in natl mpac; do device="nc | ${metaname}" for fcsthr in ${fcsthrs}; do + fn=avg + rm -rf $fn + if [[ ${NewCOM:-"YES"} == "YES" ]]; then + INFILE=${COMINavg}/gefs${sGrid}_${PDY}${cyc}f${fcsthr} + else + INFILE=${COMINavg}/ge${fn}${sGrid}_${PDY}${cyc}f${fcsthr} + fi + if [ -r ${INFILE} ]; then + ln -s ${INFILE} $fn + fi - for fn in avg spr; do - if [ -e ${fn} ]; then rm -rf ${fn}; fi - if [[ ${NewCOM:-"YES"} == "YES" ]]; then - INFILE=$[COMIN${fn}]/gefs${sGrid}_${PDY}${cyc}f${fcsthr} - else - INFILE=$[COMIN${avg}]/ge${fn}${sGrid}_${PDY}${cyc}f${fcsthr} - fi - if [ -r ${INFILE} ]; then - ln -s ${INFILE} $fn - fi - done - -# fn=avg -# rm -rf $fn -# if [[ ${NewCOM:-"YES"} == "YES" ]]; then -# INFILE=${COMINavg}/gefs${sGrid}_${PDY}${cyc}f${fcsthr} -# else -# INFILE=${COMINavg}/ge${fn}${sGrid}_${PDY}${cyc}f${fcsthr} -# fi -# if [ -r ${INFILE} ]; then -# ln -s ${INFILE} $fn -# fi -# -# fn=spr -# rm -rf $fn -# if [[ ${NewCOM:-"YES"} == "YES" ]]; then -# INFILE=${COMINspr}/gefs${sGrid}_${PDY}${cyc}f${fcsthr} -# else -# INFILE=${COMINspr}/ge${fn}${sGrid}_${PDY}${cyc}f${fcsthr} -# fi -# if [ -r ${INFILE} ]; then -# ln -s ${INFILE} $fn -# fi + fn=spr + rm -rf $fn + if [[ ${NewCOM:-"YES"} == "YES" ]]; then + INFILE=${COMINspr}/gefs${sGrid}_${PDY}${cyc}f${fcsthr} + else + INFILE=${COMINspr}/ge${fn}${sGrid}_${PDY}${cyc}f${fcsthr} + fi + if [ -r ${INFILE} ]; then + ln -s ${INFILE} $fn + fi cat > cmdfile_meta <<- EOF GDATTIM = F${fcsthr} @@ -268,39 +255,27 @@ for area in nam sam ak; do device="nc | ${metaname}" for fcsthr in ${fcsthrs}; do - for fn in avg spr; do - if [ -e ${fn} ]; then rm -rf ${fn}; fi - if [[ ${NewCOM:-"YES"} == "YES" ]]; then - INFILE=$[COMIN${fn}]/gefs${sGrid}_${PDY}${cyc}f${fcsthr} - else - INFILE=$[COMIN${avg}]/ge${fn}${sGrid}_${PDY}${cyc}f${fcsthr} - fi - if [ -r ${INFILE} ]; then - ln -s ${INFILE} $fn - fi - done - -# fn=avg -# if [ -e ${fn} ]; then rm -rf ${fn}; fi -# if [[ ${NewCOM:-"YES"} == "YES" ]]; then -# INFILE=${COMINavg}/gefs${sGrid}_${PDY}${cyc}f${fcsthr} -# else -# INFILE=${COMINavg}/ge${fn}${sGrid}_${PDY}${cyc}f${fcsthr} -# fi -# if [ -r ${INFILE} ]; then -# ln -s ${INFILE} $fn -# fi -# -# fn=spr -# if [ -e ${fn} ]; then rm -rf ${fn}; fi -# if [[ ${NewCOM:-"YES"} == "YES" ]]; then -# INFILE=${COMINspr}/gefs${sGrid}_${PDY}${cyc}f${fcsthr} -# else -# INFILE=${COMINspr}/ge${fn}${sGrid}_${PDY}${cyc}f${fcsthr} -# fi -# if [ -r ${INFILE} ]; then -# ln -s ${INFILE} $fn -# fi + fn=avg + if [ -e ${fn} ]; then rm -rf ${fn}; fi + if [[ ${NewCOM:-"YES"} == "YES" ]]; then + INFILE=${COMINavg}/gefs${sGrid}_${PDY}${cyc}f${fcsthr} + else + INFILE=${COMINavg}/ge${fn}${sGrid}_${PDY}${cyc}f${fcsthr} + fi + if [ -r ${INFILE} ]; then + ln -s ${INFILE} $fn + fi + + fn=spr + if [ -e ${fn} ]; then rm -rf ${fn}; fi + if [[ ${NewCOM:-"YES"} == "YES" ]]; then + INFILE=${COMINspr}/gefs${sGrid}_${PDY}${cyc}f${fcsthr} + else + INFILE=${COMINspr}/ge${fn}${sGrid}_${PDY}${cyc}f${fcsthr} + fi + if [ -r ${INFILE} ]; then + ln -s ${INFILE} $fn + fi cat > cmdfile_meta <<- EOF GAREA = ${garea} diff --git a/jobs/JGEFS_ATMOS_AVGSPR_GEMPAK_META b/jobs/JGEFS_ATMOS_AVGSPR_GEMPAK_META index 906e7c75f..1dbf89c28 100755 --- a/jobs/JGEFS_ATMOS_AVGSPR_GEMPAK_META +++ b/jobs/JGEFS_ATMOS_AVGSPR_GEMPAK_META @@ -63,18 +63,6 @@ export PARMgefs=${PARMgefs:-$HOMEgefs/parm} export GEMPAKgefs=${GEMPAKgefs:-$HOMEgefs/gempak} export FIXgempak=${FIXgempak:-$GEMPAKgefs/fix} -############################################## -# Define COM directories -############################################## -# gefs_avgspr_meta.sh overrides COMIN locally to work with datatype.tbl -ver=${ver:-$(echo ${gefs_ver}|cut -c1-5)} -export COMIN=${COMIN:-$(compath.py $envir/com/$NET/${ver})/${RUN}.${PDY}/$cyc} -if [[ ${NewCOM:-"YES"} == "YES" ]]; then - export COMOUT=${COMOUT:-$(compath.py -o $NET/${ver})/${RUN}.${PDY}/${cyc}/avg/$COMPONENT/products/gempak/meta} -else - export COMOUT=${COMOUT:-$(compath.py -o $NET/${ver})/${RUN}.${PDY}/${cyc}/$COMPONENT/gempak/meta} -fi - ############################# # Source relevant config files ############################# @@ -90,6 +78,17 @@ for config in $configs; do done export COMPONENT=${COMPONENT:-atmos} +############################################## +# Define COM directories +############################################## +# gefs_avgspr_meta.sh overrides COMIN locally to work with datatype.tbl +ver=${ver:-$(echo ${gefs_ver}|cut -c1-5)} +export COMIN=${COMIN:-$(compath.py $envir/com/$NET/${ver})/${RUN}.${PDY}/$cyc} +if [[ ${NewCOM:-"YES"} == "YES" ]]; then + export COMOUT=${COMOUT:-$(compath.py -o $NET/${ver})/${RUN}.${PDY}/${cyc}/avg/$COMPONENT/products/gempak/meta} +else + export COMOUT=${COMOUT:-$(compath.py -o $NET/${ver})/${RUN}.${PDY}/${cyc}/$COMPONENT/gempak/meta} +fi if [[ $SENDCOM == "YES" && ! -d $COMOUT ]]; then mkdir -p -m 755 $COMOUT; fi echo "Environment before calling script"