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`
19 ## test for Cygwin on Windows
20 grep CYGWIN_NT configure.wps
>& /dev
/null
21 if ( $status == 0 ) then
22 ls -l */*/*cio.c |
grep '^l'
23 if ( $status == 0 ) then
24 echo Symbolic links are not handled properly by pgcc on Windows. Run arch
/fixlinks
in this directory and try again.
28 if ( "$first_char" == "/" ) then
31 set WRF_DIR_PRE
= ${DEV_TOP}/
35 if ( ${#argv} == 0 ) then
36 set names
= ( geogrid ungrib metgrid g1print g2print plotfmt rd_intermediate plotgrids mod_levs avg_tsfc calc_ecmwf_p height_ukmo
)
37 set NAMES
= ( GEOGRID UNGRIB METGRID GRIBUTIL GRIBUTIL UTIL UTIL UTIL UTIL UTIL UTIL UTIL
)
38 else if ( $1 == wps
) then
39 set names
= ( geogrid ungrib metgrid
)
40 set NAMES
= ( GEOGRID UNGRIB METGRID
)
41 else if ( $1 == util
) then
42 set names
= ( g1print g2print plotfmt rd_intermediate plotgrids mod_levs avg_tsfc calc_ecmwf_p height_ukmo
)
43 set NAMES
= ( GRIBUTIL GRIBUTIL UTIL UTIL UTIL UTIL UTIL UTIL UTIL
)
44 else if ( $1 == geogrid
) then
45 set names
= ( geogrid
)
46 set NAMES
= ( GEOGRID
)
47 else if ( $1 == ungrib
) then
48 set names
= ( ungrib
)
49 set NAMES
= ( UNGRIB
)
50 else if ( $1 == metgrid
) then
51 set names
= ( metgrid
)
52 set NAMES
= ( METGRID
)
53 else if ( $1 == g1print
) then
54 set names
= ( g1print
)
55 set NAMES
= ( GRIBUTIL
)
56 else if ( $1 == g2print
) then
57 set names
= ( g2print
)
58 set NAMES
= ( GRIBUTIL
)
59 else if ( $1 == plotfmt
) then
60 set names
= ( plotfmt
)
62 else if ( $1 == rd_intermediate
) then
63 set names
= ( rd_intermediate
)
65 else if ( $1 == plotgrids
) then
66 set names
= ( plotgrids
)
68 else if ( $1 == mod_levs
) then
69 set names
= ( mod_levs
)
71 else if ( $1 == avg_tsfc
) then
72 set names
= ( avg_tsfc
)
74 else if ( $1 == calc_ecmwf_p
) then
75 set names
= ( calc_ecmwf_p
)
77 else if ( $1 == height_ukmo
) then
78 set names
= ( height_ukmo
)
83 echo "Unrecognized compile target $1."
85 echo "Usage: compile [target]"
86 echo "where target is one of"
95 echo " rd_intermediate"
102 echo " or just run compile with no target to build everything."
109 if ( ${#argv} == 0 ) then
110 echo "**** Compiling WPS and all utilities ****"
112 echo "**** Compiling $1 ****"
118 if ("$NAMES[$count]" == "UTIL") then
119 ( cd util
; make -i -r WRF_DIR_PRE
="${WRF_DIR_PRE}" DEV_TOP="${DEV_TOP}" TARGET="${f}.exe" CPP_TARGET
="$NAMES[$count]" all
)
120 else if ("$NAMES[$count]" == "GRIBUTIL") then
121 ( cd ungrib
; make -i -r WRF_DIR_PRE
="${WRF_DIR_PRE}" DEV_TOP="${DEV_TOP}" TARGET="${f}.exe" CPP_TARGET
="$NAMES[$count]" all
)
122 if ( -e ungrib
/src
/${f}.exe
) then
123 ( cd util
; ln -sf ..
/ungrib
/src
/${f}.exe .
)
126 ( cd $f ; make -i -r WRF_DIR_PRE
="${WRF_DIR_PRE}" DEV_TOP="${DEV_TOP}" TARGET="${f}.exe" CPP_TARGET
="$NAMES[$count]" all
)
127 if ( -e ${f}/src
/${f}.exe
) then
128 ln -sf ${f}/src
/${f}.exe .
134 if ( $temp_netcdf == 1 ) then