#!/bin/bash # TJ Olney 2008 # assumes $BASEDIR is in the environment. # If called on the command line with the name of a domain, it checks that domain # Otherwise it checks the most recently created domain. # It should be run after a WINDOW has been created for the domain. startdir=$PWD cd $BASEDIR/WRF/wrfsi >/dev/null if [ -n $1 ] then NEWDOMAIN1=$1; echo $1 fi if [ -z $1 ] then echo "Finding Newest DOMAIN" #pushd $BASEDIR/WRF/wrfsi >/dev/null NEWDOMAIN1=$(ls -rt domains |tail -2 |head -1) popd >/dev/null fi if [[ $NEWDOMAIN1 == *[-]WINDOW ]] then echo "$(ls -rt domains | tail -1), the most recently created domain, does not have a newly created Window of its own." echo "You should create /recreate your Window first then re-run this check," echo "Or give the name of the domain to check on the command line." echo "Existing Domains are:" echo "$(ls -rt domains)" echo " " exit fi echo "Checking problem settings for $NEWDOMAIN1 and $NEWDOMAIN1-WINDOW" echo "If that is not right, press control-c now pausing 10 seconds" sleep 3 echo "MAX_DOM in wrf.nl should equal NUM_DOMAINS in wrfsi.nl and should be only 2, not 3 for a windowed run." echo "In file $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrf.nl" grep -i MAX_DOM $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrf.nl echo "In file $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrfsi.nl" grep -i NUM_DOMAINS $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrfsi.nl echo "In file $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1-WINDOW/static/wrfsi.nl" grep -i NUM_DOMAINS $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1-WINDOW/static/wrfsi.nl echo " " echo " " echo " NUM_ACTIVE_SUBNESTS Must be 1 (even for a windowed run)" echo " In file $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrfsi.nl" #grep -i sub $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrfsi.nl #grep 'NUM_ACTIVE' $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrfsi.nl grep 'ACTIVE' $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrfsi.nl echo "In file $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1-WINDOW/static/wrfsi.nl" grep 'ACTIVE' $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1-WINDOW/static/wrfsi.nl echo "" echo "deltas (dy dx, MOAD_DELTA)should be the same precision in all namelist.template and wrfsi.nl files" echo "In file $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrfsi.nl" grep -i moad_delta $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrfsi.nl echo "In file $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1-WINDOW/static/wrfsi.nl" grep -i moad_delta $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1-WINDOW/static/wrfsi.nl echo "In file $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrf.nl" egrep -i 'dx| dy ' $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrf.nl echo "and" echo "RUN_HOURS should be = 0" grep RUN_HOURS $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrf.nl echo " " #$BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrfsi.nl #$BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrfsi.nl echo "SPECIFIED should be = .true.,.false.,.false.," echo "In $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrf.nl" grep SPECIFIED $BASEDIR/WRF/wrfsi/domains/$NEWDOMAIN1/static/wrf.nl echo "In $BASEDIR/WRF/WRFV2/RASP/$NEWDOMAIN1/namelist.template" grep SPECIFIED $BASEDIR/WRF/WRFV2/RASP/$NEWDOMAIN1/namelist.template echo "In $BASEDIR/WRF/WRFV2/RASP/$NEWDOMAIN1-WINDOW/namelist.template" grep SPECIFIED $BASEDIR/WRF/WRFV2/RASP/$NEWDOMAIN1-WINDOW/namelist.template echo " " echo "templates installed as follows" find $BASEDIR -name "*$NEWDOMAIN1.*namelist.template" echo "" echo "They should also have matching precision and subnests" echo "In file $BASEDIR/WRF/WRFV2/RASP/$NEWDOMAIN1/namelist.template" egrep -i ' dx | dy | max_dom|run_hours|SPECIFIED|time_step' $BASEDIR/WRF/WRFV2/RASP/$NEWDOMAIN1/namelist.template echo "In file $BASEDIR/WRF/WRFV2/RASP/$NEWDOMAIN1-WINDOW/namelist.template" egrep -i ' dx | dy |max_dom|run_hours|SPECIFIED|time_step' $BASEDIR/WRF/WRFV2/RASP/$NEWDOMAIN1-WINDOW/namelist.template echo "Timestep ratios should match the grid spacing ratio (default 3:1) " grep -i domain1_timestep $BASEDIR/RASP/RUN/rasp.run.parameters.$NEWDOMAIN1 cd $startdir