From 55d735494d51f72b6b25a6214d6d46f958d868ce Mon Sep 17 00:00:00 2001 From: "Xianwu.Xue" Date: Wed, 1 Feb 2023 10:28:30 -0500 Subject: [PATCH] Fix the bug for depend of gempak & improve enspost On branch feature/gefs_v13_atmos_prep Changes to be committed: modified: rocoto/py/GEFS_XML_For_Tasks.py modified: scripts/exgefs_atmos_enspost.sh Refs: #104 --- rocoto/py/GEFS_XML_For_Tasks.py | 4 ++-- scripts/exgefs_atmos_enspost.sh | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/rocoto/py/GEFS_XML_For_Tasks.py b/rocoto/py/GEFS_XML_For_Tasks.py index 4586b24e7..63809a7e1 100755 --- a/rocoto/py/GEFS_XML_For_Tasks.py +++ b/rocoto/py/GEFS_XML_For_Tasks.py @@ -1306,8 +1306,8 @@ def get_param_of_task(dicBase, taskname): for i in range(npert): sDep += '\n\t&DATA_DIR;/gefs.@Y@m@d/@H/p{0:02}/atmos/misc/prd0p5/gefs.t@Hz.prdgen.control.f000'.format(i + 1) sDep += '\n\t&DATA_DIR;/gefs.@Y@m@d/@H/c00/atmos/misc/prd0p5/gefs.t@Hz.prdgen.control.f000' - sDep += '\n\t&DATA_DIR;/gefs.@Y@m@d/@H/avg/atmos/pgrb2ap5/gefs.t@Hz.pgrb2a.0p50.f000' - sDep += '\n\t&DATA_DIR;/gefs.@Y@m@d/@H/spr/atmos/pgrb2ap5/gefs.t@Hz.pgrb2a.0p50.f000' + sDep += '\n\t&DATA_DIR;/gefs.@Y@m@d/@H/avg/atmos/products/0p50a/gefs.t@Hz.0p50a.grb2f000' + sDep += '\n\t&DATA_DIR;/gefs.@Y@m@d/@H/spr/atmos/products/0p50a/gefs.t@Hz.0p50a.grb2f000' else: for i in range(npert): sDep += '\n\t&DATA_DIR;/gefs.@Y@m@d/@H/atmos/misc/prd0p5/gep{0:02}.t@Hz.prdgen.control.f000'.format(i + 1) diff --git a/scripts/exgefs_atmos_enspost.sh b/scripts/exgefs_atmos_enspost.sh index 0abddc6c3..b6e01a2cf 100755 --- a/scripts/exgefs_atmos_enspost.sh +++ b/scripts/exgefs_atmos_enspost.sh @@ -125,8 +125,13 @@ while [[ $fh -le $FHOUR ]]; do for res in lr; do if [[ $res = lr ]]; then EXT= - FXT=.2p50. - lr=2p5 + if [[ ${NewCOM:-"YES"} == "YES" ]]; then + FXT=2p50.grb2 + lr=products/2p50 + else + FXT=pgrb2.2p50. + lr=pgrb22p5 + fi ext_h=$ext_h nenspost=$nenspostlr lfm=$lfmlr @@ -175,9 +180,9 @@ while [[ $fh -le $FHOUR ]]; do for mem in $memberlist; do (( nmem = nmem + 1 )) if [[ ${NewCOM:-"YES"} == "YES" ]]; then - testfile=${COMIN}/${mem}/${COMPONENT}/products/pgrb2${lr}/gefs.${cycle}.pgrb2${FXT}f$fh${EXT}.idx + testfile=${COMIN}/${mem}/${COMPONENT}/${lr}/gefs.${cycle}.${FXT}f$fh${EXT}.idx else - testfile=${COMIN}/${COMPONENT}/pgrb2${lr}/ge${mem}.${cycle}.pgrb2${FXT}f$fh${EXT}.idx + testfile=${COMIN}/${COMPONENT}/${lr}/ge${mem}.${cycle}.${FXT}f$fh${EXT}.idx fi if [ -f $testfile ]; then echo testfile=$testfile found @@ -285,9 +290,9 @@ while [[ $fh -le $FHOUR ]]; do #DHOU, 20141028, select required variables from pgrb2a files if [[ "$mem" != "gfs" || $fh -le $gfsfhmaxh || $(($fh % 12)) -eq 0 ]]; then if [[ ${NewCOM:-"YES"} == "YES" ]]; then - pgtem=${COMIN}/${mem}/${COMPONENT}/products/pgrb2$lr/gefs.${cycle}.pgrb2${FXT}f$fh$EXT + pgtem=${COMIN}/${mem}/${COMPONENT}/${lr}/gefs.${cycle}.${FXT}f$fh$EXT else - pgtem=${COMIN}/${COMPONENT}/pgrb2$lr/ge${mem}.${cycle}.pgrb2${FXT}f$fh$EXT + pgtem=${COMIN}/${COMPONENT}/${lr}/ge${mem}.${cycle}.${FXT}f$fh$EXT fi if [[ -s $pgtem ]]; then $WGRIB2 -s $pgtem | grep -F -f $parmlist | $WGRIB2 $pgtem -s -i -grib pgrb2a_$mem @@ -503,4 +508,4 @@ done # for file in $postvarlist echo "$(date -u) end ${.sh.file}" -exit 0 \ No newline at end of file +exit 0