Skip to content

Commit

Permalink
Updates required for v16 retro data and v15 data.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Feb 13, 2023
1 parent a886e6a commit 5d3b898
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 68 deletions.
21 changes: 20 additions & 1 deletion util/gdas_init/copy_coldstart_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ dd=$5
hh=$6
INPUT_DATA_DIR=$7

if [ ${MEMBER} == 'hires' ]; then
MEMBER='gdas'
fi

echo 'in new script'
echo $MEMBER $OUTDIR

Expand All @@ -33,11 +37,26 @@ if [ ${MEMBER} == 'gdas' ] || [ ${MEMBER} == 'gfs' ]; then
rm -fr $SUBDIR
SAVEDIR=$SUBDIR/atmos/INPUT
copy_data
touch $SAVEDIR/../${MEMBER}.t${hh}z.loginc.txt
if [ ${MEMBER} == 'gdas' ]; then
cp ${INPUT_DATA_DIR}/*abias* $SAVEDIR/..
cp ${INPUT_DATA_DIR}/*radstat $SAVEDIR/..
fi
touch $SAVEDIR/../${MEMBER}.t${hh}z.loginc.txt
elif [ ${MEMBER} == 'enkf' ]; then # v16 retro data only.
MEMBER=1
while [ $MEMBER -le 80 ]; do
if [ $MEMBER -lt 10 ]; then
MEMBER_CH="00${MEMBER}"
else
MEMBER_CH="0${MEMBER}"
fi
SUBDIR=$OUTDIR/enkfgdas.${yy}${mm}${dd}/${hh}/mem${MEMBER_CH}
rm -fr $SUBDIR
SAVEDIR=$SUBDIR/atmos/INPUT
copy_data
touch $SAVEDIR/../enkfgdas.t${hh}z.loginc.txt
MEMBER=$(( $MEMBER + 1 ))
done
else
SUBDIR=$OUTDIR/enkfgdas.${yy}${mm}${dd}/${hh}/mem${MEMBER}
rm -fr $SUBDIR
Expand Down
15 changes: 1 addition & 14 deletions util/gdas_init/run_v15.chgres.gfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,13 @@ WORKDIR=${WORKDIR:-$OUTDIR/work.gfs}

CTAR=${CRES_HIRES}
INPUT_DATA_DIR="${EXTRACT_DIR}/gfs.${yy}${mm}${dd}/${hh}"
OUTDIR=$OUTDIR/gfs.${yy}${mm}${dd}/${hh}/atmos
ATMFILE="gfs.t${hh}z.atmanl.nemsio"
SFCFILE="gfs.t${hh}z.sfcanl.nemsio"

rm -fr $WORKDIR
mkdir -p $WORKDIR
cd $WORKDIR

rm -fr $OUTDIR
mkdir -p $OUTDIR
mkdir -p $OUTDIR/INPUT

cat << EOF > fort.41
&config
Expand Down Expand Up @@ -57,15 +52,7 @@ if [ $rc != 0 ]; then
exit $rc
fi

mv gfs_ctrl.nc ${OUTDIR}/INPUT

for tile in 'tile1' 'tile2' 'tile3' 'tile4' 'tile5' 'tile6'
do
mv out.atm.${tile}.nc ${OUTDIR}/INPUT/gfs_data.${tile}.nc
mv out.sfc.${tile}.nc ${OUTDIR}/INPUT/sfc_data.${tile}.nc
done

touch $OUTDIR/gfs.t${hh}z.loginc.txt
$UFS_DIR/util/gdas_init/copy_coldstart_files.sh gfs $OUTDIR $yy $mm $dd $hh $INPUT_DATA_DIR

rm -fr $WORKDIR

Expand Down
21 changes: 1 addition & 20 deletions util/gdas_init/run_v15.chgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,17 @@ if [ ${MEMBER} == 'gdas' ]; then
CTAR=${CRES_HIRES}
INPUT_DATA_DIR="${EXTRACT_DIR}/gdas.${yy_d}${mm_d}${dd_d}/${hh_d}/RESTART"
RADSTAT_DATA_DIR="${EXTRACT_DIR}/gdas.${yy}${mm}${dd}/${hh}"
OUTDIR=$OUTDIR/gdas.${yy}${mm}${dd}/${hh}/atmos
else
CINP=${CINP:-"C384"}
CTAR=${CRES_ENKF}
INPUT_DATA_DIR="${EXTRACT_DIR}/enkfgdas.${yy_d}${mm_d}${dd_d}/${hh_d}/mem${MEMBER}/RESTART"
RADSTAT_DATA_DIR="${EXTRACT_DIR}/enkfgdas.${yy}${mm}${dd}/${hh}/mem${MEMBER}"
OUTDIR=$OUTDIR/enkfgdas.${yy}${mm}${dd}/${hh}/mem${MEMBER}/atmos
fi

rm -fr $WORKDIR
mkdir -p $WORKDIR
cd $WORKDIR

rm -fr $OUTDIR
mkdir -p $OUTDIR
mkdir -p $OUTDIR/INPUT

cat << EOF > fort.41
&config
Expand Down Expand Up @@ -77,20 +71,7 @@ if [ $rc != 0 ]; then
exit $rc
fi

mv gfs_ctrl.nc ${OUTDIR}/INPUT

for tile in 'tile1' 'tile2' 'tile3' 'tile4' 'tile5' 'tile6'
do
mv out.atm.${tile}.nc ${OUTDIR}/INPUT/gfs_data.${tile}.nc
mv out.sfc.${tile}.nc ${OUTDIR}/INPUT/sfc_data.${tile}.nc
done

if [ ${MEMBER} == 'gdas' ]; then
cp ${RADSTAT_DATA_DIR}/* $OUTDIR
touch $OUTDIR/gdas.t${hh}z.loginc.txt
else
touch $OUTDIR/enkfgdas.t${hh}z.loginc.txt
fi
$UFS_DIR/util/gdas_init/copy_coldstart_files.sh $MEMBER $OUTDIR $yy $mm $dd $hh $RADSTAT_DATA_DIR

rm -fr $WORKDIR

Expand Down
34 changes: 1 addition & 33 deletions util/gdas_init/run_v16retro.chgres.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
#!/bin/bash

copy_data()
{

mkdir -p $SAVEDIR
cp gfs_ctrl.nc $SAVEDIR

for tile in 'tile1' 'tile2' 'tile3' 'tile4' 'tile5' 'tile6'
do
cp out.atm.${tile}.nc ${SAVEDIR}/gfs_data.${tile}.nc
cp out.sfc.${tile}.nc ${SAVEDIR}/sfc_data.${tile}.nc
done
}

#---------------------------------------------------------------------------
# Run chgres for gdas/enkf members using v16 parallel data as input.
# The enkf data is not saved. So the coldstart files for all
Expand Down Expand Up @@ -102,26 +89,7 @@ if [ $rc != 0 ]; then
exit $rc
fi

if [ ${MEMBER} == 'hires' ]; then
SAVEDIR=$OUTDIR/gdas.${yy}${mm}${dd}/${hh}/atmos/INPUT
copy_data
cp $RADSTAT_DATA_DIR/*abias* $SAVEDIR/..
cp $RADSTAT_DATA_DIR/*radstat $SAVEDIR/..
touch $SAVEDIR/../gdas.t${hh}z.loginc.txt
else
MEMBER=1
while [ $MEMBER -le 80 ]; do
if [ $MEMBER -lt 10 ]; then
MEMBER_CH="00${MEMBER}"
else
MEMBER_CH="0${MEMBER}"
fi
SAVEDIR=$OUTDIR/enkfgdas.${yy}${mm}${dd}/${hh}/mem${MEMBER_CH}/atmos/INPUT
copy_data
touch $SAVEDIR/../enkfgdas.t${hh}z.loginc.txt
MEMBER=$(( $MEMBER + 1 ))
done
fi
$UFS_DIR/util/gdas_init/copy_coldstart_files.sh $MEMBER $OUTDIR $yy $mm $dd $hh $RADSTAT_DATA_DIR

rm -fr $WORKDIR

Expand Down

0 comments on commit 5d3b898

Please sign in to comment.