Skip to content

Commit

Permalink
Final set of changes for port to Hera (#112)
Browse files Browse the repository at this point in the history
* chgres cube and second set of changes for port to Hera

* input and model configure files for AK/Guam/PR

* Final set of changes for port to Hera

* Update wcoss_dell_p3.ent
  • Loading branch information
BenjaminBlake-NOAA authored Sep 30, 2019
1 parent 651a3d2 commit 2fa0424
Show file tree
Hide file tree
Showing 33 changed files with 1,283 additions and 1,502 deletions.
10 changes: 5 additions & 5 deletions Externals.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[ufs_utils]
branch = feature/HAFS
branch = support/regional
protocol = git
repo_url = gerrit:UFS_UTILS
repo_url = https://github.com/hafs-community/UFS_UTILS.git
local_path = sorc/regional_utils.fd
required = True

[nemsfv3gfs]
branch = regional
branch = develop
protocol = git
repo_url = gerrit:NEMSfv3gfs
local_path = sorc/regional_forecast.fd
Expand All @@ -20,9 +20,9 @@ local_path = sorc/regional_gsi.fd
required = True

[post]
branch = regional
branch = support/regional
protocol = git
repo_url = gerrit:EMC_post
repo_url = https://github.com/hafs-community/EMC_post.git
local_path = sorc/regional_post.fd
required = True

Expand Down
119 changes: 9 additions & 110 deletions jobs/JREGIONAL_MAKE_BC
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ set -xe
####################################
# Specify Execution Areas
####################################
export CHGRESEXEC=$EXECfv3/regional_chgres.x
export CHGRESSH=$USHfv3/regional_chgres.sh
export GETGES=$HOMEfv3/util/ush/getges_linkges_hourlypgrb_new.sh
export CHGRESEXEC=$EXECfv3/regional_chgres_cube.x

####################################
# Run setpdy and initialize PDY variables
Expand All @@ -18,6 +16,9 @@ export GETGES=$HOMEfv3/util/ush/getges_linkges_hourlypgrb_new.sh
#setpdy.sh
#. ./PDY

export month=`echo $CDATE | cut -c 5-6`
export day=`echo $CDATE | cut -c 7-8`

offset=`echo $tmmark | cut -c 3-4`
export CYCLEGUESS=`$NDATE -${offset} $CDATE`
export CDATE=$CYCLEGUESS
Expand All @@ -32,9 +33,6 @@ mkdir -p $DATA
cd $DATA
export BNDYdir=$DATA

export OUTDIR=$DATA/INPUT
mkdir -p $OUTDIR

export pid=$$
export pgmout="OUTPUT.${pid}"
export pgmerr=errfile
Expand Down Expand Up @@ -69,119 +67,20 @@ export LSOIL=4
export REGIONAL=2 # REGIONAL=0 - uniform, stretch, or nest
# REGIONAL=1 - generate data and boundary (for regional case)
# REGIONAL=2 - generate boundaries only (for regional case)
export HALO=4
export ictype=pfv3gfs
export nst_anl=.false. # false or true to include NST analysis
export KMP_AFFINITY=disabled
export NTRAC=7 # output all gfdl mp tracers

env

#####################################
# Generate the BCs
#####################################
if [ -e bcfile.input ]; then
rm -f bcfile.input
fi

# NHRS = length of free forecast
# NHRSda = length of DA cycle forecast (always 1-h)
if [ $tmmark = tm00 ] ; then
hour=3
end_hour=$NHRS
hour_inc=3
else
hour=0
end_hour=$NHRSda
hour_inc=1
fi

while (test "$hour" -le "$end_hour")
do
if [ $hour -lt 10 ]; then
hour_name='00'$hour
elif [ $hour -lt 100 ]; then
hour_name='0'$hour
else
hour_name=$hour
fi

#
# create input file for cfp in order to run multiple copies of exfv3cam_sar_chgres.sh simultaneously
# since we are going to run simultaneously, we want different working directories for each hour
#
if [ $tmmark = tm00 ] ; then
BC_DATA=${DATA}/wrk.chgres.$hour_name
rm -rf $BC_DATA
mkdir -p $BC_DATA
rm -f chgres_bc_f${hour_name}.sh
echo "#! /bin/sh " > chgres_bc_f${hour_name}.sh
echo "env REGIONAL=2 HALO=4 bchour=$hour_name DATA=$BC_DATA $HOMEfv3/scripts/exregional_make_ic_bc.sh" >> chgres_bc_f${hour_name}.sh
chmod u+x chgres_bc_f${hour_name}.sh
echo APRUNO is $APRUNO
echo "${APRUNO} ./chgres_bc_f${hour_name}.sh > out.chgres.$hour_name 2>&1 ${BACKGROUND}" >> bcfile.input
elif [ $tmmark != tm00 ] ; then
# Run the BC creation sequentially
export HALO=4
export bchour=$hour_name
$HOMEfv3/scripts/exregional_make_ic_bc.sh
mv $OUTDIR/gfs_bndy.tile7.${bchour}.nc $INPdir/.
err=$?
if [ $err -ne 0 ] ; then
echo "bndy file not created, abort"
err_exit
fi
fi
hour=`expr $hour + $hour_inc`
nhour=`expr $nhour + 1`
done

# for tm00 we now run BC creation for all hours simultaneously
if [ $tmmark = tm00 ] ; then

export APRUNC="time"
export OMP_NUM_THREADS_CH=${OMP_NUM_THREADS:-24}

if [ "$machine" = theia ] || [ "$machine" = jet ]; then
rm -f bcfile.input_new
nline=0
while [ "$nline" -lt "$nhour" ];
do
# Take the first $TOTAL_TASKS lines from bcfile.input
sed -n -e "1,${TOTAL_TASKS}p" bcfile.input >> bcfile.input_new
echo 'wait' >> bcfile.input_new
sed -i -e "1,${TOTAL_TASKS}d" bcfile.input
nline=`expr $nline + $TOTAL_TASKS`
done
cp bcfile.input_new bcfile.input
#rm -f bcfile.input_new
fi

# mpirun cfp bcfile.input
chmod u+x bcfile.input
echo APRUNF is $APRUNF
ls -l bcfile.input
${APRUNF} ./bcfile.input
wait
#tmp rm -f bcfile.input

cd $OUTDIR
cat filelist.ges* > $COMOUT/filelist.bndy.${tmmark}
cp gfs_bndy.tile7.*.nc $INPdir/.
cd $BNDYdir
hr=03
while [ $hr -le $NHRS ] ; do
cat out.chgres.0${hr}
cd wrk.chgres.0${hr}
cat $pgmout
cd $BNDYdir
let "hr=hr+3"
typeset -Z2 hr
done
else
cp filelist.ges $COMOUT/filelist.bndy.${tmmark}
fi

date
# Execute the script
$HOMEfv3/scripts/exregional_make_bc.sh
export err=$?
#####################################

if [ -e $pgmerr ] ; then
cat $pgmerr
Expand Down
21 changes: 7 additions & 14 deletions jobs/JREGIONAL_MAKE_IC
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
set -xe

. $HOMEfv3/jobs/JREGIONAL_ENVIR
. $USHfv3/run_commands_forecast.sh
. $USHfv3/run_commands_bc.sh

####################################
# Specify Execution Areas
####################################
export CHGRESEXEC=$EXECfv3/regional_chgres.x
export CHGRESSH=$USHfv3/regional_chgres.sh
export GETGES=$HOMEfv3/util/ush/getges_linkges_hourlypgrb_new.sh
export CHGRESEXEC=$EXECfv3/regional_chgres_cube.x

####################################
# Run setpdy and initialize PDY variables
Expand All @@ -18,6 +16,9 @@ export GETGES=$HOMEfv3/util/ush/getges_linkges_hourlypgrb_new.sh
#setpdy.sh
#. ./PDY

export month=`echo $CDATE | cut -c 5-6`
export day=`echo $CDATE | cut -c 7-8`

export CYCLEguess=`$NDATE -12 $CDATE`
export ymd=`echo $CDATE | cut -c 1-8`
export hhcyc=`echo $CDATE | cut -c 9-10`
Expand All @@ -31,9 +32,6 @@ export DATA=${DATA:-${STMP}/tmpnwprd/${job}}
mkdir -p $DATA
cd $DATA

export OUTDIR=$DATA/INPUT
mkdir -p $OUTDIR

export pid=$$
export pgmout="OUTPUT.${pid}"
export pgmerr=errfile
Expand Down Expand Up @@ -73,20 +71,17 @@ export HALO=4
export ictype=pfv3gfs
export nst_anl=.false. # false or true to include NST analysis
export KMP_AFFINITY=disabled
export NTRAC=7 # output all gfdl mp tracers

env

#####################################
# Generate the ICs and BC hour 0
#####################################
# Execute the script.
${HOMEfv3}/scripts/exregional_make_ic_bc.sh
${HOMEfv3}/scripts/exregional_make_ic.sh
export err=$?
#####################################

mv $OUTDIR/gfs*nc $INPdir/.
mv $OUTDIR/sfc*nc $INPdir/.

#####################################
# Generate BCs for NHRSguess for SAR-DA
Expand All @@ -108,9 +103,7 @@ if [ $tmmark = tm12 ] ; then
fi

export bchour=$hour_name
${HOMEfv3}/scripts/exregional_make_ic_bc.sh

mv $OUTDIR/gfs_bndy.tile7.${bchour}.nc $INPdir/.
${HOMEfv3}/scripts/exregional_make_ic.sh

err=$?
if [ $err -ne 0 ] ; then
Expand Down
43 changes: 0 additions & 43 deletions modulefiles/theia/fv3

This file was deleted.

47 changes: 0 additions & 47 deletions modulefiles/theia/regional

This file was deleted.

Loading

0 comments on commit 2fa0424

Please sign in to comment.