Skip to content

Commit

Permalink
Add NewCOM for both New & Old COM
Browse files Browse the repository at this point in the history
 On branch feature/gefs_v13_atmos_prep
 Changes to be committed:
	modified:   jobs/JGEFS_ATMOS_PREP
	modified:   parm/gefs_atmos_prep.parm
	modified:   rocoto/bin/wcoss2/atmos_prep.sh
	modified:   rocoto/user_full.conf
	modified:   scripts/exgefs_atmos_gempak.sh
	modified:   scripts/exgefs_forecast.sh
	modified:   ush/gefs_atmos_prep.sh
	modified:   ush/gefs_nawips.sh
	modified:   ush/gefs_prdgen_driver.sh

Refs: NOAA-EMC#87, NOAA-EMC#94, NOAA-EMC#95, and NOAA-EMC#98
  • Loading branch information
XianwuXue-NOAA committed Jan 24, 2023
1 parent 28cd49c commit 05cb692
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 49 deletions.
28 changes: 6 additions & 22 deletions jobs/JGEFS_ATMOS_PREP
Original file line number Diff line number Diff line change
Expand Up @@ -83,29 +83,13 @@ for config in $configs; do
fi
done

#export USE_EARLY_ENKF="YES" # NO means read f006; YES means reading early restart files
#if [[ $USE_EARLY_ENKF == YES ]]; then
mem=$(echo $RUNMEM|cut -c3-5)
export COMOUT=${COMOUT:-$(compath.py -o $NET/${ver})/${RUN}.${PDY}/$cyc} #/${mem}/$COMPONENT}
#export GESOUT=${GESOUT:-$(compath.py -o $NET/${ver})/${RUN}.${PDY}/$cyc/${mem}/$COMPONENT}

#export DOIAU=${DOIAU:-"YES"}
#export IAUFHRS=${IAUFHRS:-"3,6,9"}
#export PREFIX_ATMINC=${PREFIX_ATMINC:-""}

#else
# export COMOUT=${COMOUT:-$(compath.py -o $NET/${ver})/${RUN}.${PDY}/$cyc/$COMPONENT}
# export GESOUT=${GESOUT:-$(compath.py -o $NET/${ver})/${RUN}.${PDY}/$cyc/nwges}
#fi
export COMOUT=${COMOUT:-$(compath.py -o $NET/${ver})/${RUN}.${PDY}/$cyc}
export COMOUT=${COMOUT:-$(compath.py -o $NET/${ver})/${RUN}.${PDY}/${cyc}}

export COMINgfs=${COMINgfs:-$(compath.py ${envir}/com/gfs/${gfs_ver})/gfs.${PDY}/${cyc}}
#export COMINenkf=${COMINenkf:-$(compath.py ${envir}/com/gfs/${gfs_ver})/enkfgdas.${pdyp}/${cycp}}
#if [[ $USE_EARLY_ENKF == YES ]]; then
# export COMINgdas=${COMINgdas:-$(compath.py ${envir}/com/gfs/${gfs_ver})/gdas.${pdyp}/${cycp}}
export COMINenkfgfs=${COMINenkfgfs:-$(compath.py ${envir}/com/gfs/${gfs_ver})/enkfgfs.${PDY}/${cyc}}
# export NLN=${NLN:-"/bin/ln -sf"}
#fi

NCP=${NCP:-"/bin/cp -rfp"}
export COMINenkfgfs=${COMINenkfgfs:-$(compath.py ${envir}/com/gfs/${gfs_ver})/enkfgfs.${PDY}/${cyc}}

NCP=${NCP:-"/bin/cp -p"}

echo "Environment before calling script"
env | sort
Expand Down
6 changes: 3 additions & 3 deletions parm/gefs_atmos_prep.parm
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ case $cyc in
18) memshift=60;;
esac

export pdycycp=$($NDATE -$fhrp $PDY$cyc)
export pdyp=$(echo $pdycycp|cut -c1-8)
export cycp=$(echo $pdycycp|cut -c9-10)
#export pdycycp=$($NDATE -$fhrp $PDY$cyc)
#export pdyp=$(echo $pdycycp|cut -c1-8)
#export cycp=$(echo $pdycycp|cut -c9-10)

export CDATE=$PDY$cyc

Expand Down
2 changes: 1 addition & 1 deletion rocoto/bin/wcoss2/atmos_prep.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/ksh -l
#! /usr/bin/env bash

set -x
ulimit -s unlimited
Expand Down
1 change: 1 addition & 0 deletions rocoto/user_full.conf
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ saveflux = yes
savesfcsig = no
sigzvd = no
DOIAU = NO
NewCOM = NO
# tempororay setting for the low-resolution
#CASEHR = C384
CASELR = C384
Expand Down
36 changes: 28 additions & 8 deletions scripts/exgefs_atmos_gempak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ for member in $memberlist; do
export RUNM=ge${member}

