diff --git a/util/gdas_init/copy_coldstart_files.sh b/util/gdas_init/copy_coldstart_files.sh index 08d7820bf..523c9caf6 100755 --- a/util/gdas_init/copy_coldstart_files.sh +++ b/util/gdas_init/copy_coldstart_files.sh @@ -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 @@ -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 diff --git a/util/gdas_init/run_v15.chgres.gfs.sh b/util/gdas_init/run_v15.chgres.gfs.sh index dfc35c2f7..ef3a6fcfa 100755 --- a/util/gdas_init/run_v15.chgres.gfs.sh +++ b/util/gdas_init/run_v15.chgres.gfs.sh @@ -15,7 +15,6 @@ 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" @@ -23,10 +22,6 @@ rm -fr $WORKDIR mkdir -p $WORKDIR cd $WORKDIR -rm -fr $OUTDIR -mkdir -p $OUTDIR -mkdir -p $OUTDIR/INPUT - cat << EOF > fort.41 &config @@ -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 diff --git a/util/gdas_init/run_v15.chgres.sh b/util/gdas_init/run_v15.chgres.sh index 5d59fadc9..501205e27 100755 --- a/util/gdas_init/run_v15.chgres.sh +++ b/util/gdas_init/run_v15.chgres.sh @@ -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 @@ -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 diff --git a/util/gdas_init/run_v16retro.chgres.sh b/util/gdas_init/run_v16retro.chgres.sh index d8b49c796..119f67217 100755 --- a/util/gdas_init/run_v16retro.chgres.sh +++ b/util/gdas_init/run_v16retro.chgres.sh @@ -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 @@ -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