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