Skip to content

Commit

Permalink
Fix the bug for depend of gempak & improve enspost
Browse files Browse the repository at this point in the history
 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: NOAA-EMC#104
  • Loading branch information
XianwuXue-NOAA committed Feb 1, 2023
1 parent 63b2d47 commit 55d7354
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions rocoto/py/GEFS_XML_For_Tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,8 +1306,8 @@ def get_param_of_task(dicBase, taskname):
for i in range(npert):
sDep += '\n\t<datadep><cyclestr>&DATA_DIR;/gefs.@Y@m@d/@H/p{0:02}/atmos/misc/prd0p5/[email protected]</cyclestr></datadep>'.format(i + 1)
sDep += '\n\t<datadep><cyclestr>&DATA_DIR;/gefs.@Y@m@d/@H/c00/atmos/misc/prd0p5/[email protected]</cyclestr></datadep>'
sDep += '\n\t<datadep><cyclestr>&DATA_DIR;/gefs.@Y@m@d/@H/avg/atmos/pgrb2ap5/gefs.t@Hz.pgrb2a.0p50.f000</cyclestr></datadep>'
sDep += '\n\t<datadep><cyclestr>&DATA_DIR;/gefs.@Y@m@d/@H/spr/atmos/pgrb2ap5/gefs.t@Hz.pgrb2a.0p50.f000</cyclestr></datadep>'
sDep += '\n\t<datadep><cyclestr>&DATA_DIR;/gefs.@Y@m@d/@H/avg/atmos/products/0p50a/gefs.t@Hz.0p50a.grb2f000</cyclestr></datadep>'
sDep += '\n\t<datadep><cyclestr>&DATA_DIR;/gefs.@Y@m@d/@H/spr/atmos/products/0p50a/gefs.t@Hz.0p50a.grb2f000</cyclestr></datadep>'
else:
for i in range(npert):
sDep += '\n\t<datadep><cyclestr>&DATA_DIR;/gefs.@Y@m@d/@H/atmos/misc/prd0p5/gep{0:02}[email protected]</cyclestr></datadep>'.format(i + 1)
Expand Down
19 changes: 12 additions & 7 deletions scripts/exgefs_atmos_enspost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -503,4 +508,4 @@ done # for file in $postvarlist

echo "$(date -u) end ${.sh.file}"

exit 0
exit 0

0 comments on commit 55d7354

Please sign in to comment.