#!/bin/sh set -x ########################################################## # Data prep of the NDAS Guess for the SREF # Programmer: Jun Du # Date: 04/25/2001 # Change log -- # 11/14/2001: Jun Du modified for Nam 12km version # 05/17/2002: Jun Du input global data changed from # T170-specific to more general format # 10/16/2003: Jun Du (1) resulted ndas resolution was changed # from 48kmL45 to 32kmL60; (2) ndas truncation # source code was updated to include new # cloud fields and skin-T adjustment due to # topo difference etc.. (Thanks to Hui-Ya # and Eric!). # 04/18/2005: Jun Du modified to be T382-compliant # 07/19/2005: Jun Du change SST data from NESDIS 50km SST analysis to # the Real-time Global SST analysis # 03/22/2006: Jun Du add two off-time cycles (03z and 15z) # 06/01/2006: Jun Du switch from Eta-based ndas to NMM-based GSI ndas # 06/25/2006 HUI-YA CHUANG, modified to run 32 km ETA MOS # ########################################################## JOBDATA=$DATA export DATA=$JOBDATA/ndas mkdir -p $DATA cd $DATA $utilscript/setup.sh #-------------------------------------------------------------- # copy operational 12km ndas initial condition from /nwges/prod #-------------------------------------------------------------- msg="fetching 12km ndas initial conditions" postmsg "$jlogfile" "$msg" #-------------------------------------------------------------- # copy global data from /com/ directories #-------------------------------------------------------------- # # global gfs sigma and sfc analysis # msg="fetching global gfs sigma and sfc analysis" postmsg "$jlogfile" "$msg" if [ $cyc -eq 00 ] then cp $COMGFS/gfs.$PDYm1/gfs.$CYC4.sf06 $JOBDATA/siganl.gfs.old cp $COMGFS/gfs.$PDYm1/gfs.$CYC4.bf06 $JOBDATA/sfcanl.gfs.old fi if [ $cyc -eq 12 ] then cp $COMGFS/gfs.$PDY/gfs.$CYC3.sf06 $JOBDATA/siganl.gfs.old cp $COMGFS/gfs.$PDY/gfs.$CYC3.bf06 $JOBDATA/sfcanl.gfs.old fi # # truncating current global gfs resolution to T126L28: # export SIGINP=$JOBDATA/siganl.gfs.old export SFCINP=$JOBDATA/sfcanl.gfs.old export SIGOUT=$JOBDATA/siganl.gfs.new export SFCOUT=$JOBDATA/sfcanl.gfs.new $chres # # time match: # $chtime $PDY$cyc $JOBDATA/siganl.gfs.new $JOBDATA/sanl.$cycle.gfs $chtime $PDY$cyc $JOBDATA/sfcanl.gfs.new $JOBDATA/sfcanl.$cycle.gfs rm -f $SIGINP $SFCINP $SIGOUT $SFCOUT #----------------------------------------------------------- # copy snow and SST data from /com/ directories #----------------------------------------------------------- msg="fetching snow and SST data from /com directories" postmsg "$jlogfile" "$msg" if [ $cyc -eq 00 ] then cp $COMNAM/nam.$PDY/nam.$CYC1.imssnow.grb $JOBDATA/snow_ims.grb.$cycle cp $COMNAM/nam.$PDY/nam.$CYC1.snowdepth.grb $JOBDATA/snow_depth.grb.$cycle # cp $COMGFS/gfs.$PDY/gfs.$CYC1.sstgrb $JOBDATA/sstgrb.$cycle cp $COMGFS/gfs.$PDYm1/gfs.$CYC4.sstgrb $JOBDATA/sstgrb.$cycle fi if [ $cyc -eq 12 ] then cp $COMNAM/nam.$PDY/nam.$CYC2.imssnow.grb $JOBDATA/snow_ims.grb.$cycle cp $COMNAM/nam.$PDY/nam.$CYC2.snowdepth.grb $JOBDATA/snow_depth.grb.$cycle # cp $COMGFS/gfs.$PDY/gfs.$CYC2.sstgrb $JOBDATA/sstgrb.$cycle cp $COMGFS/gfs.$PDY/gfs.$CYC3.sstgrb $JOBDATA/sstgrb.$cycle fi #cp $COMGFS/sst.$PDYm1/sst.t12z.nam_grid $JOBDATA/sst14.$cycle for SSTPDY in $PDY $PDYm1 $PDYm2 $PDYm3 $PDYm4 do if [ -s $COMGFS/sst.${SSTPDY}/sst2dvar.t12z.nam_grid ] then cp $COMGFS/sst.${SSTPDY}/sst2dvar.t12z.nam_grid $JOBDATA/sst14.$cycle break fi done $utilexec/grbindex $JOBDATA/sstgrb.$cycle $JOBDATA/sstgrb.index.$cycle ###################################################### # # Truncating ndas from 1260 to 3260 resolution # ####################################################### msg="Begin Truncation of ndas from 12 to 32km" postmsg "$jlogfile" "$msg" export MP_LABELIO=yes export pgm=sref_eta_intrst_12to32 . prep_step if [ $cyc -eq 00 -o $cyc -eq 06 -o $cyc -eq 12 -o $cyc -eq 18 ]; then #ln -sf $GESNDAS/nam.$CDATE/nam.t${cyc}z.wrfrst_anl.tm00 na12nmm.t${cyc}z.wrfrst_anl.$PDY$cyc ls -l $GESNDAS/nam.$PDY/nam.t${cyc}z.wrfrst_anl.tm00 err=$? if [ $err -eq 0 ] ; then ln -sf $GESNDAS/nam.$PDY/nam.t${cyc}z.wrfrst_anl.tm00 na12nmm.t${cyc}z.wrfrst_anl.$PDY$cyc else # Temp fix put in by BAG while NAM is bypassing NDAS ls -l $GESNDAS/ndas.$PDY/ndas.t${cyc}z.wrfrst_d01.tm03 err=$? if [ $err -eq 0 ] ; then ln -sf $GESNDAS/ndas.$PDY/ndas.t${cyc}z.wrfrst_d01.tm03 na12nmm.t${cyc}z.wrfrst_anl.$PDY$cyc else ln -sf $GESNDAS/nam.$PDY/nam.t${cyc}z.wrfinput_anl.tm00 na12nmm.t${cyc}z.wrfrst_anl.$PDY$cyc fi fi fi cyyyy=`echo ${PDY}${cyc} | cut -c1-4` cmm=`echo ${PDY}${cyc} | cut -c5-6` cdd=`echo ${PDY}${cyc} | cut -c7-8` chh=`echo ${PDY}${cyc} | cut -c9-10` cat > itag <> $pgmout 2> errfile export err=$?; err_chk cp $JOBDATA/ndas.$cycle.nhb$RES $GESDIR/ndas.$cycle.nhb$RES rm -f *fort* set +x echo " " echo " ****** Truncation COMPLETED ####### " echo " ****** Truncation COMPLETED ####### " echo " ****** Truncation COMPLETED ####### " echo " " set -x msg="Truncation of ndas from 12 to 32km Completed Normally" postmsg "$jlogfile" "$msg" cd $JOBDATA rm -rf $DATA exit