#! /bin/csh # # ------------------ # Runs verify_model # ------------------ # # Define path where this script runs and set the # number of threads. For some reason, on the Mac # generating multiple CLIP5 models only works # if threads=1. # setenv OMP_NUM_THREADS 2 set base_path = "/Users/james/Documents/NOAA/Development/atcf/" cd ${base_path} # # #echo -n "Grab latest 2017 files from ATCF? [n]: " #set answer = $< # if ($1 == "") then echo " " echo -n "Enter ATCF storm ID to process: " set stmid = $< else set stmid = $1 endif # set stmid = `echo $stmid | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` echo "${stmid}" > verify_model.ctl # if ($2 == "") then echo -n "Number of models to verify [1]: " set nmodels = $< else set nmodels = $2 endif if ($nmodels == "") then set nmodels = `echo 1` endif echo "${nmodels}" >> verify_model.ctl # set needfcstr = `echo n` @ i = 0 modelloop: @ i++ if ($i > $nmodels) then goto gotallmodels endif if ($i == "1") then if ($3 == "") then echo -n "Enter model to verify [ofcl]: " set model = $< if ($model == "") then set model = `echo ofcl` endif else set model = $3 endif set modch4 = `echo $model | cut -c4` if ($modch4 == "") then set model = `echo -n $model; echo -` endif set modelpr = `echo $model | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` else echo -n "Enter model to verify [ocd5]: " set model = $< if ($model == "") then set model = `echo ocd5` endif endif if ($model == "ofcl" || $model == "OFCL") then set needfcstr = `echo y` endif set model = `echo $model | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` echo "${model}" >> verify_model.ctl goto modelloop # gotallmodels: if ($4 == "") then echo " " echo -n "Enter min,max ws to verify [0,200]: " set wsmin = $< else set wsmin = $4 endif if ($wsmin == "") then set wsmin = `echo 0,200` endif echo "${wsmin}" >> verify_model.ctl # if ($5 == "") then echo -n "Verify subtropical stages [y]? " set vsubt = $< else set vsubt = $5 endif if ($vsubt == "") then set vsubt = `echo y` endif echo "${vsubt}" >> verify_model.ctl # if ($6 == "") then echo -n "Verify extratropical stages [n]? " set vextrat = $< else set vextrat = $6 endif if ($vextrat == "") then set vextrat = `echo n` endif echo "${vextrat}" >> verify_model.ctl if ($7 == "") then echo -n "Verify post-dissipation stages [n]? " set vnonbt = $< else set vnonbt = $7 endif if ($vnonbt == "") then set vnonbt = `echo n` endif echo "${vnonbt}" >> verify_model.ctl if ($8 == "") then echo " " echo "Select Watch/Warning option: " echo "---------------------------------------------------" echo "N - All forecasts without regard to W/W status" echo "H - Forecasts issued when Hurr W/W in effect" echo "I - Forecasts issued when W/W in effect" echo "J - Forecasts issued when W/W NOT in effect" echo "V - Forecasts verifying when W/W in effect" echo "W - Forecasts verifying when W/W NOT in effect" echo "---------------------------------------------------" echo -n "Enter selection [N]: " set wwarn = $< else set wwarn = $8 endif if ($wwarn == "") then set wwarn = `echo n` endif echo "${wwarn}" >> verify_model.ctl # if ($9 == "") then echo " " echo -n "Verify forecasts from list [n]? " set vlist = $< else set vlist = $9 endif if ($vlist == "") then set vlist = `echo n` endif echo "${vlist}" >> verify_model.ctl # if ($10 == "") then if ($needfcstr == "y") then echo -n "Verify forecaster [all]: " set fcstr = $< else set fcstr = `echo all` endif else set fcstr = $10 endif if ($fcstr == "") then set fcstr = `echo all` endif echo "${fcstr}" >> verify_model.ctl # # # #if ($answer == "") then # set answer = `echo n` # endif #if ($answer == "y" || $answer == "Y") then # get_atcf2017.cmd # endif # # runprogram: ./verify_model # echo " " cd ${base_path}/model_logs set fname = `echo -n verifym_kgrf_; echo -n $stmid; echo -n _;echo -n $modelpr; echo .txt` mv verifym_kgrf.log $fname set fname = `echo -n verifym_sprd_; echo -n $stmid; echo -n _;echo -n $modelpr; echo .txt` mv verifym_sprd.log $fname set fname = `echo -n verifym_allt_; echo -n $stmid; echo .txt` mv verifym_allt.log $fname set fname = `echo -n verifym_alli_; echo -n $stmid; echo .txt` mv verifym_alli.log $fname # # exit: echo "Done"