#!/bin/sh export PS4='$SECONDS + ' $SMSBIN/smsinit $LOADL_STEP_ID date set -xa # #### 01/16/10 ############################### # SETUP GFS FCST PROCESSING VARIABLES # ############################################# #################################### # obtain unique process id (pid) and make temp directory #################################### export pid=$$ export DATA=/tmpnwprd/${job}.${pid} mkdir $DATA cd $DATA export cycle=t${cyc}z #################################### # Specify NET and RUN Name and model #################################### export NET=gfs export RUN=gfs #################################### # File To Log Msgs #################################### export jlogfile=/com/logs/jlogfile #################################### # Determine Job Output Name on System #################################### export outid="LL$job" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" export pgmerr=errfile #################################### # SAVEGES - Copy Files From TMPDIR to $GESdir # SENDSMS - Flag Events on SMS # 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.sms # GET_IOPROFILE - Run I/O statistics #################################### export SAVEGES=YES export SENDSMS=YES export SENDCOM=YES export SENDDBN=NO export RERUN=NO export VERBOSE=YES export GET_IOPROFILE=NO #################################### # Specify Execution Areas #################################### export HOMEGLOBAL=/nwprod export EXECGLOBAL=$HOMEGLOBAL/exec export FIXGLOBAL=$HOMEGLOBAL/fix export USHGLOBAL=$HOMEGLOBAL/ush 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 ############################ sh $utilscript/setup.sh ############################## # Run setpdy and initialize PDY variables ############################## sh $utilscript/setpdy.sh . PDY ############################################## # Define COM directories ############################################## export COMIN=/com/${NET}/${envir}/${RUN}.${PDY} export COMOUT=/com/${NET}/${envir}/${RUN}.${PDY} mkdir -m 775 -p $COMOUT ############################################## # Define GES directories ############################################## gespath=/nwges/${envir} export GESdir=$gespath/${RUN}.${PDY} mkdir -m 775 -p $GESdir #################################### # Specify Special Fcst Vars #################################### # # Forecast Horizontal Resolution # export JCAP=574 export LONB=1760 export LATB=880 export LONR=1760 export LATR=880 export LONF=1760 export LATG=880 # # Forecast Vertical Resolution # export LEVS=64 # # Forecast Time Step # export DELTIM=120 export CO2CON=$FIXGLOBAL/global_co2con.l${LEVS}.f77 export CO2DIR=$FIXGLOBAL/fix_co2_proj export CO2_seasonal_cycle=$FIXGLOBAL/global_co2monthlycyc1976_2006.txt export MTNVAR=$FIXGLOBAL/global_mtnvar.t${JCAP}.f77 export CLTUNE=$FIXGLOBAL/global_cldtune.f77 export DTBTHE=$FIXGLOBAL/global_tbthe.f77 export O3FORC=$FIXGLOBAL/global_o3prdlos.f77 #export O3LOSS=$FIXGLOBAL/global_o3loss.f77 export O3CLIM=$FIXGLOBAL/global_o3clim.txt export OROGRAPHY=$FIXGLOBAL/global_orography.t$JCAP.grb # # Output File Names # export SIGO=$COMOUT/${RUN}.${cycle}.sf'${FH}' export SFCO=$COMOUT/${RUN}.${cycle}.bf'${FH}' export FLXO=$COMOUT/${RUN}.${cycle}.sfluxgrbf'${FH}' export G3DO=$COMOUT/${RUN}.${cycle}.g3df'${FH}' export LOGO=$COMOUT/${RUN}.${cycle}.logf'${FH}' # # Restart File Names # export SIGR1=$GESdir/${RUN}.${cycle}.sigr1.t${JCAP}l${LEVS} export SIGR2=$GESdir/${RUN}.${cycle}.sigr2.t${JCAP}l${LEVS} export SFCR=$GESdir/${RUN}.${cycle}.sfcr.t${JCAP}l${LEVS} msg="HAS BEGUN on `hostname`" postmsg "$jlogfile" "$msg" #################################### # Check if this is a restart # # Define Initialization File Names # #################################### #if test -f $SIGR1 -a -f $SIGR2 -a -f $SFCR -a $RERUN = "NO" #then # cp $SIGR1 $DATA/sigr1 # cp $SIGR2 $DATA/sigr2 # cp $SFCR $DATA/sfcr export SIGI=/com/gfs/prod/gfs.20120801/gfs.t06z.sf150 export FHMAX=168 export SIGI2=/com/gfs/prod/gfs.20120801/gfs.t06z.sf150 export SFCI=/com/gfs/prod/gfs.20120801/gfs.t06z.bf150 msg="Forecast Starting with Restart files in $GESdir" postmsg "$jlogfile" "$msg" #else # export SIGI=$GESdir/${RUN}.t${cyc}z.sanl # export SFCI=$GESdir/${RUN}.t${cyc}z.sfcanl # # if test -f $SIGI -a -f $SFCI # then # msg="Forecast Starting with Initial Guess Fields" # postmsg "$jlogfile" "$msg" # else # msg="Initial Guess Fields Not Available/Rerun $job" # postmsg "$jlogfile" "$msg" # export pgm=$job # export err=911 # err_chk # fi #fi ############################ # Added to reduce wall time when running more than one task per node #export MP_SHARED_MEMORY=YES #export MP_SHARED_MEMORY=NO #export MP_EAGER_LIMIT=0 env ############################################################ # Input parameters to the Model ############################################################ export FHROT=0 # Forecast hour to Read One Time level export FHOUT=3 # Forecast Hour Output Frequency export FHMAX=192 # Forecast Length (Hours) export FHRES=24 # Forecast Hour Restart Frequency export FHZER=6 # Interval to Zero out precip field,etc. Should not be less that FHOUT export FHDFI=3 # Half number of hours of digital filter initialization export FHCYC=24 # Surface cycling boundary condition update frequency in hours export FHLWR=1 # LW radiation calling interval (hrs) export FHSWR=1 # SW radiation calling interval (hrs) export IEMS=0 # 0-blackbody ground emission; 1-climatology on one-deg map export ISOL=0 # 0--fixed solar constant; 1--changing solar constant export IAER=111 # 111--with stratospheric aerosol, tropospheric aerosol LW, troposphere aerosol SW. export ICO2=1 # 0--fixed CO2 constant; 1--time varying global mean CO2; 2--changing CO2 # Variables for High Frequency Output export FHOUT_HF=1 # High Frequency Forecast Output Interval export FHMAX_HF=12 # High Frequency Forecast Length (Hours) # Variables for GOCART Output export FHGOC3D=0 # Forecast Output Length for G3D files for GOCART export LGOC3D=.false. # Control Variable to output the G3D files for GOCART # Variables for input to the Namelist export ialb=0 # 0: climatology sw albedo based on surface veg types; # 1: MODIS based land surface albedo export IOVR_SW=1 # 0--random cloud overlap for SW; 1--maximum-random cloud overlap for SW # Other parameters input to the model export FCSTVARS="ras=.false.,nsout=0,lsm=1,tfiltc=0.85,liope=.true.,zhao_mic=.true.,ncw=50,150,crtrh=0.85,0.85,0.85,flgmin=0.220,IALB=$ialb,ccnorm=.false.,OUT_VIRTTEMP=.true.,LDIAG3D=.false.,mstrat=.false.,ctei_rm=0.50,MOM4ICE=.false.,cnvgwd=.false.,RUN_ENTHALPY=.false.,IOVR_SW=$IOVR_SW,zflxtvd=.true.,sashal=.true.,old_monin=.false.,newsas=.true.,ICTM=1," if [ $LGOC3D = .true. ] ; then export FCSTVARS="LGOC3D=$LGOC3D,FHGOC3D=$FHGOC3D,$FCSTVARS" fi ###################### # PDS Grid Designator ###################### export NTHREADS=4 export IGEN=96 # # Execute the Forecast script # #export pgm=exglobal_fcst.sh.sms startmsg if [ $GET_IOPROFILE = YES ]; then /usrx/local/mio/tools/bin/miostats -X0 /nw${envir}/scripts/exglobal_fcst.sh.sms else /nw${envir}/scripts/exglobal_fcst.sh.sms fi err=$?;err_chk # for the chgres in the forecast low job cp ${COMOUT}/$RUN.$cycle.sf180 $GESdir cp ${COMOUT}/$RUN.$cycle.bf180 $GESdir cp $SIGR1 $GESdir/${RUN}.${cycle}.sigr1.f$FHMAX cp $SIGR2 $GESdir/${RUN}.${cycle}.sigr2.f$FHMAX cp $SFCR $GESdir/${RUN}.${cycle}.sfcr.f$FHMAX # cat $pgmout msg="ENDED NORMALLY." postmsg "$jlogfile" "$msg" date ################################################## # save the profiling data captured from miostats ################################################## if [ $GET_IOPROFILE = YES ]; then . /com/miostats/.set_IOprofile fi ############################## # Remove the Temporary working directory ############################## cd /tmpnwprd rm -rf $DATA $SMSBIN/endt