diff --git a/sorc/build_all.sh b/sorc/build_all.sh index e22d20daa7..fcb7e5a01f 100755 --- a/sorc/build_all.sh +++ b/sorc/build_all.sh @@ -32,14 +32,16 @@ function _usage() { _build_ufs_opt="" _verbose_opt="" +_build_ops_opt="" # Reset option counter in case this script is sourced OPTIND=1 -while getopts ":a:c:hv" option; do +while getopts ":a:c:hov" option; do case "${option}" in a) _build_ufs_opt+="-a ${OPTARG} ";; c) _partial_opt+="-c ${OPTARG} ";; h) _usage;; # s) _build_ufs_opt+="-s ${OPTARG} ";; + o) _build_ops_opt="-o";; v) _verbose_opt="-v";; \?) echo "[$BASH_SOURCE]: Unrecognized option: ${option}" @@ -133,15 +135,15 @@ $Build_gsi && { } #------------------------------------ -# build ncep_post +# build UPP #------------------------------------ -$Build_ncep_post && { - echo " .... Building ncep_post .... " - ./build_ncep_post.sh $_verbose_opt > $logs_dir/build_ncep_post.log 2>&1 +$Build_upp && { + echo " .... Building UPP .... " + ./build_upp.sh $_verbose_opt $_build_ops_opt > $logs_dir/build_upp.log 2>&1 rc=$? if [[ $rc -ne 0 ]] ; then - echo "Fatal error in building ncep_post." - echo "The log file is in $logs_dir/build_ncep_post.log" + echo "Fatal error in building UPP." + echo "The log file is in $logs_dir/build_upp.log" fi ((err+=$rc)) } diff --git a/sorc/build_ncep_post.sh b/sorc/build_upp.sh similarity index 85% rename from sorc/build_ncep_post.sh rename to sorc/build_upp.sh index 7132371b7a..9732730ba2 100755 --- a/sorc/build_ncep_post.sh +++ b/sorc/build_upp.sh @@ -9,5 +9,5 @@ if [ ! -d "../exec" ]; then mkdir ../exec fi -cd gfs_post.fd/tests +cd ufs_model.fd/FV3/upp/tests ./compile_upp.sh diff --git a/sorc/checkout.sh b/sorc/checkout.sh index 270cd30f3e..dee295d8a8 100755 --- a/sorc/checkout.sh +++ b/sorc/checkout.sh @@ -33,6 +33,20 @@ if [[ ! -d ufs_model.fd ]] ; then cd ufs_model.fd git checkout ${ufs_model_hash:-Prototype-P8b} git submodule update --init --recursive + + ################################################################################ + # checkout_gtg + ## yes: The gtg code at NCAR private repository is available for ops. GFS only. + # Only approved persons/groups have access permission. + ## no: No need to check out gtg code for general GFS users. + ################################################################################ + checkout_gtg=${checkout_gtg:-"NO"} + if [[ ${checkout_gtg} == "YES" ]] ; then + cd FV3/upp + ./manage_externals/checkout_externals + cp sorc/post_gtg.fd/*F90 sorc/ncep_post.fd/. + cp sorc/post_gtg.fd/gtg.config.gfs parm/gtg.config.gfs + fi cd ${topdir} else echo 'Skip. Directory ufs_model.fd already exists.' @@ -72,29 +86,6 @@ else echo 'Skip. Directory ufs_utils.fd already exists.' fi -echo UPP checkout ... -if [[ ! -d gfs_post.fd ]] ; then - rm -f ${topdir}/checkout-gfs_post.log - git clone https://github.com/NOAA-EMC/UPP.git gfs_post.fd >> ${logdir}/checkout-gfs_post.log 2>&1 - cd gfs_post.fd - git checkout upp_v10.0.11 - ################################################################################ - # checkout_gtg - ## yes: The gtg code at NCAR private repository is available for ops. GFS only. - # Only approved persons/groups have access permission. - ## no: No need to check out gtg code for general GFS users. - ################################################################################ - checkout_gtg=${checkout_gtg:-"NO"} - if [[ ${checkout_gtg} == "YES" ]] ; then - ./manage_externals/checkout_externals - cp sorc/post_gtg.fd/*F90 sorc/ncep_post.fd/. - cp sorc/post_gtg.fd/gtg.config.gfs parm/gtg.config.gfs - fi - cd ${topdir} -else - echo 'Skip. Directory gfs_post.fd already exists.' -fi - checkout_wafs=${checkout_wafs:-"NO"} if [[ ${checkout_wafs} == "YES" ]] ; then echo EMC_gfs_wafs checkout ... diff --git a/sorc/cpl_build.cfg b/sorc/cpl_build.cfg deleted file mode 100644 index 402bbcfebf..0000000000 --- a/sorc/cpl_build.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# -# ***** configuration of coupled workflow build ***** - - Building ufs_model (ufs_model) ........................ yes - Building ww3_prepost (ww3_prepost) .................... yes - Building gsi (gsi) .................................... no - Building gldas (gldas) ................................ no - Building ncep_post (ncep_post) ........................ no - Building ufs_utils (ufs_utils) ........................ no - Building gfs_wafs (gfs_wafs) .......................... no - Building workflow_utils (workflow_utils)............... yes - Building gfs_util (gfs_util) .......................... no - - -# -- END -- - diff --git a/sorc/gfs_build.cfg b/sorc/gfs_build.cfg index 9ac05a3305..6c26c4306f 100644 --- a/sorc/gfs_build.cfg +++ b/sorc/gfs_build.cfg @@ -5,7 +5,7 @@ Building ww3_prepost (ww3_prepost) .................... yes Building gsi (gsi) .................................... yes Building gldas (gldas) ................................ yes - Building ncep_post (ncep_post) ........................ yes + Building UPP (upp) .................................... yes Building ufs_utils (ufs_utils) ........................ yes Building gfs_wafs (gfs_wafs) .......................... yes Building workflow_utils (workflow_utils)............... yes diff --git a/sorc/link_workflow.sh b/sorc/link_workflow.sh index 9877adacc1..aa6239f7f1 100755 --- a/sorc/link_workflow.sh +++ b/sorc/link_workflow.sh @@ -38,6 +38,9 @@ SLINK="ln -fs" pwd=$(pwd -P) +# Link post +$LINK ufs_model.fd/FV3/upp upp.fd + #------------------------------ #--model fix fields #------------------------------ @@ -88,32 +91,33 @@ if [ -d ${pwd}/ufs_utils.fd ]; then ./link_fixdirs.sh $RUN_ENVIR $machine fi + #--------------------------------------- #--add files from external repositories #--------------------------------------- cd ${pwd}/../jobs ||exit 8 - $LINK ../sorc/gfs_post.fd/jobs/JGLOBAL_ATMOS_POST_MANAGER . - $LINK ../sorc/gfs_post.fd/jobs/JGLOBAL_ATMOS_NCEPPOST . - $LINK ../sorc/gldas.fd/jobs/JGDAS_ATMOS_GLDAS . + $LINK ../sorc/upp.fd/jobs/JGLOBAL_ATMOS_POST_MANAGER . + $LINK ../sorc/upp.fd/jobs/JGLOBAL_ATMOS_NCEPPOST . + $LINK ../sorc/gldas.fd/jobs/JGDAS_ATMOS_GLDAS . cd ${pwd}/../parm ||exit 8 [[ -d post ]] && rm -rf post - $LINK ../sorc/gfs_post.fd/parm post + $LINK ../sorc/upp.fd/parm post [[ -d gldas ]] && rm -rf gldas $LINK ../sorc/gldas.fd/parm gldas cd ${pwd}/../scripts ||exit 8 - $LINK ../sorc/gfs_post.fd/scripts/exgdas_atmos_nceppost.sh . + $LINK ../sorc/upp.fd/scripts/exgdas_atmos_nceppost.sh . if [ $model = "coupled" ]; then $LINK exgfs_nceppost_cpl.sh exgfs_atmos_nceppost.sh else - $LINK ../sorc/gfs_post.fd/scripts/exgfs_atmos_nceppost.sh . + $LINK ../sorc/upp.fd/scripts/exgfs_atmos_nceppost.sh . fi - $LINK ../sorc/gfs_post.fd/scripts/exglobal_atmos_pmgr.sh . + $LINK ../sorc/upp.fd/scripts/exglobal_atmos_pmgr.sh . $LINK ../sorc/ufs_utils.fd/scripts/exemcsfc_global_sfc_prep.sh . $LINK ../sorc/gldas.fd/scripts/exgdas_atmos_gldas.sh . cd ${pwd}/../ush ||exit 8 for file in fv3gfs_downstream_nems.sh fv3gfs_dwn_nems.sh gfs_nceppost.sh \ gfs_transfer.sh mod_icec.sh link_crtm_fix.sh trim_rh.sh fix_precip.sh; do - $LINK ../sorc/gfs_post.fd/ush/$file . + $LINK ../sorc/upp.fd/ush/$file . done if [ $model = "coupled" ]; then rm fv3gfs_downstream_nems.sh @@ -253,7 +257,7 @@ done $LINK ../sorc/ufs_model.fd/build/ufs_model . [[ -s gfs_ncep_post ]] && rm -f gfs_ncep_post -$LINK ../sorc/gfs_post.fd/exec/upp.x gfs_ncep_post +$LINK ../sorc/upp.fd/exec/upp.x gfs_ncep_post if [ -d ${pwd}/gfs_wafs.fd ]; then for wafsexe in \ @@ -340,7 +344,7 @@ cd ${pwd}/../sorc || exit 8 [[ -d recentersigp.fd ]] && rm -rf recentersigp.fd $SLINK gsi.fd/util/EnKF/gfs/src/recentersigp.fd recentersigp.fd - $SLINK gfs_post.fd/sorc/ncep_post.fd gfs_ncep_post.fd + $SLINK upp.fd/sorc/ncep_post.fd gfs_ncep_post.fd for prog in fregrid make_hgrid make_solo_mosaic ; do $SLINK ufs_utils.fd/sorc/fre-nctools.fd/tools/$prog ${prog}.fd diff --git a/sorc/partial_build.sh b/sorc/partial_build.sh index c0eedf6236..4e62333d9c 100755 --- a/sorc/partial_build.sh +++ b/sorc/partial_build.sh @@ -8,7 +8,7 @@ declare -a Build_prg=("Build_ufs_model" \ "Build_ww3_prepost" \ "Build_reg2grb2" \ "Build_gldas" \ - "Build_ncep_post" \ + "Build_upp" \ "Build_ufs_utils" \ "Build_gfs_wafs" \ "Build_workflow_utils" \