1 |
#!/bin/csh -f |
#!/bin/csh -f |
2 |
# |
# |
3 |
# Script to build ESMF component libraries for MITgcm ocean 15L. |
# Script to build ESMF driven stand alone MITgcm ocean 15L. |
4 |
# |
# |
5 |
setenv BUILDROOT `pwd` |
setenv BUILDROOT `pwd` |
6 |
setenv COMP_PROF blackforest |
#setenv COMP_PROF GFDL_HPCS |
7 |
#setenv COMP_PROF faulks |
#setenv COMP_PROF blackforest |
8 |
|
setenv COMP_PROF faulks |
9 |
source mytools/comp_profile.BASE |
source mytools/comp_profile.BASE |
10 |
source mytools/comp_profile.${COMP_PROF} |
source mytools/comp_profile.${COMP_PROF} |
11 |
setenv TCSH_PATH `which tcsh` |
setenv TCSH_PATH `which tcsh` |
12 |
cd run |
setenv APPLIB_PATH ${BUILDROOT}/app/lib |
13 |
if ( -f Makefile ) then |
setenv APPF90MOD_PATH ${BUILDROOT}/app/f90mod |
14 |
make Clean |
setenv APPOBJ_PATH ${BUILDROOT}/app/obj |
15 |
endif |
setenv APPINC_PATH ${BUILDROOT}/app/inc |
16 |
|
setenv APPEXE_PATH ${BUILDROOT}/app/exe |
17 |
|
|
18 |
# ESMF component build. Creates an ESMF component that can be coupled through |
# |
19 |
# the ESMF superstructure layer. |
# Build MITgcm ocean component core code |
20 |
${gm2command} ${gm2mods} ${gm2optfile} ${gm2adoptfile} ${gm2standarddirs} |
./build_mitgcm_org_ocn.sh |
21 |
make depend |
cd ${BUILDROOT} |
22 |
make small_f |
|
23 |
|
# Build ESMF component driver |
24 |
|
cd esmf_top/ocn_driver |
25 |
|
./comp1.sh |
26 |
|
cd ${BUILDROOT} |
27 |
|
|
28 |
# Copy the scripts from the downloa directory making platform specific mods |
# Build ocean only ESMF application |
29 |
# along the way. |
cd esmf_top/ocn_only_app |
30 |
foreach f ( ../mytools/* ) |
./comp2.sh |
31 |
if ( -f $f ) then |
cd ${BUILDROOT} |
|
cp $f . |
|
|
cat $f | sed s'|<TCSH_PATH>|'${TCSH_PATH}'|g' > temp.$$ |
|
|
mv temp.$$ ${f:t} |
|
|
chmod +x ${f:t} |
|
|
endif |
|
|
end |
|
|
./mkmod.sh ocn |
|