1 | #! /bin/bash |
---|
2 | |
---|
3 | #---------------------------------------# |
---|
4 | # A script to install the preproc tools # |
---|
5 | #---------------------------------------# |
---|
6 | # Author: Aymeric Spiga - November 2008 # |
---|
7 | #---------------------------------------# |
---|
8 | |
---|
9 | |
---|
10 | echo "If you use new physics, few modifications will be needed" |
---|
11 | |
---|
12 | |
---|
13 | if [[ "${LMDMOD}" = "" ]] |
---|
14 | then |
---|
15 | echo "No LMDMOD defined...assuming default folders" |
---|
16 | LMDMOD=$PWD"/../.." |
---|
17 | fi |
---|
18 | |
---|
19 | |
---|
20 | ############### |
---|
21 | tmpdir=$LMDMOD/TMPDIR |
---|
22 | lmdmeso=$LMDMOD/LMD_MM_MARS |
---|
23 | sourceprepmars=$lmdmeso"/SRC/PREP_MARS" |
---|
24 | sourcewps=$lmdmeso"/SRC/WPS" |
---|
25 | ############### |
---|
26 | |
---|
27 | echo create tmpdir directories |
---|
28 | mkdir $tmpdir/WPSFEED 2> /dev/null |
---|
29 | mkdir $tmpdir/WRFFEED 2> /dev/null |
---|
30 | #mkdir $tmpdir/WRFFEED/current 2> /dev/null |
---|
31 | mkdir $tmpdir/GCMINI 2> /dev/null |
---|
32 | |
---|
33 | here=$PWD |
---|
34 | \rm -rf $here/PREP_MARS $here/WPS 2> /dev/null |
---|
35 | |
---|
36 | echo link PREP_MARS in $here |
---|
37 | |
---|
38 | mkdir $here/PREP_MARS |
---|
39 | cd $here/PREP_MARS |
---|
40 | ln -sf ${sourceprepmars}/* . |
---|
41 | ln -sf $tmpdir/WPSFEED . |
---|
42 | ln -sf $tmpdir/GCMINI/diagfi.nc input_diagfi.nc |
---|
43 | cd $here |
---|
44 | |
---|
45 | echo prepare WPS in $here |
---|
46 | |
---|
47 | ####### done in prepare |
---|
48 | ###cd ${sourcewps} |
---|
49 | ###cp ${sourcewps}/wps_mars/switch_WPS_Mars ${sourcewps} |
---|
50 | ###./switch_WPS_Mars |
---|
51 | |
---|
52 | cd ${here} |
---|
53 | mkdir $here/WPS |
---|
54 | cd ${here}/WPS |
---|
55 | ln -sf ${sourcewps}/compile . |
---|
56 | ln -sf ${sourcewps}/configure . |
---|
57 | ln -sf ${sourcewps}/clean . |
---|
58 | ln -sf ${sourcewps}/arch . |
---|
59 | ln -sf $tmpdir/WPSFEED . |
---|
60 | ln -sf $tmpdir/WRFFEED . |
---|
61 | |
---|
62 | mkdir ${here}/WPS/geogrid |
---|
63 | cd ${here}/WPS/geogrid |
---|
64 | #cp -f ${sourcewps}/geogrid/GEOGRID.TBL.ARW GEOGRID.TBL |
---|
65 | #echo "attention GEOGRID.TBL n est pas le bon !!!!" |
---|
66 | ln -sf ${sourcewps}/wps_mars/geogrid/GEOGRID.TBL.ARW_Mars GEOGRID.TBL |
---|
67 | cp -f ${sourcewps}/geogrid/Makefile . |
---|
68 | mkdir src |
---|
69 | cd src |
---|
70 | ln -sf ${sourcewps}/geogrid/src/* . |
---|
71 | cd ${here}/WPS |
---|
72 | |
---|
73 | mkdir ${here}/WPS/metgrid |
---|
74 | cd ${here}/WPS/metgrid |
---|
75 | #cp -f ${sourcewps}/metgrid/METGRID.TBL.ARW METGRID.TBL |
---|
76 | #echo "attention METGRID.TBL n est pas le bon !!!!" |
---|
77 | ln -sf ${sourcewps}/wps_mars/metgrid/METGRID.TBL.ARW_MarsBase_newphys METGRID.TBL |
---|
78 | cp -f ${sourcewps}/metgrid/Makefile . |
---|
79 | mkdir src |
---|
80 | cd src |
---|
81 | ln -sf ${sourcewps}/metgrid/src/* . |
---|
82 | cd ${here}/WPS |
---|
83 | |
---|
84 | ## |
---|
85 | ## examples and plots |
---|
86 | ## |
---|
87 | #ln -sf ${sourcewps}/wps_mars/out_geo.pro . |
---|
88 | ln -sf ${sourcewps}/wps_mars/namelist.wps* . |
---|
89 | #ln -sf ${lmdmeso}/SRC/ARWpost/idl/colorbar__define.pro . |
---|
90 | #ln -sf ${lmdmeso}/SRC/ARWpost/idl/colorbar.pro . |
---|
91 | #ln -sf ${lmdmeso}/SRC/ARWpost/idl/map_latlon.pro . |
---|
92 | |
---|
93 | # |
---|
94 | # link to static data |
---|
95 | # |
---|
96 | ln -sf ${lmdmeso}/WPS_GEOG . |
---|
97 | |
---|
98 | exit |
---|
99 | |
---|
100 | |
---|