diff --git a/scripts/exgdas_enkf_earc.sh b/scripts/exgdas_enkf_earc.sh index 538d87ecb40..1408165bfd5 100755 --- a/scripts/exgdas_enkf_earc.sh +++ b/scripts/exgdas_enkf_earc.sh @@ -103,14 +103,18 @@ if [ "${ENSGRP}" -eq 0 ]; then #--set the archiving command and create local directories, if necessary TARCMD="htar" + HSICMD="hsi" if [[ ${LOCALARCH} = "YES" ]]; then TARCMD="tar" + HSICMD="" [ ! -d "${ATARDIR}"/"${CDATE}" ] && mkdir -p "${ATARDIR}"/"${CDATE}" fi set +e ${TARCMD} -P -cvf "${ATARDIR}/${CDATE}/${RUN}.tar" $(cat "${ARCH_LIST}/${RUN}.txt") status=$? + ${HSICMD} chgrp rstprod "${ATARDIR}/${CDATE}/${RUN}.tar" + ${HSICMD} chmod 640 "${ATARDIR}/${CDATE}/${RUN}.tar" if [ "${status}" -ne 0 ] && [ "${CDATE}" -ge "${firstday}" ]; then echo "$(echo "${TARCMD}" | tr 'a-z' 'A-Z') ${CDATE} ${RUN}.tar failed" exit "${status}" diff --git a/scripts/exglobal_archive.sh b/scripts/exglobal_archive.sh index d3ca443677a..38ff1db48c0 100755 --- a/scripts/exglobal_archive.sh +++ b/scripts/exglobal_archive.sh @@ -109,8 +109,10 @@ if [[ ${HPSSARCH} = "YES" || ${LOCALARCH} = "YES" ]]; then # --set the archiving command and create local directories, if necessary TARCMD="htar" +HSICMD="hsi" if [[ ${LOCALARCH} = "YES" ]]; then TARCMD="tar" + HSICMD='' [ ! -d "${ATARDIR}"/"${CDATE}" ] && mkdir -p "${ATARDIR}"/"${CDATE}" [ ! -d "${ATARDIR}"/"${CDATE_MOS}" ] && [ -d "${ROTDIR}"/gfsmos."${PDY_MOS}" ] && [ "${cyc}" -eq 18 ] && mkdir -p "${ATARDIR}"/"${CDATE_MOS}" fi @@ -255,6 +257,13 @@ for targrp in ${targrp_list}; do set +e ${TARCMD} -P -cvf "${ATARDIR}"/"${CDATE}"/"${targrp}".tar $(cat "${ARCH_LIST}"/"${targrp}".txt) status=$? + case ${targrp} in + 'gdas'|'gdas_restarta') + ${HSICMD} chgrp rstprod "${ATARDIR}/${CDATE}/${targrp}.tar" + ${HSICMD} chmod 640 "${ATARDIR}/${CDATE}/${targrp}.tar" + ;; + *) ;; + esac if [ "${status}" -ne 0 ] && [ "${CDATE}" -ge "${firstday}" ]; then echo "$(echo "${TARCMD}" | tr 'a-z' 'A-Z') ${CDATE} ${targrp}.tar failed" exit "${status}"