Skip to content

Commit

Permalink
Merge pull request #4 from NOAA-EMC/feature/cfp
Browse files Browse the repository at this point in the history
Feature/cfp
  • Loading branch information
yangfanglin authored Feb 5, 2020
2 parents 0677baf + d1a2e82 commit 833bf02
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 9 deletions.
29 changes: 24 additions & 5 deletions scripts/exgdas_gldas.sh.ecf
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ ${USHgldas}/gldas_get_data.sh $gldas_sdate $gldas_cdate
export err=$?
$ERRSCRIPT || exit 2


#---------------------------------------------------------------
### 2) Get CPC daily precip and temporally disaggreated
#---------------------------------------------------------------

${USHgldas}/gldas_forcing.sh $gldas_symd $gldas_eymd
export err=$?
$ERRSCRIPT || exit 3
Expand All @@ -128,18 +128,37 @@ ymdpre=`sh $FINDDATE $gldas_symd d-1`
ymdend=`sh $FINDDATE $gldas_eymd d-2`
ymd=$ymdpre

if [ $machine = "WCOSS_DELL_P3" ] ; then
rm -f ./cfile
touch ./cfile
fi

while [ $ymd -le $ymdend ]; do
if [ $ymd -ne $ymdpre ]; then
$COPYGB -i3 -g"$gds" -x $GDAS/cpc.$ymd/precip.gldas.${ymd}00 $RUNDIR/cmap.gdas.${ymd}00
$COPYGB -i3 -g"$gds" -x $GDAS/cpc.$ymd/precip.gldas.${ymd}06 $RUNDIR/cmap.gdas.${ymd}06
if [ $machine = "WCOSS_DELL_P3" ] ; then
echo "$COPYGB -i3 '-g"$gds"' -x $GDAS/cpc.$ymd/precip.gldas.${ymd}00 $RUNDIR/cmap.gdas.${ymd}00" >> ./cfile
echo "$COPYGB -i3 '-g"$gds"' -x $GDAS/cpc.$ymd/precip.gldas.${ymd}06 $RUNDIR/cmap.gdas.${ymd}06" >> ./cfile
else
$COPYGB -i3 -g"$gds" -x $GDAS/cpc.$ymd/precip.gldas.${ymd}00 $RUNDIR/cmap.gdas.${ymd}00
$COPYGB -i3 -g"$gds" -x $GDAS/cpc.$ymd/precip.gldas.${ymd}06 $RUNDIR/cmap.gdas.${ymd}06
fi
fi
if [ $ymd -ne $ymdend ]; then
$COPYGB -i3 -g"$gds" -x $GDAS/cpc.$ymd/precip.gldas.${ymd}12 $RUNDIR/cmap.gdas.${ymd}12
$COPYGB -i3 -g"$gds" -x $GDAS/cpc.$ymd/precip.gldas.${ymd}18 $RUNDIR/cmap.gdas.${ymd}18
if [ $machine = "WCOSS_DELL_P3" ] ; then
echo "$COPYGB -i3 '-g"$gds"' -x $GDAS/cpc.$ymd/precip.gldas.${ymd}12 $RUNDIR/cmap.gdas.${ymd}12" >> ./cfile
echo "$COPYGB -i3 '-g"$gds"' -x $GDAS/cpc.$ymd/precip.gldas.${ymd}18 $RUNDIR/cmap.gdas.${ymd}18" >> ./cfile
else
$COPYGB -i3 -g"$gds" -x $GDAS/cpc.$ymd/precip.gldas.${ymd}12 $RUNDIR/cmap.gdas.${ymd}12
$COPYGB -i3 -g"$gds" -x $GDAS/cpc.$ymd/precip.gldas.${ymd}18 $RUNDIR/cmap.gdas.${ymd}18
fi
fi
ymd=`sh $FINDDATE $ymd d+1`
done

if [ $machine = "WCOSS_DELL_P3" ] ; then
$APRUN_GLDAS_DATA_PROC ./cfile
fi

# create configure file
${USHgldas}/gldas_liscrd.sh $gldas_sdate $iau_cdate ${JCAP}
export err=$?
Expand Down
18 changes: 14 additions & 4 deletions ush/gldas_forcing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,20 @@ sflux=$fpath/gdas.${sdate}/gdas1.t06z.sfluxgrbf06
prate=gdas.${sdate}06
$WGRIB -s $sflux | grep "PRATE:sfc" | $WGRIB -i $sflux -grib -o $prate

$COPYGB -i3 -g"255 0 2881 1441 90000 0 128 -90000 360000 125 125" -x gdas.${sdat0}12 grib.12
$COPYGB -i3 -g"255 0 2881 1441 90000 0 128 -90000 360000 125 125" -x gdas.${sdat0}18 grib.18
$COPYGB -i3 -g"255 0 2881 1441 90000 0 128 -90000 360000 125 125" -x gdas.${sdate}00 grib.00
$COPYGB -i3 -g"255 0 2881 1441 90000 0 128 -90000 360000 125 125" -x gdas.${sdate}06 grib.06
if [ $machine = "WCOSS_DELL_P3" ] ; then
rm -f ./cfile
touch ./cfile
echo "$COPYGB -i3 '-g255 0 2881 1441 90000 0 128 -90000 360000 125 125' -x gdas.${sdat0}12 grib.12" >> ./cfile
echo "$COPYGB -i3 '-g255 0 2881 1441 90000 0 128 -90000 360000 125 125' -x gdas.${sdat0}18 grib.18" >> ./cfile
echo "$COPYGB -i3 '-g255 0 2881 1441 90000 0 128 -90000 360000 125 125' -x gdas.${sdate}00 grib.00" >> ./cfile
echo "$COPYGB -i3 '-g255 0 2881 1441 90000 0 128 -90000 360000 125 125' -x gdas.${sdate}06 grib.06" >> ./cfile
$APRUN_GLDAS_DATA_PROC ./cfile
else
$COPYGB -i3 '-g255 0 2881 1441 90000 0 128 -90000 360000 125 125' -x gdas.${sdat0}12 grib.12
$COPYGB -i3 '-g255 0 2881 1441 90000 0 128 -90000 360000 125 125' -x gdas.${sdat0}18 grib.18
$COPYGB -i3 '-g255 0 2881 1441 90000 0 128 -90000 360000 125 125' -x gdas.${sdate}00 grib.00
$COPYGB -i3 '-g255 0 2881 1441 90000 0 128 -90000 360000 125 125' -x gdas.${sdate}06 grib.06
fi

rm -f fort.10
touch fort.10
Expand Down

0 comments on commit 833bf02

Please sign in to comment.