#!/bin/ksh ##################################################################### # 9/20/2009, Julia Zhu Scripts are modified to be sharable # between EMC and NCO # Please note that variable "RUN_ENVIR" is set and used # in the development enviroment only. ###################################################################### export RUN_ENVIR=${RUN_ENVIR:-prod} echo `date` $0 `date -u` begin set -xa #################################### # 01/28/2013 New variables added for WCOSS and cross-machine unfication export gefsmachine=${gefsmachine:-dell} export gefsmpexec=${gefsmpexec:-mpirun} ########################################### # Run gefs_config to get input parameters ########################################### #RERUN=YES if [ "$RUN_ENVIR" = dev ] ### For Developers then # RLW 20141008 modify to obtain and use version for vertical structure . $basesource/nw$envir/*/versions/gefs_legacy.ver . $basesource/nw$envir/gefs_legacy.${gefs_legacy_ver}/parm/gefs_config fi # ################################### # SET SHELL PROCESSING VARIABLES # ################################### export PS4='$SECONDS + ' date #################################### # obtain unique process id (pid) and make temp directory #################################### export pid=$$ if [ "$RUN_ENVIR" = dev ] ### For Developers then export DATA_IN=${DATA_IN:-$basetmp/tmpnwprd1} else ### For Operations export DATA_IN=$DATAROOT fi #export DATA=$DATA_IN/${job}.${pid} export DATA=${DATA:-$DATA_IN/${job}.${pid}} mkdir -p $DATA cd $DATA ############################ # Set up cycle varaible ############################ echo $cyc #DHTEST export cycle=t${cyc}z export cycle_fcst=t${cyc_fcst}z export NTHREADS=2 export MP_LABELIO=YES echo $cyc_fcst $cyc #DHTEST if (( cyc == cyc_fcst )); then export cycsuffix=false export fcstlong=true cfsuffix= else export fcstlong=false export cycsuffix=true export ENS_SPS=.false. cfsuffix=.cycfs$cyc_fcst fi #################################### # Specify NET and RUN Name and model #################################### export NET=gens #################################### # File To Log Msgs #################################### if [ "$RUN_ENVIR" = dev ] ### For Developers then export jlogfile=${jlogfile:-$baselog/com/logs/jlogfile} #else ### For Operations # if [[ $envir = "prod" ]]; then # export jlogfile=${jlogfile:-/com/logs/jlogfiles/jlogfile.${job}.$$} # else # export jlogfile=/com/logs/${envir}/jlogfile # fi fi export jlogfile=${jlogfile:-${DATA}/jlogfile} #################################### # Determine Job Output Name on System #################################### export outid="LL$job" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" export pgmerr=errfile if [[ $RUN_CONCURRENT = yes ]]; then export PGMOUT=FCOUT.o$pid export PGMERR= export REDOUT=' | tee -a ' export REDERR=' 2>&1 ' fi #################################### # SENDECF - Flag Events on ECF # SENDCOM - Copy Files From TMPDIR to $COMOUT # SENDDBN - Issue DBNet Client Calls # RERUN - Rerun fcst from beginning (default no) # VERBOSE - Specify Verbose Output in exglobal_fcst.sh.ecf #################################### if [ "$RUN_ENVIR" = dev ] ### For Developers then export SENDCOM=${SENDCOM:-YES} export SENDECF=${SENDECF:-YES} export VERBOSE=${VERBOSE:-NO} export RERUN=${RERUN:-NO} # Specify Execution Areas export HOMEGLOBAL=${HOMEGLOBAL:-/nw${envir}} export EXECGLOBAL=${EXECGLOBAL:-$HOMEGLOBAL/exec} export USHGLOBAL=${USHGLOBAL:-$HOMEGLOBAL/ush} #DHOU 03/08/2012 added this line for ZEUS if [[ $gefsmachine = zeus ]]; then export FIXGLOBAL=/NCEPPROD/nwprod/fix fi if [[ $gefsmachine = wcoss ]]; then # export FIXGLOBAL=$HOMEglobal/fix export FIXGLOBAL=$HOMEgefs/fix fi export FIXGLOBAL=${FIXGLOBAL:-$HOMEGLOBAL/fix} export PARMGLOBAL=${PARMGLOBAL:-$HOMEGLOBAL/parm} export HOMEgefs=${HOMEgefs_legacy:-/gpfs/dell1/nco/ops/nw${envir}/gefs_legacy.${gefs_legacy_ver}} export EXECgefs=${EXECgefs:-$HOMEgefs/exec} export USHgefs=${USHgefs:-$HOMEgefs/ush} export FIXgefs=${FIXgefs:-$HOMEgefs/fix} export PARMgefs=${PARMgefs:-$HOMEgefs/parm} else ### For Operations export SENDCOM=YES export SENDECF=YES if [[ $cyc == 00 ]]; then export SENDDBN=NO else export SENDDBN=NO fi export VERBOSE=NO export RERUN=NO # Specify Execution Areas export HOMEgefs=${HOMEgefs_legacy:-/gpfs/dell1/nco/ops/nw${envir}/gefs_legacy.${gefs_legacy_ver}} export HOMEGLOBAL=${HOMEGLOBAL:-$HOMEgefs} export EXECGLOBAL=${EXECGLOBAL:-$HOMEGLOBAL/exec} export USHGLOBAL=${USHGLOBAL:-$HOMEGLOBAL/ush} export FIXGLOBAL=${FIXGLOBAL:-$HOMEGLOBAL/fix} export PARMGLOBAL=${USHGLOBAL:-$HOMEGLOBAL/parm} # RLW 20141008 modify to obtain and use version for vertical structure #export HOMEgefs=${HOMEgefs_legacy:-/gpfs/dell1/nco/ops/nw${envir}/gefs_legacy.${gefs_legacy_ver}} # export HOMEgefs=${HOMEgefs_legacy:-/gpfs/dell1/nco/ops/nw${envir}/gefs_legacy.${gefs_legacy_ver}} export EXECgefs=${EXECgefs:-$HOMEgefs/exec} export USHgefs=${USHgefs:-$HOMEgefs/ush} export FIXgefs=${FIXgefs:-$HOMEgefs/fix} export PARMgefs=${PARMgefs:-$HOMEgefs/parm} fi export ERRSCRIPT=err_chk export LOGSCRIPT=startmsg ############################## # Set up the UTILITIES ############################## #export utilscript=/nwprod/util/ush ############################## # Run setup to initialize working directory and utility scripts ############################## #ksh $utilscript/setup.sh ############################## # Run setpdy and initialize PDY variables ############################## #sh $utilscript/setpdy.sh setpdy.sh . PDY ############################################## echo set parameters using gefs.parm ############################################## . $PARMgefs/gefs.parm # hour_lr_ni will be used to define the IC files of the lower resolution part (if not restart) (( hour_lr_ini = fhmaxh - HOUTSPS )) ############################################## # CHECK and ensure CONSISTENCY among ENS related parameters ############################################## if [[ $FORECAST_SEGMENT = hr ]] ; then echo Integrate the model for the high resolution segment fhresini=0 elif [[ $FORECAST_SEGMENT = lr ]] ; then echo Integrate the model for the low resolution segment fhresini=$fhmaxh elif [[ $FORECAST_SEGMENT = hl ]] ; then echo Integrate the model for both high and low resolution segments, including chgres fhresini=0 else msg="FATAL ERROR: Incorrect value of FORECAST_SEGMENT=$FORECAST_SEGMENT" echo "`date` $msg" echo The Forecast job will be aborted!!!! postmsg "$jlogfile" "$msg" export pgm=JENS_FCST export err=911 err_chk fi #DHOU 20120403, changed true to .ture. for the value of ENS_SPS, 9 places echo FORECAST_SEGMENT = $FORECAST_SEGMENT echo fhresini=$fhresini echo ENS_SPS = $ENS_SPS echo RUN_CONCURRENT = $RUN_CONCURRENT echo npair = $npair #if [[ $ENS_SPS = true ]] && [[ $RUN_CONCURRENT != yes ]]; then if [[ $ENS_SPS = .true. ]] && [[ $RUN_CONCURRENT != yes ]]; then RUN_CONCURRENT=yes echo RUN_CONCURRENT is modified echo RUN_CONCURRENT = $RUN_CONCURRENT fi if (( npair == 0 )) && [[ $RUN_CONCURRENT = yes ]]; then RUN_CONCURRENT=no echo RUN_CONCURRENT is modified echo RUN_CONCURRENT = $RUN_CONCURRENT fi ############################################## # Define COM and GES directories ############################################## if [ "$RUN_ENVIR" = dev ] ### For Developers then export GFS_IN=${GFS_IN:-/com2/gfs/prod/} export COM_OUT=${COM_OUT:-/global/noscrub/$LOGBAME/com/${NET}/${envir}} export gespath=${gespath:-/global/noscrub/$LOGBAME/nwges/${envir}} export COMINgfs=$GFS_IN/gfs.${PDY} export COMOUT=$COM_OUT/gefs_legacy.${PDY} else ### For Operations #export COMOUT=/com/${NET}/${envir}/gefs_legacy.${PDY} export COMOUT=$COMROOT/${NET}/${envir}/gefs_legacy.${PDY} #export gespath=/nwges/${envir} gespath=${gespath:-$GESROOT/${envir}} fi mkdir -m 775 -p $COMOUT/$cyc/sfcsig mkdir -m 775 -p $COMOUT/$cyc/sflux mkdir -m 775 -p $COMOUT/$cyc/misc RESTARTA=$COMOUT/$cyc/restarta RESTARTB=$COMOUT/$cyc/restartb mkdir -m 775 -p $RESTARTA mkdir -m 775 -p $RESTARTB export ENS_COM=$COMOUT export GESdir=$gespath/gefs_legacy.${PDY} mkdir -m 775 -p $GESdir case $cyc in 00) export fhmax=$fhmax00;; 06) export fhmax=$fhmax06;; 12) export fhmax=$fhmax12;; 18) export fhmax=$fhmax18;; esac ############################################################### # Specify locations of the following scripts and executables ############################################################### export CHGRESTHREAD=4 export OVERPARMEXEC=$EXECGLOBAL/overparm_grib # Change Resolution script and executable export chgresush=$USHGLOBAL/global_chgres.sh export CHGRESEXEC=$EXECGLOBAL/global_chgres_thread # For Single forecast, use global script and executable # DHOU, 06-20-2011, This is not needed. global_fcst can run single member #export fcstscript=$HOMEGLOBAL/scripts/exglobal_fcst.sh.ecf #export FCSTEXEC=$EXECGLOBAL/global_fcst #DHOU 06-20-2011 We can switch betweeen $HOMEgefs (test work dir) and $HOMEGLOBAL (/nwprod) # But I suggest we do this in gefsrun or earlier scripts so that this will be cleanner if [[ $GFS_VERSION = gefs_prod ]]; then # export fcstconcscript=$HOMEgefs/scripts/exgefs_fcst_conc.sh.ecf # export FCSTEXEC=$EXECgefs/gefs_fcst_conc ## export FCSTCONCEXEC=$EXECgefs/gefs_fcst_conc export fcstscript=$HOMEGLOBAL/scripts/exgefs_global_fcst.sh.ecf export FCSTEXEC=$EXECGLOBAL/gefs_global_fcst_ elif [[ $GFS_VERSION = gfs_prod ]]; then # export fcstconcscript=$HOMEgefs/scripts/exglobal_fcst.sh.ecf # export FCSTEXEC=$EXECgefs/global_fcst ## export FCSTCONCEXEC=$EXECgefs/global_fcst export fcstscript=$HOMEGLOBAL/scripts/exglobal_fcst.sh.ecf export FCSTEXEC=$EXECGLOBAL/global_fcst elif [[ $GFS_VERSION = gfs_fcst ]]; then export fcstscript=$HOMEgefs/scripts/exglobal_fcst.sh.ecf export FCSTEXEC=$EXECgefs/global_fcst elif [[ $GFS_VERSION = gefs_fcst ]]; then export fcstscript=$HOMEgefs/scripts/exgefs_global_fcst.sh.ecf export FCSTEXEC=$EXECgefs/gefs_global_fcst else echo Invalid value of GFS_VERSION=$GFS_VERSION fi #RLW 20110803 reinstate local control of the gefs executable and script #DHOU 20130203 nolified it if [[ "$RUN_ENVIR" = dev_V ]]; then if [[ $locfcstscript = local ]]; then # RLW 20141008 modify to obtain and use version for vertical structure export fcstscript=$basesource/gefs_legacy.${gefs_legacy_ver}/nw$envir/scripts/exglobal_fcst.sh.ecf fi if [[ $locfcstexec = local ]]; then # RLW 20141008 modify to obtain and use version for vertical structure export FCSTEXEC=$basesource/nw$envir/gefs_legacy.${gefs_legacy_ver}/exec/global_fcst fi fi # The VEGTYPE fix file: # DHOU 01/07/2013 comment out this if [[ $gefsmachine != dell ]]; then export FNVETC=$FIXgefs/global_vegtype.1x1.grb fi # For Post Processing export POSTGPSH=$USHGLOBAL/global_nceppost.sh export POSTGPEXEC=$EXECGLOBAL/exec/ncep_post #DHOU 03/26/2012 For Zeus export POSTGPSH=$USHglobal/global_nceppost.sh export POSTGPEXEC=$EXECglobal/exec/ncep_post export HOMEUTIL=/nwprod/util export EXECUTIL=$HOMEUTIL/exec export FIXUTIL=$HOMEUTIL/fix export SIGHDR=${EXECGLOBAL}/global_sighdr export SFCHDR=${EXECGLOBAL}/global_sfchdr #DHOU 01/07/2013 For Zeus/WCOSS if [[ $gefsmachine = zeus ]]; then export SIGHDR=${EXECglobal}/global_sighdr export SFCHDR=${EXECglobal}/global_sfchdr fi # if [[ $gefsmachine = wcoss ]]; then #export SIGHDR=/global/noscrub/Shrinivas.Moorthi/para/exec/global_sighdr #export SFCHDR=/global/noscrub/Shrinivas.Moorthi/para/exec/global_sfchdr # fi #################################### # Create member list #################################### if [[ $RUN_CONCURRENT = yes ]]; then #Concurrent run, multi member memberlist="" (( imem = 0 )) while (( imem < npair * 2 )) do (( imem = imem + 1 )) if (( imem < 10 )); then imem=0$imem fi memberlist="$memberlist p$imem" done if (( cyc == cyc_fcst )) ; then memberlist="$memberlist c00" (( imem = imem + 1 )) fi (( ENS_NUM = imem )) export ENS_NUM echo ENS_NUM=$ENS_NUM export RUM=ge'${MN}' echo RUM=$RUM else #single member echo RUN=$RUN memberlist=`echo $RUN|cut -c3-5` export ENS_NUM=1 echo ENS_NUM=$ENS_NUM fi memberlist=`echo $memberlist` MEMBER_NAMES=$memberlist # # Forecast Input Variables # export FCSTVARS="IALB=0, LIOPE=.false.," # # Forecast Fix Fields # export CLTUNE=$FIXGLOBAL/global_cldtune.f77 export DTBTHE=$FIXGLOBAL/global_tbthe.f77 export O3PROD=$FIXGLOBAL/global_o3prod.f77 export O3LOSS=$FIXGLOBAL/global_o3loss.f77 export O3CLIM=$FIXGLOBAL/global_o3clim.txt # # Output File Names # if [[ $RUN_CONCURRENT = yes ]]; then export SIGO=$COMOUT/$cyc/sfcsig/${RUM}.${cycle}.sf'${FH}'$cfsuffix export SFCO=$COMOUT/$cyc/sfcsig/${RUM}.${cycle}.bf'${FH}'$cfsuffix export FLXO=$COMOUT/$cyc/sflux/${RUM}.${cycle}.sfluxgrbf'${FH}'$cfsuffix export LOGO=$COMOUT/$cyc/misc/${RUM}.${cycle}.logf'${FH}'$cfsuffix # 02/29/2008 DHOU, added new files for the output after STTP export SIGS=$COMOUT/$cyc/sfcsig/${RUM}.${cycle}.ss'${FH}'$cfsuffix export SFBS=$COMOUT/$cyc/sfcsig/${RUM}.${cycle}.bs'${FH}'$cfsuffix export FLXS=$COMOUT/$cyc/sflux/${RUM}.${cycle}.ssluxgrbs'${FH}'$cfsuffix else export SIGO=$COMOUT/$cyc/sfcsig/${RUN}.${cycle}.sf'${FH}'$cfsuffix export SFCO=$COMOUT/$cyc/sfcsig/${RUN}.${cycle}.bf'${FH}'$cfsuffix export FLXO=$COMOUT/$cyc/sflux/${RUN}.${cycle}.sfluxgrbf'${FH}'$cfsuffix export LOGO=$COMOUT/$cyc/misc/${RUN}.${cycle}.logf'${FH}'$cfsuffix fi # # Restart File Names # Names ending in _P are prefixes requiring forecast hour and cfsuffix # if [[ $RUN_CONCURRENT = yes ]]; then # if [[ $ENS_SPS = true ]]; then if [[ $ENS_SPS = .true. ]]; then # for model output export SIGR1=$RESTARTA/${RUM}.${cycle}.sigr1$cfsuffix export SIGR2=$RESTARTA/${RUM}.${cycle}.sigr2$cfsuffix export SFCR=$RESTARTA/${RUM}.${cycle}.sfcr$cfsuffix # 02/29/2008 DHOU, added new files for the output after SP export SIGS1=$RESTARTA/${RUM}.${cycle}.sigs1$cfsuffix export SIGS2=$RESTARTA/${RUM}.${cycle}.sigs2$cfsuffix export SFCS=$RESTARTA/${RUM}.${cycle}.sfcs$cfsuffix # for restart processing export SIGX1=$RESTARTA/${RUM}.${cycle}.sigs1$cfsuffix export SIGX2=$RESTARTA/${RUM}.${cycle}.sigs2$cfsuffix export SFCX=$RESTARTA/${RUM}.${cycle}.sfcs$cfsuffix # Restart files in COMOUT area export SIGX1_P=$RESTARTB/${RUM}.${cycle}.sigs1f export SIGX2_P=$RESTARTB/${RUM}.${cycle}.sigs2f export SFCX_P=$RESTARTB/${RUM}.${cycle}.sfcsf else # for model output export SIGR1=$RESTARTA/${RUM}.${cycle}.sigr1$cfsuffix export SIGR2=$RESTARTA/${RUM}.${cycle}.sigr2$cfsuffix export SFCR=$RESTARTA/${RUM}.${cycle}.sfcr$cfsuffix # for restart processing export SIGX1=$RESTARTA/${RUM}.${cycle}.sigr1$cfsuffix export SIGX2=$RESTARTA/${RUM}.${cycle}.sigr2$cfsuffix export SFCX=$RESTARTA/${RUM}.${cycle}.sfcr$cfsuffix # Restart files in COMOUT area export SIGX1_P=$RESTARTB/${RUM}.${cycle}.sigr1f export SIGX2_P=$RESTARTB/${RUM}.${cycle}.sigr2f export SFCX_P=$RESTARTB/${RUM}.${cycle}.sfcrf fi else # for model output export SIGR1=$RESTARTA/$GESdir/${RUN}.${cycle}.sigr1$cfsuffix export SIGR2=$RESTARTA/$GESdir/${RUN}.${cycle}.sigr2$cfsuffix export SFCR=$RESTARTA/$GESdir/${RUN}.${cycle}.sfcr$cfsuffix # for restart processing export SIGX1=$RESTARTA/$GESdir/${RUN}.${cycle}.sigr1$cfsuffix export SIGX2=$RESTARTA/$GESdir/${RUN}.${cycle}.sigr2$cfsuffix export SFCX=$RESTARTA/$GESdir/${RUN}.${cycle}.sfcr$cfsuffix # Restart files in COMOUT area export SIGX1_P=$RESTARTB/${RUN}.${cycle}.sigr1f export SIGX2_P=$RESTARTB/${RUN}.${cycle}.sigr2f export SFCX_P=$RESTARTB/${RUN}.${cycle}.sfcrf fi # # PDS Grid Designator # export IGEN=107 # # Time Step Interval # msg="HAS BEGUN on `hostname`" postmsg "$jlogfile" "$msg" #################################### # Check if this is a restart # # Define Initialization File Names # # and Copy these file to the work directory ($DATA) #################################### CONC_INI=`echo $MEMBER_NAMES|cut -c1-3` if test $RERUN = "NO" then goodrestart=yes echo check for restart files in $RESTARTA MN=$CONC_INI SIGX1t=$SIGX1 SIGX2t=$SIGX2 SFCXt=$SFCX if eval test -f $SIGX1t -a -f $SIGX2t -a -f $SFCXt then export JCAPt=$(eval $SIGHDR $SIGX1t jcap) rcj=$? export LEVSt=$(eval $SIGHDR $SIGX1t levs) rcl=$? export LONBt=$(eval $SIGHDR $SIGX1t lonb) rcn=$? export LATBt=$(eval $SIGHDR $SIGX1t latb) rct=$? export HOURt=$(eval $SIGHDR $SIGX1t fhour) rch=$? if (( rcj + rcl + rcn + rct + rch == 0 )); then fsize_sigr1t=`eval ls -l $SIGX1t |awk -F" " '{print $5}'` fsize_sigr2t=`eval ls -l $SIGX2t |awk -F" " '{print $5}'` fsize_sfcrt=`eval ls -l $SFCXt |awk -F" " '{print $5}'` if (( HOURt > fhresini )); then for MN in $MEMBER_NAMES do SIGX1m=$SIGX1 SIGX2m=$SIGX2 SFCXm=$SFCX if eval test -f $SIGX1m -a -f $SIGX2m -a -f $SFCXm then export JCAPm=$(eval $SIGHDR $SIGX1m jcap) rcj=$? export LEVSm=$(eval $SIGHDR $SIGX1m levs) rcl=$? export LONBm=$(eval $SIGHDR $SIGX1m lonb) rcn=$? export LATBm=$(eval $SIGHDR $SIGX1m latb) rct=$? export HOURm=$(eval $SIGHDR $SIGX1m fhour) rch=$? export HOURg=$(eval $SIGHDR $SIGX2m fhour) rcg=$? export HOURf=$(eval $SFCHDR $SFCXm fhour) rcf=$? if (( rcj + rcl + rcn + rct + rch + rcg + rcf == 0 )); then fsize_sigr1m=`eval ls -l $SIGX1m |awk -F" " '{print $5}'` fsize_sigr2m=`eval ls -l $SIGX2m |awk -F" " '{print $5}'` fsize_sfcrm=`eval ls -l $SFCXm |awk -F" " '{print $5}'` if (( HOURt != HOURm )); then echo for $MN sig1 restart file forecast hour $HOURm does not match $HOURt goodrestart=no elif (( HOURt != HOURg )); then echo for $MN sig2 restart file forecast hour $HOURg does not match $HOURt goodrestart=no elif (( HOURt != HOURf )); then echo for $MN sfc restart file forecast hour $HOURf does not match $HOURt goodrestart=no elif (( fsize_sigr1t != fsize_sigr1m )); then echo for $MN restart file size sigr1 $fsize_sigr1m does not match $fsize_sigr1t goodrestart=no elif (( fsize_sigr2t != fsize_sigr2m )); then echo for $MN restart file size sigr2 $fsize_sigr2m does not match $fsize_sigr2t goodrestart=no elif (( fsize_sfcrt != fsize_sfcrm )); then echo for $MN restart file size sfcr $fsize_sfcrm does not match $fsize_sfcrt goodrestart=no elif (( JCAPt != JCAPm )); then echo for $MN restart file JCAP $JCAPm does not match $JCAPt goodrestart=no elif (( LEVSt != LEVSm )); then echo for $MN restart file LEVS $LEVSm does not match $LEVSt goodrestart=no elif (( LONBt != LONBm )); then echo for $MN restart file LONB $LONBm does not match $LONBt goodrestart=no elif (( LATBt != LATBm )); then echo for $MN restart file LATB $LATBm does not match $LATBt goodrestart=no fi else #rc echo Restart files $SIGX1m $SIGX2m $SFCXm for Member $MN cannot be processed goodrestart=no fi #rc else #-f echo Restart file $SIGX1m for Member $MN is NOT available goodrestart=no fi #-f done #MN else #HOURt echo restart file $SIGX1t hour $HOURtest not later than initial hour $fhresini goodrestart=no fi #HOURt else #rc echo Restart file $SIGX1t for Member $MN cannot be processed goodrestart=no fi #rc else #-f echo Restart file $SIGX1t for Member $MN is NOT available goodrestart=no fi #-f if [[ $goodrestart = yes ]]; then for MN in $MEMBER_NAMES do eval cp $SIGX1 $DATA/${RUM}.sigr1 eval cp $SIGX2 $DATA/${RUM}.sigr2 eval cp $SFCX $DATA/${RUM}.sfcr done #MN SIGI=$DATA/${RUM}.sigr1 SIGI2=$DATA/${RUM}.sigr2 SFCI=$DATA/${RUM}.sfcr else #goodrestart echo check for restart files in $RESTARTB MN=$CONC_INI for SIGX1test in `eval ls -1t ${SIGX1_P}*` do echo SIGX1test=$SIGX1test if [[ -f $SIGX1test ]]; then if [[ $goodrestart = no ]]; then goodrestart=yes export HOURtest=$(eval $SIGHDR $SIGX1test fhour | sed -e "s/\.00//") rch=$? if (( rch == 0 )); then if (( HOURtest > fhresini )); then SIGX1t=$SIGX1_P$HOURtest$cfsuffix SIGX2t=$SIGX2_P$HOURtest$cfsuffix SFCXt=$SFCX_P$HOURtest$cfsuffix if eval test -f $SIGX1t -a -f $SIGX2t -a -f $SFCXt then export JCAPt=$(eval $SIGHDR $SIGX1t jcap) rcj=$? export LEVSt=$(eval $SIGHDR $SIGX1t levs) rcl=$? export LONBt=$(eval $SIGHDR $SIGX1t lonb) rcn=$? export LATBt=$(eval $SIGHDR $SIGX1t latb) rct=$? export HOURt=$(eval $SIGHDR $SIGX1t fhour) rch=$? if (( rcj + rcl + rcn + rct + rch == 0 )); then fsize_sigr1t=`eval ls -l $SIGX1t |awk -F" " '{print $5}'` fsize_sigr2t=`eval ls -l $SIGX2t |awk -F" " '{print $5}'` fsize_sfcrt=`eval ls -l $SFCXt |awk -F" " '{print $5}'` if (( HOURt > fhresini )); then for MN in $MEMBER_NAMES do SIGX1m=$SIGX1_P$HOURtest$cfsuffix SIGX2m=$SIGX2_P$HOURtest$cfsuffix SFCXm=$SFCX_P$HOURtest$cfsuffix if eval test -f $SIGX1m -a -f $SIGX2m -a -f $SFCXm then export JCAPm=$(eval $SIGHDR $SIGX1m jcap) rcj=$? export LEVSm=$(eval $SIGHDR $SIGX1m levs) rcl=$? export LONBm=$(eval $SIGHDR $SIGX1m lonb) rcn=$? export LATBm=$(eval $SIGHDR $SIGX1m latb) rct=$? export HOURm=$(eval $SIGHDR $SIGX1m fhour) rch=$? export HOURg=$(eval $SIGHDR $SIGX2m fhour) rcg=$? export HOURf=$(eval $SFCHDR $SFCXm fhour) rcf=$? if (( rcj + rcl + rcn + rct + rch + rcg + rcf == 0 )); then fsize_sigr1m=`eval ls -l $SIGX1m |awk -F" " '{print $5}'` fsize_sigr2m=`eval ls -l $SIGX2m |awk -F" " '{print $5}'` fsize_sfcrm=`eval ls -l $SFCXm |awk -F" " '{print $5}'` if (( HOURt != HOURm )); then echo for $MN restart file forecast hour $HOURm does not match $HOURt goodrestart=no elif (( HOURt != HOURg )); then echo for $MN sig2 restart file forecast hour $HOURg does not match $HOURt goodrestart=no elif (( HOURt != HOURf )); then echo for $MN sfc restart file forecast hour $HOURf does not match $HOURt goodrestart=no elif (( fsize_sigr1t != fsize_sigr1m )); then echo for $MN restart file size sigr1 $fsize_sigr1m does not match $fsize_sigr1t goodrestart=no elif (( fsize_sigr2t != fsize_sigr2m )); then echo for $MN restart file size sigr2 $fsize_sigr2m does not match $fsize_sigr2t goodrestart=no elif (( fsize_sfcrt != fsize_sfcrm )); then echo for $MN restart file size sfcr $fsize_sfcrm does not match $fsize_sfcrt goodrestart=no elif (( JCAPt != JCAPm )); then echo for $MN restart file JCAP $JCAPm does not match $JCAPt goodrestart=no elif (( LEVSt != LEVSm )); then echo for $MN restart file LEVS $LEVSm does not match $LEVSt goodrestart=no elif (( LONBt != LONBm )); then echo for $MN restart file LONB $LONBm does not match $LONBt goodrestart=no elif (( LATBt != LATBm )); then echo for $MN restart file LATB $LATBm does not match $LATBt goodrestart=no fi else #rc echo Restart file $SIGX1mfor Member $MN cannot be processed goodrestart=no fi #rc else #-f echo Restart file $SIGX1mfor Member $MN is NOT available goodrestart=no fi #-f done #MN else #HOURt echo restart file $SIGX1t hour $HOURt not later than initial hour $fhresini goodrestart=no fi #HOURt else #rc echo Restart file $SIGX1t for Member $MN cannot be processed goodrestart=no fi #rc else #-f echo Restart file $SIGX1t for Member $MN is NOT available goodrestart=no fi #-f else #HOURtest echo restart file $SIGX1test hour $HOURtest not later than initial hour $fhresini goodrestart=no fi #HOURtest else #rch echo Restart file $SIGX1test for Member $MN cannot be processed goodrestart=no fi #rch if [[ $goodrestart = yes ]]; then for MN in $MEMBER_NAMES do SIGX1m=$SIGX1_P$HOURtest SIGX2m=$SIGX2_P$HOURtest SFCXm=$SFCX_P$HOURtest eval cp $SIGX1m $DATA/${RUM}.sigr1 eval cp $SIGX2m $DATA/${RUM}.sigr2 eval cp $SFCXm $DATA/${RUM}.sfcr done #MN SIGI=$DATA/${RUM}.sigr1 SIGI2=$DATA/${RUM}.sigr2 SFCI=$DATA/${RUM}.sfcr fi #goodrestart fi #goodrestart else #-f echo Restart file $SIGX1test for Member $MN is not available goodrestart=no fi #-f done #SIGX1test fi #goodrestart fi #RERUN if [[ $goodrestart = no ]]; then export RERUN=YES echo Restart files not available, starting with initial conditions fi echo after restart file tests echo goodrestart=$goodrestart echo RERUN=$RERUN echo RUN_CONCURRENT=$RUN_CONCURRENT if [[ $RERUN = YES ]]; then if [[ $RUN_CONCURRENT = yes ]]; then if [[ $cycsuffix = false ]]; then if [[ $FORECAST_SEGMENT = lr ]]; then export SIGI=$GESdir/${RUM}.t${cyc}z.sig${hour_lr_ini}_T$JCAPLR\L$LEVSLR export SFCI=$GESdir/${RUM}.t${cyc}z.sfc${hour_lr_ini}_T$JCAPLR\L$LEVSLR else export SIGI=$GESdir/${RUM}.t${cyc}z.sanl export SFCI=$GESdir/${RUM}.t${cyc}z.sfcanl fi else export SIGI=$GESdir/${RUM}.t${cyc}z.sanl.cycfs$cyc_fcst export SFCI=$GESdir/${RUM}.t${cyc}z.sfcanl.cycfs$cyc_fcst fi for MN in $MEMBER_NAMES do if eval test -f $SIGI -a -f $SFCI then msg="Forecast Starting with Initial Guess Fields, member $MN" postmsg "$jlogfile" "$msg" else msg="FATAL ERROR: Initial Guess Fields (member $MN) Not Available/Rerun JENS_INIT" echo "`date` $msg" postmsg "$jlogfile" "$msg" export pgm=JENS_FCST export err=911 err_chk fi done else #RUN_CONCURRENT if [[ $cycsuffix = false ]]; then if [[ $FORECAST_SEGMENT = lr ]]; then export SIGI=$GESdir/${RUN}.t${cyc}z.sig${hour_lr_ini}_T$JCAPLR\L$LEVSLR export SFCI=$GESdir/${RUN}.t${cyc}z.sfc${hour_lr_ini}_T$JCAPLR\L$LEVSLR else export SIGI=$GESdir/${RUN}.t${cyc}z.sanl export SFCI=$GESdir/${RUN}.t${cyc}z.sfcanl fi else export SIGI=$GESdir/${RUN}.t${cyc}z.sanl.cycfs$cyc_fcst export SFCI=$GESdir/${RUN}.t${cyc}z.sfcanl.cycfs$cyc_fcst fi if test -f $SIGI -a -f $SFCI then msg="Forecast Starting with Initial Guess Fields" echo "`date` $msg" postmsg "$jlogfile" "$msg" else msg="FATAL ERROR: Initial Guess Fields Not Available/Rerun JENS_INIT" echo "`date` $msg" postmsg "$jlogfile" "$msg" export pgm=JENS_FCST export err=911 err_chk fi fi #RUN_CONCURRENT fi #RERUN #################################### # Specify Special Fcst Vars #################################### #################################### # Checking Initial files Consistency #################################### if [[ $RUN_CONCURRENT = yes ]]; then CONC_INI=`echo $MEMBER_NAMES|cut -c1-3` MN=$CONC_INI eval echo SIGI=$SIGI export JCAP=$(eval $SIGHDR $SIGI jcap) export LEVS=$(eval $SIGHDR $SIGI levs) export LONB=$(eval $SIGHDR $SIGI lonb) export LATB=$(eval $SIGHDR $SIGI latb) export HOUR=$(eval $SIGHDR $SIGI fhour) else export JCAP=$($SIGHDR $SIGI jcap) export LEVS=$($SIGHDR $SIGI levs) export LONB=$($SIGHDR $SIGI lonb) export LATB=$($SIGHDR $SIGI latb) export HOUR=$($SIGHDR $SIGI fhour) fi jcapin=$JCAP levsin=$LEVS lonbin=$LONB latbin=$LATB hourin=$HOUR if [[ $RUN_CONCURRENT = yes ]]; then for MN in $MEMBER_NAMES do export JCAP=$(eval $SIGHDR $SIGI jcap) export HOUR=$(eval $SIGHDR $SIGI fhour) if [[ $jcapin != $JCAP ]] || [[ $hourin != $HOUR ]] ; then echo Forecast jobs is aborted msg="FATAL ERROR: Initial file JCAP=$JCAP for member $MN does not match member $CONC_INI" echo "`date` $msg" postmsg "$jlogfile" "$msg" export pgm=JENS_FCST export err=911 err_chk fi done fi if [[ $FORECAST_SEGMENT = lr ]] ; then if [[ $jcapin = $JCAPLR ]] && [[ $levsin = $LEVSLR ]]; then echo Initial files are consistent with the required resolution $FORECAST_SEGMENT echo Forecast proceed with T$jcapin\L$levsin else echo Initial files are not consistent with the required resolution $FORECAST_SEGMENT echo $jcapin $levsin echo Forecast job failed. Please check the initial files msg="Initial files with $jcapin $levsin are not consistent with $FORECAST_SEGMENT" postmsg "$jlogfile" "$msg" export pgm=JENS_FCST export err=911 err_chk fi else if [[ $jcapin = $JCAPHR ]] && [[ $levsin = $LEVSHR ]]; then echo Initial files are consistent with the required resolution: $FORECAST_SEGMENT echo Forecast proceed with T$jcapin\L$levsin else echo Forecast job failed. Please check the initial files msg="FATAL ERROR: Initial files with $jcapin $levsin are not consistent with $FORECAST_SEGMENT" echo "`date` $msg" postmsg "$jlogfile" "$msg" export pgm=JENS_FCST export err=911 err_chk fi fi # Set the variable which indicates whether to skip the 3-hourly output, no=0, yes=1 if (( hourin >= fhmax3 )); then skip3=1 else skip3=0 fi env | sort echo #if test $JCAP -eq $jcapin if test $JCAPHR -eq $jcapin then if (( skip3 == 0 )); then #################################################### # variables for high-resolution forecast first part # from FH=00-fhmax3, 3-hourly output #################################################### export JCAP=$jcapin export LEVS=$levsin export LONB=$lonbin export LATB=$latbin # # Forecast Fix Fields # export CO2CON=$FIXGLOBAL/global_co2con.l${LEVS}.f77 export MTNVAR=$FIXGLOBAL/global_mtnvar.t${JCAP}.f77 # # Forecast Hour Output Frequency # 3-hourly output to generate boundary conditions for sref # export FHOUT=3 # # Forecast Length (Hours) # if [[ $fcstlong = true ]]; then # if [[ $fhmax -ge $fhmax3 ]]; then if [[ $fhmaxh -ge $fhmax3 ]]; then export FHMAX=$fhmax3 else # export FHMAX=$fhmax export FHMAX=$fhmaxh fi else export FHMAX=6 export fhmaxh=6 fi # # Forecast Hour Restart Frequency # export FHRES=$fhrestart3 # # Interval to Zero out precip field,etc. # Should not be less that FHOUT # export FHZER=6 # # Half number of hours of digital filter initialization # if test $RERUN = "YES" then export FHDFI=$fhdfihires else export FHDFI=0 fi # # Surface cycling boundary condition update frequency in hours # export FHCYC=24 # # Specify the integration hours at which extra forecast is output after SPS application # DHOU, 09/19/2008, added HOUTASPS variable (( HOUTASPS = fhmaxh - HOUTSPS )) if [[ $HOUTASPS -ge $FHMAX ]]; then # (( HOUTASPS = 10000 )) (( HOUTASPS = FHMAX )) fi export NMSUB="" export HOUTASPS export MN=`echo $MEMBER_NAMES|cut -c1-3` # correct the surface cycling export CYCLVARS="FVETL=99999,FSOTL=99999,FSLPL=99999" # # Execute the forecast script $fcstscript #DHOU !!!! simplifid this part? no test? # if [[ $GFS_VERSION = gefs_prod ]]; then # $HOMEgefs/scripts/exgefs_fcst_conc.sh.ecf # elif [[ $GFS_VERSION = gfs_prod ]]; then # $HOMEgefs/scripts/exglobal_fcst.sh.ecf # else # echo Invalid value GFS_VERSION=$GFS_VERSION # fi # else # $HOMEgefs/scripts/exglobal_fcst.sh.ecf # fi fi # if [[ $fcstlong = true ]] && [[ $fhmax -gt $fhmax3 ]] ; then # if [[ $fhmax -gt $fhmax3 ]] ; then if [[ $fhmaxh -gt $fhmax3 ]] ; then ####################################################### # variables for high-resolution forecast second part # from FH=fhmax3-fhmaxm, 6-hourly output ####################################################### export JCAP=$jcapin export LEVS=$levsin export LONB=$lonbin export LATB=$latbin if (( skip3 == 0 )); then # Restart Files for the second part if [[ $RUN_CONCURRENT = yes ]] ; then # # Restart Files for the second part # DHOU, 01/08/2008, modify the following 3 lines(#) and # extend the block into IF(SIGR etc) and FOR(MN) blocks for CONCURENT run. for MN in $MEMBER_NAMES do # if [[ $ENS_SPS = true ]]; then if [[ $ENS_SPS = .true. ]]; then echo TTTT SIGS if eval test -f $SIGX1 -a -f $SIGX2 -a -f $SFCX then eval cp $SIGX1 $DATA/${RUM}.sigr1 eval cp $SIGX2 $DATA/${RUM}.sigr2 eval cp $SFCX $DATA/${RUM}.sfcr else msg="FATAL ERROR: Restart file for Member $MN is not available" echo "`date` $msg" postmsg "$jlogfile" "$msg" export pgm=JENS_FCST export err=911 err_chk fi else echo TTTT SIGR if eval test -f $SIGX1 -a -f $SIGX2 -a -f $SFCX then eval cp $SIGX1 $DATA/${RUM}.sigr1 eval cp $SIGX2 $DATA/${RUM}.sigr2 eval cp $SFCX $DATA/${RUM}.sfcr else msg="FATAL ERROR: Restart file for Member $MN is not available" echo "`date` $msg" postmsg "$jlogfile" "$msg" export pgm=JENS_FCST export err=911 err_chk fi fi done export SIGI=$DATA/${RUM}.sigr1 export SIGI2=$DATA/${RUM}.sigr2 export SFCI=$DATA/${RUM}.sfcr else #RUN_CONCURRENT eval cp $SIGX1 $DATA/sigr1 eval cp $SIGX2 $DATA/sigr2 eval cp $SFCX $DATA/sfcr export SIGI=$DATA/sigr1 export SIGI2=$DATA/sigr2 export SFCI=$DATA/sfcr fi #RUN_CONCURRENT fi # of skip3=0 # # Forecast Fix Fields # export CO2CON=$FIXGLOBAL/global_co2con.l${LEVS}.f77 export MTNVAR=$FIXGLOBAL/global_mtnvar.t${JCAP}.f77 # # Forecast hour to Read One Time level # if test $RERUN = "NO" then export FHROT=$hourin else export FHROT=$fhmax3 fi # # Forecast Hour Output Frequency # export FHOUT=6 # # Forecast Length (Hours) # if (( fhmaxh < fhmax )); then export FHMAX=$fhmaxh else export FHMAX=$fhmax fi # # Forecast Hour Restart Frequency # export FHRES=$fhrestart # # Interval to Zero out precip field,etc. # Should not be less that FHOUT # export FHZER=6 # # Half number of hours of digital filter initialization # if (( skip3 == 1 )); then if test $RERUN = "YES" then export FHDFI=$fhdfihires else export FHDFI=0 fi else export FHDFI=0 fi # # Surface cycling boundary condition update frequency in hours # export FHCYC=24 # #DHOU, 09/09/2008 add HOUTASPS to make the output after SPS, $HOUTASPS hour earlier # to facilitate digital filtering after resolution change (( HOUTASPS = FHMAX - HOUTSPS )) export HOUTASPS echo $HOUTASPS =HOUTASPS export NMSUB="" #DHOU 08/05/2010 Added this line export MN=`echo $MEMBER_NAMES|cut -c1-3` # # correct the surface cycling export CYCLVARS="FVETL=99999,FSOTL=99999,FSLPL=99999" # # Execute the forecast script $fcstscript # if [[ $RUN_CONCURRENT = yes ]]; then # if [[ $GFS_VERSION = gefs_prod ]]; then # $HOMEgefs/scripts/exgefs_fcst_conc.sh.ecf # elif [[ $GFS_VERSION = gfs_prod ]]; then # $HOMEgefs/scripts/exglobal_fcst.sh.ecf # else # echo Invalid value GFS_VERSION=$GFS_VERSION # fi # else # $HOMEgefs/scripts/exglobal_fcst.sh.ecf # fi ### Save the HOUTASPS-hour sf and bf files for the LOW-RES run: if [[ $RUN_CONCURRENT = yes ]]; then for MN in $MEMBER_NAMES do if [[ $cycsuffix = false ]]; then eval cp -pr $COMOUT/$cyc/sfcsig/${RUM}.${cycle}.sf${HOUTASPS} $GESdir/. eval cp -pr $COMOUT/$cyc/sfcsig/${RUM}.${cycle}.bf${HOUTASPS} $GESdir/. # if [[ $ENS_SPS = true ]]; then if [[ $ENS_SPS = .true. ]]; then eval cp -pr $COMOUT/$cyc/sfcsig/${RUM}.${cycle}.ss${HOUTASPS} $GESdir/. eval cp -pr $COMOUT/$cyc/sfcsig/${RUM}.${cycle}.bs${HOUTASPS} $GESdir/. fi fi done else if [[ $cycsuffix = false ]]; then cp -pr $COMOUT/$cyc/sfcsig/${RUN}.${cycle}.sf${HOUTASPS} $GESdir/. cp -pr $COMOUT/$cyc/sfcsig/${RUN}.${cycle}.bf${HOUTASPS} $GESdir/. fi fi ### End of saving the HOUTASPS-hour sf and bf files for the LOW-RES run: fi # fhmaxh >= fhmax3 fi # JCAPHR -eq jcapin # end of high resolution #### DHOU, 09/10/2010 added this block for truncation of forecast files to prepair for lower res. #if [[ $fcstlong = true ]] && (( fhmax > fhmaxh )) ; then if [[ $FORECAST_SEGMENT != hr ]] && [[ $fcstlong = true ]] && (( fhmax > fhmaxh )) ; then ####################################################### # variables for low-resolution forecast third part # from FH=fhmaxh-fhmax, 6-hourly output ####################################################### # Interpolate restart Files for the third part export JCAP=$JCAPLR export LEVS=$LEVSLR export LONB=$LONBLR export LATB=$LATBLR export NTRAC=$NTRACLR export IDVC=$IDVC export NVCOORD=$IDVC export CHGRESVARS="NTRAC=$NTRACLR,NVCOORD=$NVCOORD" if (( IDVC == 1 )); then export SIGLEVEL=$FIXGLOBAL/global_siglevel.l${LEVS}.txt fi if (( IDVC == 2 )); then export SIGLEVEL=$FIXGLOBAL/global_hyblev.l${LEVS}.txt fi fi # Change resolution of the high-res forecast files # Write the resuled files in $GESdir and make a copy in $DATA if [[ $FORECAST_SEGMENT = hl ]] && [[ $fcstlong = true ]] && (( fhmax > fhmaxh )) ; then if [[ $RUN_CONCURRENT = YES ]] ; then for MN in $MEMBER_NAMES do # eval export SIGOUT=$DATA/${RUM}.siganl # eval export SFCOUT=$DATA/${RUM}.sfcanl eval export SIGOUT=$GESdir/${RUM}.${cycle}.sig${HOUTASPS}_T$JCAP\L$LEVS eval export SFCOUT=$GESdir/${RUM}.${cycle}.sfc${HOUTASPS}_T$JCAP\L$LEVS if [[ $cycsuffix = false ]]; then # if [[ $ENS_SPS = true ]]; then if [[ $ENS_SPS = .true. ]]; then eval export SIGINP=$COMOUT/$cyc/sfcsig/${RUM}.t${cyc}z.ss${HOUTASPS} eval export SFCINP=$COMOUT/$cyc/sfcsig/${RUM}.t${cyc}z.bs${HOUTASPS} else eval export SIGINP=$COMOUT/$cyc/sfcsig/${RUM}.t${cyc}z.sf${HOUTASPS} eval export SFCINP=$COMOUT/$cyc/sfcsig/${RUM}.t${cyc}z.bf${HOUTASPS} fi else # if [[ $ENS_SPS = true ]]; then if [[ $ENS_SPS = .true. ]]; then eval export SIGINP=$COMOUT/$cyc/sfcsig/${RUM}.t${cyc}z.ss${HOUTASPS}.cycfs$cyc_fcst eval export SFCINP=$COMOUT/$cyc/sfcsig/${RUM}.t${cyc}z.bs${HOUTASPS}.cycfs$cyc_fcst else eval export SIGINP=$COMOUT/$cyc/sfcsig/${RUM}.t${cyc}z.sf${HOUTASPS}.cycfs$cyc_fcst eval export SFCINP=$COMOUT/$cyc/sfcsig/${RUM}.t${cyc}z.bf${HOUTASPS}.cycfs$cyc_fcst fi fi echo `date` timing lr chgres $MN before $chgresush >>$pgmout echo `date` timing lr $MN chgres after eval cp -pr $SIGOUT $DATA eval cp -pr $SFCOUT $DATA done #MN else export SIGOUT=$GESdir/${RUN}.${cycle}.sig${HOUTASPS}_T$JCAP\L$LEVS export SFCOUT=$GESdir/${RUN}.${cycle}.sfc${HOUTASPS}_T$JCAP\L$LEVS if [[ $cycsuffix = false ]]; then # if [[ $ENS_SPS = true ]]; then if [[ $ENS_SPS = .true. ]]; then export SIGINP=$COMOUT/$cyc/sfcsig/${RUN}.t${cyc}z.ss${HOUTASPS} export SFCINP=$COMOUT/$cyc/sfcsig/${RUN}.t${cyc}z.bs${HOUTASPS} else export SIGINP=$COMOUT/$cyc/sfcsig/${RUN}.t${cyc}z.sf${HOUTASPS} export SFCINP=$COMOUT/$cyc/sfcsig/${RUN}.t${cyc}z.bf${HOUTASPS} fi else # if [[ $ENS_SPS = true ]]; then if [[ $ENS_SPS = .true. ]]; then export SIGINP=$COMOUT/$cyc/sfcsig/${RUN}.t${cyc}z.ss${HOUTASPS}.cycfs$cyc_fcst export SFCINP=$COMOUT/$cyc/sfcsig/${RUN}.t${cyc}z.bs${HOUTASPS}.cycfs$cyc_fcst else export SIGINP=$COMOUT/$cyc/sfcsig/${RUN}.t${cyc}z.sf${HOUTASPS}.cycfs$cyc_fcst export SFCINP=$COMOUT/$cyc/sfcsig/${RUN}.t${cyc}z.bf${HOUTASPS}.cycfs$cyc_fcst fi fi echo `date` timing lr chgres before $chgresush >>$pgmout echo `date` timing lr chgres after cp -pr $SIGOUT $DATA cp -pr $SFCOUT $DATA fi # Redefine the $SIGI file names if [[ $RUN_CONCURRENT = yes ]]; then # export SIGI=$DATA/${RUM}.siganl # export SFCI=$DATA/${RUM}.sfcanl export SIGI=$DATA/${RUM}.${cycle}.sig${HOUTASPS}_T$JCAP\L$LEVS export SFCI=$DATA/${RUM}.${cycle}.sfc${HOUTASPS}_T$JCAP\L$LEVS else # export SIGI=$DATA/siganl # export SFCI=$DATA/sfcanl export SIGI=$DATA/${cycle}.sig${HOUTASPS}_T$JCAP\L$LEVS export SFCI=$DATA/${cycle}.sfc${HOUTASPS}_T$JCAP\L$LEVS fi fi # End of resolution change #### DHOU, 09/10/2010 added this block for lower res. forecast if [[ $FORECAST_SEGMENT != hr ]] && [[ $fcstlong = true ]] && (( fhmax > fhmaxh )) ; then if [[ $FORECAST_SEGMENT = lr ]] ; then # (( HOUTASPS = fhmaxh - HOUTSPS )) (( HOUTASPS = hour_lr_ini )) export MN=`echo $MEMBER_NAMES|cut -c1-3` fi if test $RERUN = "YES" then unset SIGI2 fi # # Forecast Fix Fields # export CO2CON=$FIXGLOBAL/global_co2con.l${LEVS}.f77 export MTNVAR=$FIXGLOBAL/global_mtnvar.t${JCAP}.f77 ############################################################ # # Forecast hour to Read One Time level # if test $RERUN = "NO" then export FHROT=$hourin else # export FHROT=$fhmax3 export FHROT=$HOUTASPS fi # # Forecast Hour Output Frequency # export FHOUT=6 # # Forecast Length (Hours) # export FHMAX=$fhmax # # Forecast Hour Restart Frequency # export FHRES=$fhrestart # # Interval to Zero out precip field,etc. # Should not be less that FHOUT # export FHZER=6 # # Half number of hours of digital filter initialization # # export FHDFI=$fhdfilores if test $RERUN = "YES" then export FHDFI=$fhdfilores else export FHDFI=0 fi # # Surface cycling boundary condition update frequency in hours # export FHCYC=24 # HOUTASPS=10000 (( HOUTASPS = FHMAX - HOUTSPS )) # (( HOUTASPS = HOUTASPS + HOUTSPS + 10000 )) if test $RERUN = "YES" then export NMSUB=".lr" fi export HOUTASPS=$HOUTASPS # correct the surface cycling export CYCLVARS="FVETL=99999,FSOTL=99999,FSLPL=99999" # # Execute the forecast script $fcstscript # if [[ $RUN_CONCURRENT = yes ]]; then # if [[ $GFS_VERSION = gefs_fcst ]]; then # $HOMEgefs/scripts/exgefs_fcst_conc.sh.ecf # elif [[ $GFS_VERSION = gfs_fcst ]]; then # $HOMEgefs/scripts/exglobal_fcst.sh.ecf # else # echo Invalid value GFS_VERSION=$GFS_VERSION # fi # else # $HOMEgefs/scripts/exglobal_fcst.sh.ecf # fi ### Save the HOUTASPS-hour sf and bf files for the extended-Range run: if [[ $RUN_CONCURRENT = yes ]]; then for MN in $MEMBER_NAMES do if [[ $cycsuffix = false ]]; then eval cp -pr $COMOUT/$cyc/sfcsig/${RUM}.${cycle}.sf${HOUTASPS} $GESdir/. eval cp -pr $COMOUT/$cyc/sfcsig/${RUM}.${cycle}.bf${HOUTASPS} $GESdir/. # if [[ $ENS_SPS = true ]]; then if [[ $ENS_SPS = .true. ]]; then eval cp -pr $COMOUT/$cyc/sfcsig/${RUM}.${cycle}.ss${HOUTASPS} $GESdir/. eval cp -pr $COMOUT/$cyc/sfcsig/${RUM}.${cycle}.bs${HOUTASPS} $GESdir/. fi fi done else if [[ $cycsuffix = false ]]; then cp -pr $COMOUT/$cyc/sfcsig/${RUN}.${cycle}.sf${HOUTASPS} $GESdir/. cp -pr $COMOUT/$cyc/sfcsig/${RUN}.${cycle}.bf${HOUTASPS} $GESdir/. fi fi fi # end of added block for lower res. forecast #XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX cat $pgmout echo if [[ $RUN_CONCURRENT = yes ]]; then echo echo `date` sorted forecast output begin echo cat $PGMOUT | sort -n -k1 echo echo `date` sorted forecast output end echo fi echo `date` TEST LISTING OF WORKING DIRECTORY BEGIN echo DATA=$DATA ls -al $DATA echo `date` TEST LISTING OF WORKING DIRECTORY END msg="ENDED NORMALLY." postmsg "$jlogfile" "$msg" ############################## # Remove the Temporary working directory ############################## cd $DATA_IN #rm -rf $DATA echo `date` $0 `date -u` end