if [[ $SENDCOM == "YES" ]]; then
gempak_out=${COMOUT}/${member}/$COMPONENT/products/gempak
gempak_log_out=${COMOUT}/${member}/$COMPONENT/misc/gempak
if [[ ${NewCOM:-"YES"} == "YES" ]]; then
gempak_out=${COMOUT}/${member}/$COMPONENT/products/gempak
gempak_log_out=${COMOUT}/${member}/$COMPONENT/misc/gempak
else
gempak_out=${COMOUT}/$COMPONENT/gempak
gempak_log_out=${COMOUT}/$COMPONENT/misc/gempak
fi
else
gempak_out=${DATA}/gempak_out
gempak_log_out=${DATA}/misc/gempak
Expand All @@ -40,18 +45,33 @@ for member in $memberlist; do
for resolution in ${GEMPAK_RES}; do
case $resolution in
(1p00)
gempak_in=$COMIN/${member}/$COMPONENT/products/1p00a #pgrb2a1p0
export pdgrbType=${resolution}a #pgrb2a
if [[ ${NewCOM:-"YES"} == "YES" ]]; then
gempak_in=$COMIN/${member}/$COMPONENT/products/1p00a #pgrb2a1p0
export pdgrbType=${resolution}a #pgrb2a
else
gempak_in=$COMIN/$COMPONENT/pgrb2a1p0
export pdgrbType=pgrb2a
fi
export fend=${fhmaxh:-384}
;;
(0p50)
gempak_in=$COMIN/${member}/$COMPONENT/products/0p50a #pgrb2ap5
export pdgrbType=${resolution}a #pgrb2a
if [[ ${NewCOM:-"YES"} == "YES" ]]; then
gempak_in=$COMIN/${member}/$COMPONENT/products/0p50a #pgrb2ap5
export pdgrbType=${resolution}a #pgrb2a
else
gempak_in=$COMIN/$COMPONENT/pgrb2ap5
export pdgrbType=pgrb2a
fi
export fend=${fhmaxh:-384}
;;
(0p25)
gempak_in=$COMIN/${member}/$COMPONENT/products/0p25s #pgrb2sp25
export pdgrbType=${resolution}s #pgrb2s
if [[ ${NewCOM:-"YES"} == "YES" ]]; then
gempak_in=$COMIN/${member}/$COMPONENT/products/0p25s #pgrb2sp25
export pdgrbType=${resolution}s #pgrb2s
else
gempak_in=$COMIN/$COMPONENT/pgrb2sp25
export pdgrbType=pgrb2s
fi
export fend=${FHMAXHF:-240}
;;
(*)
Expand Down
26 changes: 20 additions & 6 deletions scripts/exgefs_forecast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,19 @@ export COMPONENTwave=${COMPONENTwave:-${RUN}.wave}
export ERRSCRIPT=err_chk
export LOGSCRIPT=startmsg

export memdir=${COMIN}/${mem}/${COMPONENT}
export gmemdir=${COMIN}/${mem}/${COMPONENT}
export ICSDIR=${COMIN}/${mem}/${COMPONENT}
export RSTDIR=${COMIN}/${mem}/${COMPONENT}/RESTART
#export memdir=${COMIN}/${mem}/${COMPONENT}
#export gmemdir=${COMIN}/${mem}/${COMPONENT}
if [[ ${NewCOM} == "YES" ]]; then
export memdir=${COMIN}/${mem}/${COMPONENT}
export gmemdir=${COMIN}/${mem}/${COMPONENT}
export ICSDIR=${COMIN}/${mem}/${COMPONENT}/INPUT
export RSTDIR=${COMIN}/${mem}/${COMPONENT}/RESTART
else
export memdir=${COMIN}/${COMPONENT}/sfcsig
export gmemdir=${COMIN}/${COMPONENT}/sfcsig
export ICSDIR=${COMIN}/${COMPONENT}/init/${mem}
export RSTDIR=${COMIN}/${COMPONENT}/init/${mem}/RESTART
fi
export RSTDIR_ATM=$RSTDIR

mkdir -m 755 -p ${RSTDIR}
Expand Down Expand Up @@ -210,8 +219,13 @@ export VERBOSE=YES

################################################################################
export CDATE=$PDY$cyc
export rCDUMP=gefs #$RUNMEM
export CDUMP=gefs #$RUNMEM
if [[ ${NewCOM} == "YES" ]]; then
export rCDUMP=gefs
export CDUMP=gefs
else
export rCDUMP=${RUNMEM}
export CDUMP=${RUNMEM}
fi

