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 rd_intermediate mod_levs avg_tsfc calc_ecmwf_p height_ukmo int2nc
)
37 set NAMES
= ( GEOGRID UNGRIB METGRID GRIBUTIL GRIBUTIL 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 int2nc
)
43 set NAMES
= ( GRIBUTIL GRIBUTIL UTIL 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
)
80 else if ( $1 == int2nc
) then
81 set names
= ( int2nc
)
86 echo "Unrecognized compile target $1."
88 echo "Usage: compile [target]"
89 echo "where target is one of"
98 echo " rd_intermediate"
106 echo " or just run compile with no target to build everything."
112 # Print out WPS version, system info, and compiler/version
113 echo "============================================================================================== "
119 set comp
= ( `grep "^SFC" configure.wps | cut -d"=" -f2-` )
120 if ( "$comp[1]" == "gfortran" ) then
122 else if ( "$comp[1]" == "pgf90" ) then
124 else if ( "$comp[1]" == "ifort" ) then
127 echo "Not sure how to figure out the version of this compiler: $comp[1]"
130 echo "============================================================================================== "
135 if ( ${#argv} == 0 ) then
136 echo "**** Compiling WPS and all utilities ****"
138 echo "**** Compiling $1 ****"
144 if ("$NAMES[$count]" == "UTIL") then
145 ( cd util
; make -i -r WRF_DIR_PRE
="${WRF_DIR_PRE}" DEV_TOP="${DEV_TOP}" TARGET="${f}.exe" CPP_TARGET
="$NAMES[$count]" all
)
146 else if ("$NAMES[$count]" == "GRIBUTIL") then
147 ( cd ungrib
; make -i -r WRF_DIR_PRE
="${WRF_DIR_PRE}" DEV_TOP="${DEV_TOP}" TARGET="${f}.exe" CPP_TARGET
="$NAMES[$count]" all
)
148 if ( -e ungrib
/src
/${f}.exe
) then
149 ( cd util
; ln -sf ..
/ungrib
/src
/${f}.exe .
)
152 ( cd $f ; make -i -r WRF_DIR_PRE
="${WRF_DIR_PRE}" DEV_TOP="${DEV_TOP}" TARGET="${f}.exe" CPP_TARGET
="$NAMES[$count]" all
)
153 if ( -e ${f}/src
/${f}.exe
) then
154 ln -sf ${f}/src
/${f}.exe .
160 if ( $temp_netcdf == 1 ) then