#!/bin/ksh # set -x # August 2005: Hui-Ya Chuang, NCEP: This script uses # NCEP's WRF-POSTPROC to post processes WRF native model # output, and uses copygb to horizontally interpolate posted # output from native A-E to a regular projection grid. # # July 2006: Meral Demirtas, NCAR/DTC: Added new "copygb" # options and revised some parts for clarity. # #-------------------------------------------------------- # This script performs 2 jobs: # # 1. Run WRF-POSTPROC # 2. Run copygb to horizontally interpolate output from # native A-E to a regular projection grid #-------------------------------------------------------- # Set path to your top directory and your run dorectory # export TOP_DIR=/soft/wrf/3.2/ompi export DOMAINPATH=/scratch3/franks/17June2010/WPP_Test #Specify Dyn Core (ARW or NMM in upper case) dyncore="ARW" if [ $dyncore = "NMM" ]; then export tag=NMM elif [ $dyncore = "ARW" ]; then export tag=NCAR else echo "${dyncore} is not supported. Edit script to choose ARW or NMM dyncore." exit fi Specify forecast start date # fhr is the first forecast hour to be post-processed # lastfhr is the last forecast hour to be post-processed # incrementhr is the incement (in hours) between forecast files export startdate=2010061718 export fhr=00 export lastfhr=01 export incrementhr=01 export incrementmin=15 export lastmin=45 # Path names for WRF_POSTPROC and WRFV3 export WRF_POSTPROC_HOME=${TOP_DIR}/WPPV3 export POSTEXEC=${WRF_POSTPROC_HOME}/exec export SCRIPTS=${WRF_POSTPROC_HOME}/scripts export WRFPATH=${TOP_DIR}/WRFV3 export WPPPATH=${TOP_DIR}/WPPV3 # cd to working directory cd ${DOMAINPATH}/postprd # Link Ferrier's microphysic's table and WRF-POSTPROC control file, ln -fs ${WRFPATH}/run/ETAMPNEW_DATA eta_micro_lookup.dat ln -fs ${DOMAINPATH}/parm/wrf_cntrl.parm . export tmmark=tm00 export MP_SHARED_MEMORY=yes export MP_LABELIO=yes ####################################################### # 1. Run WRF-POSTPROC # # The WRF-POSTPROC is used to read native WRF model # output and put out isobaric state fields and derived fields. # ####################################################### pwd ls -x export NEWDATE=$startdate while [ $fhr -le $lastfhr ] ; do typeset -Z3 fhr NEWDATE=`${POSTEXEC}/ndate.exe +${fhr} $startdate` YY=`echo $NEWDATE | cut -c1-4` MM=`echo $NEWDATE | cut -c5-6` DD=`echo $NEWDATE | cut -c7-8` HH=`echo $NEWDATE | cut -c9-10` echo 'NEWDATE' $NEWDATE echo 'YY' $YY export min=00 while [ $min -le $lastmin ] ; do #for domain in d01 d02 d03 for domain in d01 do cat > itag < wrfpost_${domain}.${fhr}_${min}.out 2>&1 if [ $min = 00 ]; then mv WRFPRS${fhr}:${min}.tm00 WRFPRS_${domain}.${fhr}_${min} fi