Skip to content

Commit

Permalink
modification based on ee2 review (#12)
Browse files Browse the repository at this point in the history
Co-authored-by: wx20hw <Helin.Wei@m71a1.ncep.noaa.gov>
  • Loading branch information
HelinWei-NOAA and wx20hw authored Sep 14, 2020
1 parent 16d832a commit 6ab7598
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 15 deletions.
20 changes: 15 additions & 5 deletions scripts/exgdas_gldas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ input2=$COMINgdas/gdas.$gldas_eymd/$gldas_ecyc/$COMPONENT/RESTART
mkdir -p $RUNDIR/input
ln -fs $GDAS $RUNDIR/input/GDAS
ln -fs $FIXgldas/FIX_T${JCAP} $RUNDIR/FIX
ln -fs $EXECgldas/gldas_${model} $RUNDIR/LIS
ln -fs $EXECgldas/gldas_model $RUNDIR/LIS


#---------------------------------------------------------------
Expand Down Expand Up @@ -191,18 +191,21 @@ cp fort.141 fort.41
# 3b) Use gdas2gldas to generate nemsio file

export OMP_NUM_THREADS=1
export pgm=gdas2gldas
. prep_step
$APRUN_GAUSSIAN ${EXECgldas}/gdas2gldas 1>&1 2>&2
export err=$?
$ERRSCRIPT || exit 5


# 3c)gldas_noah_rst/gldas_noahmp_rst to generate noah.rst
# 3c)gldas_rst to generate noah.rst

sfcanl=sfc.gaussian.nemsio
ln -fs FIX/lmask_gfs_T${JCAP}.bfsa fort.11
ln -fs $sfcanl fort.12

${EXECgldas}/gldas_${model}_rst 1>&1 2>&2
export pgm=gldas_rst
. prep_step
${EXECgldas}/gldas_rst 1>&1 2>&2
export err=$?
$ERRSCRIPT || exit 6

Expand All @@ -212,7 +215,8 @@ mv $sfcanl ${sfcanl}.$gldas_symd
#---------------------------------------------------------------
### 4) run noah/noahmp model
#---------------------------------------------------------------

export pgm=LIS
. prep_step
$APRUN_GLDAS ./LIS 1>&1 2>&2
export err=$?
$ERRSCRIPT || exit 7
Expand Down Expand Up @@ -244,6 +248,8 @@ cp fort.241 fort.41
# 5b) use gdas2gldas to produce nemsio file

export OMP_NUM_THREADS=1
export pgm=gdas2gldas
. prep_step
$APRUN_GAUSSIAN ${EXECgldas}/gdas2gldas 1>&1 2>&2
export err=$?
$ERRSCRIPT || exit 8
Expand All @@ -258,6 +264,8 @@ rm -rf fort.11 fort.12
ln -fs $gbin fort.11
ln -fs $sfcanl fort.12

export pgm=gldas_post
. prep_step
${EXECgldas}/gldas_post 1>&1 2>&2
export err=$?
$ERRSCRIPT || exit 9
Expand Down Expand Up @@ -285,6 +293,8 @@ done
ln -fs FIX/stype_gfs_T${JCAP}.bfsa stype_gfs_T${JCAP}.bfsa

export OMP_NUM_THREADS=1
export pgm=gldas2gdas
. prep_step
$APRUN_GAUSSIAN $EXECgldas/gldas2gdas 1>&1 2>&2
export err=$?
$ERRSCRIPT || exit 10
Expand Down
2 changes: 1 addition & 1 deletion sorc/gldas_model.fd/make/Makefile.noah
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ endif

# Check for name of executable
ifeq ($(EXENAME),$(null))
EXENAME := ../gldas_noah
EXENAME := ../gldas_model
endif

# Check if SPMD is defined in "misc.h"
Expand Down
2 changes: 1 addition & 1 deletion sorc/gldas_model.fd/make/Makefile.noahmp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ endif

# Check for name of executable
ifeq ($(EXENAME),$(null))
EXENAME := ../gldas_noahmp
EXENAME := ../gldas_model
endif

# Check if SPMD is defined in "misc.h"
Expand Down
4 changes: 2 additions & 2 deletions sorc/gldas_rst.fd/noah/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
SHELL =/bin/sh
EXEC =gldas_noah_rst
EXEC =gldas_rst
LOPTS =
LIBS =${NEMSIO_LIB} ${BACIO_LIB4} ${W3EMC_LIB4} ${W3NCO_LIB4}
OBJS = $(EXEC).o
SRCS = $(EXEC).f
SRCS = gldas_noah_rst.f
# *************************************************************************
all: $(SRCS)
$(FC) $(FOPTS) $(LOPTS) ${SRCS} -o $(EXEC) $(LIBS)
Expand Down
4 changes: 2 additions & 2 deletions sorc/gldas_rst.fd/noahmp/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
SHELL =/bin/sh
EXEC = gldas_noahmp_rst
EXEC = gldas_rst
LOPTS =
LIBS =${NEMSIO_LIB} ${BACIO_LIB4} ${W3EMC_LIB4} ${W3NCO_LIB4}
OBJS = $(EXEC).o
SRCS = $(EXEC).f
SRCS = gldas_noahmp_rst.f
# *************************************************************************
all: $(SRCS)
$(FC) $(FOPTS) $(LOPTS) ${SRCS} -o $(EXEC) $(LIBS)
Expand Down
6 changes: 4 additions & 2 deletions ush/gldas_forcing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ cpc_precip="PRCP_CU_GAUGE_V1.0GLB_0.125deg.lnx.$sdate.RT"
cpc=$pathp1/$cpc_precip
if [ ! -s $cpc ]; then cpc=$pathp2/$cpc_precip ; fi
if [ ! -s $cpc ]; then
echo "GLDAS MISSING $cpc"
echo "GLDAS WILL NOT RUN."
echo "WARNING: GLDAS MISSING $cpc, WILL NOT RUN."
exit 3
fi
cp $cpc $xpath/cpc.$sdate/.
Expand Down Expand Up @@ -89,6 +88,9 @@ touch fort.10
echo ${sdat0} >> fort.10
echo ${sdate} >> fort.10

export pgm=gldas_forcing
. prep_step

$WGRIB -d -bin grib.12 -o fort.11
$WGRIB -d -bin grib.18 -o fort.12
$WGRIB -d -bin grib.00 -o fort.13
Expand Down
3 changes: 1 addition & 2 deletions ush/gldas_get_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ while [ $f -le $cycint ]; do
fflux=$fpath/gdas.$ymd/gdas.t${cyc}z.sfluxgrbf0$f.grib2
gflux=$gpath/gdas.$ymd/gdas1.t${cyc}z.sfluxgrbf0$f
if [ ! -s $rflux ];then
echo "GLDAS MISSING $rflux"
echo "GLDAS WILL NOT RUN."
echo "WARNING: GLDAS MISSING $rflux, WILL NOT RUN."
exit 2
fi
rm -f $fflux $gflux
Expand Down

0 comments on commit 6ab7598

Please sign in to comment.