1 |
#!/bin/csh -f |
2 |
# |
3 |
# Script to build ESMF component libraries for MITgcm ocean 15L. |
4 |
# |
5 |
source mytools/comp_profile.BASE |
6 |
source mytools/comp_profile.${COMP_PROF} |
7 |
|
8 |
# |
9 |
# Build individual component core code |
10 |
# |
11 |
# MITgcm ocn |
12 |
# ========== |
13 |
cd run |
14 |
if ( -f Makefile ) then |
15 |
make Clean |
16 |
endif |
17 |
|
18 |
# ESMF component build. Creates an ESMF component that can be coupled through |
19 |
# the ESMF superstructure layer. |
20 |
${gm2command} ${gm2mods} ${gm2optfile} ${gm2adoptfile} -standarddirs=" " |
21 |
make depend |
22 |
make small_f |
23 |
|
24 |
# Copy the scripts from the download directory making platform specific mods |
25 |
# along the way. |
26 |
foreach f ( ../mytools/* ) |
27 |
if ( -f $f ) then |
28 |
cp $f . |
29 |
cat $f | sed s'|<TCSH_PATH>|'${TCSH_PATH}'|g' > temp.$$ |
30 |
mv temp.$$ ${f:t} |
31 |
chmod +x ${f:t} |
32 |
endif |
33 |
end |
34 |
./mkmod.sh ocn |
35 |
|
36 |
# Copy products to application build library and include directories |
37 |
if ( ! -d ${APPLIB_PATH} ) then |
38 |
mkdir -p ${APPLIB_PATH} |
39 |
endif |
40 |
if ( ! -d ${APPF90MOD_PATH} ) then |
41 |
mkdir -p ${APPF90MOD_PATH} |
42 |
endif |
43 |
if ( ! -d ${APPOBJ_PATH} ) then |
44 |
mkdir -p ${APPOBJ_PATH} |
45 |
endif |
46 |
if ( ! -d ${APPINC_PATH} ) then |
47 |
mkdir -p ${APPINC_PATH} |
48 |
endif |
49 |
if ( ! -d ${APPEXE_PATH} ) then |
50 |
mkdir -p ${APPEXE_PATH} |
51 |
endif |
52 |
cp mmout/*.a ${APPLIB_PATH} |
53 |
cp mmout/*.mod ${APPF90MOD_PATH} |
54 |
cp mmout/*.o ${APPOBJ_PATH} |
55 |
cp mmout/*.h ${APPINC_PATH} |