diff --git a/ecf/post/jhafs_gempak.ecf b/ecf/post/jhafs_gempak.ecf index 7c9dcbda3..67b5874b2 100755 --- a/ecf/post/jhafs_gempak.ecf +++ b/ecf/post/jhafs_gempak.ecf @@ -35,8 +35,6 @@ module load wgrib2/${wgrib2_ver} module load gempak/${gempak_ver} module list -export NCP=cpfs - ${HOMEhafs}/jobs/JHAFS_GEMPAK %include diff --git a/scripts/exhafs_analysis.sh b/scripts/exhafs_analysis.sh index 65d251ee4..6698186c2 100755 --- a/scripts/exhafs_analysis.sh +++ b/scripts/exhafs_analysis.sh @@ -609,7 +609,7 @@ set -o pipefail ${APRUNC} ./hafs_gsi.x 2>&1 | tee ./stdout set +o pipefail -${NCP} -p ./stdout ${GSISOUT} +cat ./stdout > ${GSISOUT} # Cat runtime output files. cat fort.2* > ${GSISTAT} @@ -836,8 +836,8 @@ fi # End diagnostic file generation block - if [ $GENDIAG = "YES" ] # Save satbias data for next cycle if [ ${online_satbias} = "yes" ]; then - ${NCP} satbias_out $DIAGanl/${out_prefix}.${RUN}.${gridstr}.analysis.abias - ${NCP} satbias_pc.out $DIAGanl/${out_prefix}.${RUN}.${gridstr}.analysis.abias_pc + ${FCP} satbias_out $DIAGanl/${out_prefix}.${RUN}.${gridstr}.analysis.abias + ${FCP} satbias_pc.out $DIAGanl/${out_prefix}.${RUN}.${gridstr}.analysis.abias_pc fi # If no processing error, remove $DIAG_DIR diff --git a/scripts/exhafs_atm_post.sh b/scripts/exhafs_atm_post.sh index c8f2acdcf..9150e2239 100755 --- a/scripts/exhafs_atm_post.sh +++ b/scripts/exhafs_atm_post.sh @@ -497,35 +497,35 @@ if [ -s ${INPdir}/${grid_spec} ] && [ ${INPdir}/${grid_spec} -nt ${INPdir}/RESTA fi if [ ! -z "${RESTARTcom}" ] && [ $SENDCOM = YES ] && \ [ -s ${INPdir}/RESTART/${grid_spec} ] && [ ${INPdir}/RESTART/${grid_spec} -nt ${RESTARTcom}/${grid_spec} ]; then - ${NCP} -pL ${INPdir}/RESTART/${grid_spec} ${RESTARTcom}/ + ${FCP} ${INPdir}/RESTART/${grid_spec} ${RESTARTcom}/ fi if [ -s ${INPdir}/${atmos_static} ] && [ ${INPdir}/${atmos_static} -nt ${INPdir}/RESTART/${atmos_static} ]; then ${NCP} -pL ${INPdir}/${atmos_static} ${INPdir}/RESTART/ fi if [ ! -z "${RESTARTcom}" ] && [ $SENDCOM = YES ] && \ [ -s ${INPdir}/RESTART/${atmos_static} ] && [ ${INPdir}/RESTART/${atmos_static} -nt ${RESTARTcom}/${atmos_static} ]; then - ${NCP} -pL ${INPdir}/RESTART/${atmos_static} ${RESTARTcom}/ + ${FCP} ${INPdir}/RESTART/${atmos_static} ${RESTARTcom}/ fi if [ -s ${INPdir}/INPUT/${oro_data} ] && [ ${INPdir}/INPUT/${oro_data} -nt ${INPdir}/RESTART/${oro_data} ]; then ${NCP} -pL ${INPdir}/INPUT/${oro_data} ${INPdir}/RESTART/ fi if [ ! -z "${RESTARTcom}" ] && [ $SENDCOM = YES ] && \ [ -s ${INPdir}/RESTART/${oro_data} ] && [ ${INPdir}/RESTART/${oro_data} -nt ${RESTARTcom}/${oro_data} ]; then - ${NCP} -pL ${INPdir}/RESTART/${oro_data} ${RESTARTcom}/ + ${FCP} ${INPdir}/RESTART/${oro_data} ${RESTARTcom}/ fi if [ -s ${INPdir}/INPUT/${oro_data_ls} ] && [ ${INPdir}/INPUT/${oro_data_ls} -nt ${INPdir}/RESTART/${oro_data_ls} ]; then ${NCP} -pL ${INPdir}/INPUT/${oro_data_ls} ${INPdir}/RESTART/ fi if [ ! -z "${RESTARTcom}" ] && [ $SENDCOM = YES ] && \ [ -s ${INPdir}/RESTART/${oro_data_ls} ] && [ ${INPdir}/RESTART/${oro_data_ls} -nt ${RESTARTcom}/${oro_data_ls} ]; then - ${NCP} -pL ${INPdir}/RESTART/${oro_data_ls} ${RESTARTcom}/ + ${FCP} ${INPdir}/RESTART/${oro_data_ls} ${RESTARTcom}/ fi if [ -s ${INPdir}/INPUT/${oro_data_ss} ] && [ ${INPdir}/INPUT/${oro_data_ss} -nt ${INPdir}/RESTART/${oro_data_ss} ]; then ${NCP} -pL ${INPdir}/INPUT/${oro_data_ss} ${INPdir}/RESTART/ fi if [ ! -z "${RESTARTcom}" ] && [ $SENDCOM = YES ] && \ [ -s ${INPdir}/RESTART/${oro_data_ss} ] && [ ${INPdir}/RESTART/${oro_data_ss} -nt ${RESTARTcom}/${oro_data_ss} ]; then - ${NCP} -pL ${INPdir}/RESTART/${oro_data_ss} ${RESTARTcom}/ + ${FCP} ${INPdir}/RESTART/${oro_data_ss} ${RESTARTcom}/ fi # grid_mspec files at the current and prior forecast hours @@ -550,7 +550,7 @@ if [ $FHR -le 12 ] && [ -s ${INPdir}/${grid_mspec_old} ]; then if [ ! -z "${RESTARTcom}" ] && [ $SENDCOM = YES ] && \ [ -s ${INPdir}/RESTART/${grid_mspec_old} ] && \ [ ${INPdir}/RESTART/${grid_mspec_old} -nt ${RESTARTcom}/${grid_mspec_old} ]; then - ${NCP} -pL ${INPdir}/RESTART/${grid_mspec_old} ${RESTARTcom}/ + ${FCP} ${INPdir}/RESTART/${grid_mspec_old} ${RESTARTcom}/ fi fi # Deliver grid_mspec at NHRS if NHRS less than 12 @@ -562,7 +562,7 @@ if [ $FHR -lt 12 ] && [ $FHR -eq $NHRS ] && [ -s ${INPdir}/${grid_mspec} ]; then if [ ! -z "${RESTARTcom}" ] && [ $SENDCOM = YES ] && \ [ -s ${INPdir}/RESTART/${grid_mspec} ] && \ [ ${INPdir}/RESTART/${grid_mspec} -nt ${RESTARTcom}/${grid_mspec} ]; then - ${NCP} -pL ${INPdir}/RESTART/${grid_mspec} ${RESTARTcom}/ + ${FCP} ${INPdir}/RESTART/${grid_mspec} ${RESTARTcom}/ fi fi @@ -578,7 +578,7 @@ if [ ! -z "${RESTARTcom}" ] && [ $SENDCOM = YES ] && [ $FHR -lt 12 ] && [ -s ${I while [ $(( $(date +%s) - $(stat -c %Y ${INPdir}/RESTART/${coupler_res}) )) -lt 30 ]; do sleep 10s; done for file_res in $fv_core $fv_core_tile $fv_tracer_tile $fv_srf_wnd_tile $sfc_data $phy_data $coupler_res ; do if [ -s ${INPdir}/RESTART/${file_res} ] && [ ${INPdir}/RESTART/${file_res} -nt ${RESTARTcom}/${file_res} ]; then - ${NCP} -pL ${INPdir}/RESTART/${file_res} ${RESTARTcom}/${file_res} + ${FCP} ${INPdir}/RESTART/${file_res} ${RESTARTcom}/${file_res} fi done fi @@ -587,9 +587,9 @@ fi if [ $FHR -eq $NHRS ] && [ -s ${INPdir}/${fort_patcf} ]; then if [ -s ${INPdir}/${fort_patcf}_save ]; then cat ${INPdir}/${fort_patcf} >> ${INPdir}/${fort_patcf}_save - ${NCP} -pL ${INPdir}/${fort_patcf}_save ${COMOUTpost}/${trk_patcf} + ${FCP} ${INPdir}/${fort_patcf}_save ${COMOUTpost}/${trk_patcf} else - ${NCP} -pL ${INPdir}/${fort_patcf} ${COMOUTpost}/${trk_patcf} + ${FCP} ${INPdir}/${fort_patcf} ${COMOUTpost}/${trk_patcf} fi fi diff --git a/scripts/exhafs_enkf_hx.sh b/scripts/exhafs_enkf_hx.sh index 607a50c21..2a056beec 100755 --- a/scripts/exhafs_enkf_hx.sh +++ b/scripts/exhafs_enkf_hx.sh @@ -491,7 +491,7 @@ set -o pipefail ${APRUNC} ./hafs_gsi.x 2>&1 | tee ./stdout set +o pipefail -${NCP} -p ./stdout ${GSISOUT} +cat ./stdout > ${GSISOUT} # Cat runtime output files. cat fort.2* > ${GSISTAT} diff --git a/scripts/exhafs_gempak.sh b/scripts/exhafs_gempak.sh index bfb462230..290149e3f 100755 --- a/scripts/exhafs_gempak.sh +++ b/scripts/exhafs_gempak.sh @@ -122,8 +122,7 @@ ${GEMEXE}/gpend status=$?; [[ $status -ne 0 ]] && exit $status if [ "${SENDCOM^^}" = "YES" ]; then - ${NCP} $GDOUTF $GPOUTF -# ${NCP} -p $GDOUTF $GPOUTF + ${FCP} $GDOUTF $GPOUTF if [ "${SENDDBN^^}" = "YES" ]; then $DBNROOT/bin/dbn_alert MODEL ${RUN^^}_GEMPAK $job $GPOUTF fi diff --git a/scripts/exhafs_obs_prep.sh b/scripts/exhafs_obs_prep.sh index 22eed363e..8822efca7 100755 --- a/scripts/exhafs_obs_prep.sh +++ b/scripts/exhafs_obs_prep.sh @@ -69,11 +69,6 @@ cat ./hafs_change_prepbufr_qm_typ.out # Deliver to intercom ${NCP} -p ./prepbufr.qm_typ ${intercom}/${NET}.t${cyc}z.prepbufr -# Deliver to com (no need to deliver to COMhafs). Will need modify permission properly if rstprod is involved -#if [ $SENDCOM = YES ]; then -# ${NCP} -p ./prepbufr.qm_typ ${COMhafs}/${out_prefix}.${RUN}.prepbufr -#fi - cd $DATA NFTLDPLR=${NET}.t${cyc}z.tldplr.tm00.bufr_d @@ -115,10 +110,10 @@ else fi if [ -s ./tldplr.ibm ]; then # Deliver to intercom - ${NCP} -p ./tldplr.ibm ${intercom}/${NFTLDPLR} + ${NCP} ./tldplr.ibm ${intercom}/${NFTLDPLR} # Deliver to com if [ $SENDCOM = YES ]; then - ${NCP} -p ./tldplr.ibm ${COMhafs}/${RFTLDPLR} + ${FCP} ./tldplr.ibm ${COMhafs}/${RFTLDPLR} fi fi @@ -133,10 +128,10 @@ cat ./hdob.out set -e if [ -s ./hdob.ibm ]; then # Deliver to intercom - ${NCP} -p ./hdob.ibm ${intercom}/${NFHDOB} + ${NCP} ./hdob.ibm ${intercom}/${NFHDOB} # Deliver to com if [ $SENDCOM = YES ]; then - ${NCP} -p ./hdob.ibm ${COMhafs}/${RFHDOB} + ${FCP} ./hdob.ibm ${COMhafs}/${RFHDOB} fi fi @@ -245,7 +240,7 @@ if [ -s ./nexrad.ibm ]; then ${NCP} -p ./nexrad.ibm ${intercom}/${NFNEXRAD} # Deliver to com if [ $SENDCOM = YES ]; then - ${NCP} -p ./nexrad.ibm ${COMhafs}/${RFNEXRAD} + ${FCP} ./nexrad.ibm ${COMhafs}/${RFNEXRAD} fi fi @@ -260,7 +255,7 @@ if [[ -s ./dropsonde.${CDATE}.tar ]]; then ${NCP} -p ./dropsonde.${CDATE}.tar ${intercom}/${NFdropsonde} # Deliver to com if [ $SENDCOM = YES ]; then - ${NCP} -p ./dropsonde.${CDATE}.tar ${COMhafs}/${RFdropsonde} + ${FCP} ./dropsonde.${CDATE}.tar ${COMhafs}/${RFdropsonde} fi fi @@ -273,7 +268,7 @@ if [ -s ${COMINhafs_OBS}/${NFTLDPLR} ]; then ${NCP} -L ${COMINhafs_OBS}/${NFTLDPLR} ${intercom}/${NFTLDPLR} # Deliver to com if [ $SENDCOM = YES ]; then - ${NCP} -L ${COMINhafs_OBS}/${NFTLDPLR} ${COMhafs}/${RFTLDPLR} + ${FCP} ${intercom}/${NFTLDPLR} ${COMhafs}/${RFTLDPLR} fi fi # HDOB data @@ -282,7 +277,7 @@ if [ -s ${COMINhafs_OBS}/${NFHDOB} ]; then ${NCP} -L ${COMINhafs_OBS}/${NFHDOB} ${intercom}/${NFHDOB} # Deliver to com if [ $SENDCOM = YES ]; then - ${NCP} -L ${COMINhafs_OBS}/${NFHDOB} ${COMhafs}/${RFHDOB} + ${FCP} ${intercom}/${NFHDOB} ${COMhafs}/${RFHDOB} fi fi # NEXRAD data @@ -291,7 +286,7 @@ if [ -s ${COMINhafs_OBS}/${NFNEXRAD} ]; then ${NCP} -L ${COMINhafs_OBS}/${NFNEXRAD} ${intercom}/${NFNEXRAD} # Deliver to com if [ $SENDCOM = YES ]; then - ${NCP} -L ${COMINhafs_OBS}/${NFNEXRAD} ${COMhafs}/${RFNEXRAD} + ${FCP} ${intercom}/${NFNEXRAD} ${COMhafs}/${RFNEXRAD} fi fi # TEMPdropsonde data @@ -300,7 +295,7 @@ if [ -s ${COMINhafs_OBS}/${NFdropsonde} ]; then ${NCP} -L ${COMINhafs_OBS}/${NFdropsonde} ${intercom}/${NFdropsonde} # Deliver to com if [ $SENDCOM = YES ]; then - ${NCP} -L ${COMINhafs_OBS}/${NFdropsonde} ${COMhafs}/${RFdropsonde} + ${FCP} ${intercom}/${NFdropsonde} ${COMhafs}/${RFdropsonde} fi fi # TEMPdrop prepbufr @@ -309,7 +304,7 @@ if [ -s ${COMINhafs_OBS}/${NFtempdrop} ]; then ${NCP} -L ${COMINhafs_OBS}/${NFtempdrop} ${intercom}/${NFtempdrop} # Deliver to com if [ $SENDCOM = YES ]; then - ${NCP} -L ${COMINhafs_OBS}/${NFtempdrop} ${COMhafs}/${RFtempdrop} + ${FCP} ${intercom}/${NFtempdrop} ${COMhafs}/${RFtempdrop} fi fi @@ -349,7 +344,7 @@ if [ -s ./tempdrop.prepbufr ]; then ${NCP} -p ./tempdrop.prepbufr ${intercom}/${NFtempdrop} # Deliver to com if [ $SENDCOM = YES ]; then - ${NCP} -p ./tempdrop.prepbufr ${COMhafs}/${RFtempdrop} + ${FCP} ./tempdrop.prepbufr ${COMhafs}/${RFtempdrop} fi fi diff --git a/scripts/exhafs_ocn_post.sh b/scripts/exhafs_ocn_post.sh index f5a2455bd..07ca00b07 100755 --- a/scripts/exhafs_ocn_post.sh +++ b/scripts/exhafs_ocn_post.sh @@ -107,7 +107,7 @@ done # Deliver to COMOUTpost if [ $SENDCOM = YES ]; then - ${NCP} -p ${INPdir}/${ocnout} ${COMOUTpost}/${ocnpost} + ${FCP} ${INPdir}/${ocnout} ${COMOUTpost}/${ocnpost} fi # Write out the ocnpostdone message file @@ -135,7 +135,7 @@ oicout=oic_${YYYY}_${MM}_${DD}_${HH}.nc oicpost=${out_prefix}.${RUN}.mom6.f000.nc if [ $SENDCOM = YES ]; then - ${NCP} -p ${INPdir}/${oicout} ${COMOUTpost}/${oicpost} + ${FCP} ${INPdir}/${oicout} ${COMOUTpost}/${oicpost} fi cd ${DATA} diff --git a/scripts/exhafs_product.sh b/scripts/exhafs_product.sh index 222808dff..c7cc7dea5 100755 --- a/scripts/exhafs_product.sh +++ b/scripts/exhafs_product.sh @@ -181,11 +181,11 @@ if [ "${tilestr}" = ".tile${nest_grids}" ]; then cat > ./deliver.sh< ./deliver.sh< INPS echo $OUTGRID >> INPS diff --git a/ush/hafs_make_orog_gsl.sh b/ush/hafs_make_orog_gsl.sh index 5ddc86e95..ca652afdc 100755 --- a/ush/hafs_make_orog_gsl.sh +++ b/ush/hafs_make_orog_gsl.sh @@ -58,7 +58,7 @@ ln -sf ${griddir}/$OUTGRID . ln -sf ${topo_am}/"HGT.Beljaars_filtered.lat-lon.30s_res.nc" . ln -sf ${topo_am}/"geo_em.d01.lat-lon.2.5m.HGT_M.nc" . -cp $executable . +${NCP} -p $executable . echo $tile > grid_info.dat echo $res >> grid_info.dat @@ -75,5 +75,3 @@ else exit 0 fi -exit - diff --git a/ush/hafs_runcmd.sh.inc b/ush/hafs_runcmd.sh.inc index 433c577ff..1709edcd9 100644 --- a/ush/hafs_runcmd.sh.inc +++ b/ush/hafs_runcmd.sh.inc @@ -60,7 +60,14 @@ else fi # Some commonly used commands -export NCP=${NCP:-"/bin/cp"} +if [ "${RUN_ENVIR^^}" != "NCO" ]; then + export NCP=${NCP:-"/bin/cp"} + export FCP=${FCP:-"/bin/cp"} +else + # Run by NCO on WCOSS2, use cpreq for NCP and cpfs for FCP + export NCP=${NCP:-"cpreq"} + export FCP=${FCP:-"cpfs"} +fi export NMV=${NMV:-"/bin/mv"} export NLN=${NLN:-"/bin/ln -sf"} export TAR=${TAR:-tar}