if [[ $cplwav = ".true." ]]; then
# CPU partitioning
Expand Down
12 changes: 10 additions & 2 deletions ush/gefs_atmos_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ export nmem=$(echo $mem|cut -c 2-)
nmem=${nmem#0}

#export INIDIR=$DATA
export OUTDIR=${COMOUT}/$mem/atmos/INPUT
if [[ ${NewCOM} == "YES" ]]; then
export OUTDIR=${COMOUT}/$mem/atmos/INPUT
else
export OUTDIR=${COMOUT}/atmos/init/${mem}
fi
#mkdir -p $INIDIR
mkdir -p $OUTDIR

Expand Down Expand Up @@ -150,7 +154,11 @@ if [[ $SENDCOM == "YES" ]]; then
#fi
if [[ $CONVERT_SFC == ".true." ]]; then
for mem2 in $memberlist; do
COMDIR2=$COMOUT/${mem2}/atmos/INPUT #init/$mem2
if [[ ${NewCOM} == "YES" ]]; then
COMDIR2=$COMOUT/${mem2}/atmos/INPUT #init/$mem2
else
COMDIR2=$COMOUT/atmos/init/${mem2}
fi
mkdir -p $COMDIR2
for tile in tile1 tile2 tile3 tile4 tile5 tile6; do
#$NCP $GESOUT/init/$mem/sfc_data.${tile}.nc $COMDIR2
Expand Down
13 changes: 11 additions & 2 deletions ush/gefs_nawips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ cp $GEMPAKgefs/fix/*.tbl .

NAGRIB_TABLE=${NAGRIB_TABLE:-${GEMPAKgefs}/fix/nagrib.tbl}
NAGRIB=nagrib2_nc
CDUMP_ENS=gefs #${RUNM}

if [[ ${NewCOM:-"YES"} == "YES" ]]; then
CDUMP_ENS=gefs #${RUNM}
else
CDUMP_ENS=${RUNM}
fi
#

entry=$(grep "^$RUNM " $NAGRIB_TABLE | awk 'index($1,"#") != 1 {print $0}')
Expand Down Expand Up @@ -117,7 +122,11 @@ while [ $fhcnt -le $fend ] ; do
GEMGRD=${RUNM}${model}_${PDY}${cyc}f${fhr3}
else
# This is for gefs
GRIBIN=${gempak_in}/${CDUMP_ENS}.${cycle}.${pgrdbType}.grb2f${fhr} #${RUNM}.${cycle}.${pgrdbType}.${resolution}.f${fhr}
if [[ ${NewCOM:-"YES"} == "YES" ]]; then
GRIBIN=${gempak_in}/${CDUMP_ENS}.${cycle}.${pgrdbType}.grb2f${fhr} #${RUNM}.${cycle}.${pgrdbType}.${resolution}.f${fhr}
else
GRIBIN=${gempak_in}/${CDUMP_ENS}.${cycle}.${pgrdbType}.${resolution}.f${fhr}
fi
if [ $resolution = "1p00" ]; then
GEMGRD=${CDUMP_ENS}_${PDY}${cyc}f${fhr} #${RUNM}_${PDY}${cyc}f${fhr}
else
Expand Down
19 changes: 14 additions & 5 deletions ush/gefs_prdgen_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export infile="${3}" # ${DATA}/${stream}/${stream}.in
# grid_spec= # PRDGEN_GRID_SPEC[$stream]
# hours= # PRDGEN_HOURS[$stream]
# submc= # PRDGEN_SUBMC[$stream]
# submc= # PRDGEN_SUBMC[$stream]
# pgad= # PRDGEN_A_DIR[$stream]
# pgapre= # PRDGEN_A_PREFIX[$stream]
# parmlist_a00= # PRDGEN_A_LIST_F00[$stream]
Expand Down Expand Up @@ -75,7 +74,11 @@ EOF
export MP_LABELIO=YES
export GRID=$jobgrid # GRID is part of the DBN message

CDUMP="gefs" #${RUNMEM}
if [[ ${NewCOM} == "YES" ]]; then
CDUMP="gefs"
else
CDUMP=${RUNMEM}
fi
############################################################
# clean up missing markers from previous run
############################################################
Expand Down Expand Up @@ -252,9 +255,15 @@ for hour in $hours; do
export mcfile=""
export makepgrb2b="no"
else
export mafile=${COMIN}/$COMPONENT/${CDUMP}.$cycle.master.grb2f$fhr
export mifile=${COMIN}/$COMPONENT/${CDUMP}.$cycle.master.grb2if$fhr #${mafile}
export mcfile=${COMIN}/$COMPONENT/misc/post/${CDUMP}.$cycle.master.control.f$fhr #${mafile}
if [[ ${NewCOM} == "YES" ]]; then
export mafile=${COMIN}/$COMPONENT/${CDUMP}.$cycle.master.grb2f$fhr
export mifile=${COMIN}/$COMPONENT/${CDUMP}.$cycle.master.grb2if$fhr #${mafile}
export mcfile=${COMIN}/$COMPONENT/misc/post/${CDUMP}.$cycle.master.control.f$fhr #${mafile}
else
export mafile=${COMIN}/$COMPONENT/sfcsig/${CDUMP}.$cycle.master.grb2f$fhr
export mifile=${COMIN}/$COMPONENT/sfcsig/${CDUMP}.$cycle.master.grb2if$fhr #${mafile}
export mcfile=${COMIN}/$COMPONENT/misc/post/${CDUMP}.$cycle.master.control.f$fhr #${mafile}
fi
if [[ -z "$pgbd" ]]; then
export makepgrb2b="no"
else
Expand Down

0 comments on commit 05cb692

Please sign in to comment.