forked from jmccreight/wrfHydroScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstandardizeTestCase.sh
More file actions
executable file
·46 lines (30 loc) · 904 Bytes
/
standardizeTestCase.sh
File metadata and controls
executable file
·46 lines (30 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
## Purpose:
## 1) extract a test case using linkToTestCase
## 2) Standardize the result
##
## Arguments: exactly those of link to test case
whsPath=`grep "wrfHydroScripts" ~/.wrfHydroScripts | cut -d '=' -f2 | tr -d ' '`
source $whsPath/helpers.sh
## Let linkToTestCase handle the errors
$whsPath/linkToTestCase.sh "$@"
## Now parse the result into the standard format
###################################
## OPTIONS: dont use them, just shift them off.
while getopts ":fpuncdo" opt; do
case $opt in
esac
done
shift "$((OPTIND-1))" # Shift off the options and optional
runDir=$1
myTestDir=`getAbsPath $3`
echo $runDir
echo $myTestDir
cd $myTestDir
mkdir PARAMS
mv $runDir/*TBL PARAMS/.
mv $runDir/*namelist* .
rmdir $runDir
echo -e "\e[31mDoing much more gets really tricky.... do it by hand.\e[0m"
echo -e "\e[31mDont forget to edit the namelists by hand.\e[0m"
exit 0