3 if ( ! -e configure.wps
) then
4 echo "Do 'configure' first"
8 if ( ( ! $?NETCDF
) && ( -d netcdf_links
) ) then
9 setenv NETCDF
`pwd`/netcdf_links
16 set first_char
= `grep ^WRF_DIR configure.wps | awk '{print $3}' | cut -c -1`
18 if ( "$first_char" == "/" ) then
21 set WRF_DIR_PRE
= ${DEV_TOP}/
24 if ( ${#argv} == 0 ) then
25 set names
= ( geogrid ungrib metgrid g1print g2print plotfmt rd_intermediate plotgrids mod_levs avg_tsfc calc_ecmwf_p
)
26 set NAMES
= ( GEOGRID UNGRIB METGRID GRIBUTIL GRIBUTIL UTIL UTIL UTIL UTIL UTIL UTIL
)
27 else if ( $1 == wps
) then
28 set names
= ( geogrid ungrib metgrid
)
29 set NAMES
= ( GEOGRID UNGRIB METGRID
)
30 else if ( $1 == util
) then
31 set names
= ( g1print g2print plotfmt rd_intermediate plotgrids mod_levs avg_tsfc calc_ecmwf_p
)
32 set NAMES
= ( GRIBUTIL GRIBUTIL UTIL UTIL UTIL UTIL UTIL UTIL
)
33 else if ( $1 == geogrid
) then
34 set names
= ( geogrid
)
35 set NAMES
= ( GEOGRID
)
36 else if ( $1 == ungrib
) then
37 set names
= ( ungrib
)
38 set NAMES
= ( UNGRIB
)
39 else if ( $1 == metgrid
) then
40 set names
= ( metgrid
)
41 set NAMES
= ( METGRID
)
42 else if ( $1 == g1print
) then
43 set names
= ( g1print
)
44 set NAMES
= ( GRIBUTIL
)
45 else if ( $1 == g2print
) then
46 set names
= ( g2print
)
47 set NAMES
= ( GRIBUTIL
)
48 else if ( $1 == plotfmt
) then
49 set names
= ( plotfmt
)
51 else if ( $1 == rd_intermediate
) then
52 set names
= ( rd_intermediate
)
54 else if ( $1 == plotgrids
) then
55 set names
= ( plotgrids
)
57 else if ( $1 == mod_levs
) then
58 set names
= ( mod_levs
)
60 else if ( $1 == avg_tsfc
) then
61 set names
= ( avg_tsfc
)
63 else if ( $1 == calc_ecmwf_p
) then
64 set names
= ( calc_ecmwf_p
)
69 echo "Unrecognized compile target $1."
71 echo "Usage: compile [target]"
72 echo "where target is one of"
81 echo " rd_intermediate"
87 echo " or just run compile with no target to build everything."
94 if ( ${#argv} == 0 ) then
95 echo "**** Compiling WPS and all utilities ****"
97 echo "**** Compiling $1 ****"
103 if ("$NAMES[$count]" == "UTIL") then
104 ( cd util
; make -i -r WRF_DIR_PRE
="${WRF_DIR_PRE}" DEV_TOP="${DEV_TOP}" TARGET="${f}.exe" CPP_TARGET
="$NAMES[$count]" all
)
105 else if ("$NAMES[$count]" == "GRIBUTIL") then
106 ( cd ungrib
; make -i -r WRF_DIR_PRE
="${WRF_DIR_PRE}" DEV_TOP="${DEV_TOP}" TARGET="${f}.exe" CPP_TARGET
="$NAMES[$count]" all
)
107 if ( -e ungrib
/src
/${f}.exe
) then
108 ( cd util
; ln -sf ..
/ungrib
/src
/${f}.exe .
)
111 ( cd $f ; make -i -r WRF_DIR_PRE
="${WRF_DIR_PRE}" DEV_TOP="${DEV_TOP}" TARGET="${f}.exe" CPP_TARGET
="$NAMES[$count]" all
)
112 if ( -e ${f}/src
/${f}.exe
) then
113 ln -sf ${f}/src
/${f}.exe .
119 if ( $temp_netcdf == 1 ) then