forked from HYCOM/HYCOM-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Make_cice.csh
executable file
·78 lines (78 loc) · 1.75 KB
/
Make_cice.csh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/csh
#
set echo
setenv HYCOM_DIR $cwd
cd ${HYCOM_DIR}
#
# --- Usage: ./Make_cice.com >& Make_cice.log
#
# --- make cice (ESMF HYCOM component) with TYPE=cice.
# --- this directory's name must be src_*_cice.
# --- assumes dimensions.h is correct for TYPE=cice (i.e. for mpi).
#
# --- set ARCH to the correct value for this machine.
# --- ARCH that start with A are for ARCTIC patch regions
#
#setenv ARCH alphaL
#setenv ARCH alpha
#setenv ARCH amd64
#setenv ARCH intel
#setenv ARCH o2k
#setenv ARCH sp3
#setenv ARCH sp4
#setenv ARCH sun64
#setenv ARCH sun
#setenv ARCH t3e
#setenv ARCH xt3
#
setenv ARCH sp6_nofl
#
setenv TYPE `echo $cwd | awk -F"_" '{print $NF}'`
#
if ($TYPE != "cice") then
echo "TYPE must be cice to invoke cice make target"
exit 1
endif
#
if (! -e ../config/${ARCH}_${TYPE}) then
echo "ARCH = " $ARCH " TYPE = " $TYPE " is not supported"
exit 1
endif
#
# --- cice needs additional environment variables.
#
if ($TYPE == "cice") then
switch ($ARCH)
case 'sp5':
setenv BEI_HOME /site/BEI
setenv ESMF_DIR ${BEI_HOME}/esmf/4.0.0rp2
breaksw
case 'o2k':
setenv BEI_HOME /usr/local/usp/BEI
setenv ESMF_DIR ${BEI_HOME}/esmf/4.0.0rp2
breaksw
case 'xt3':
setenv BEI_HOME /usr/local/usp/BEI
setenv ESMF_DIR ${BEI_HOME}/esmf/4.0.0rp2
breaksw
default:
echo "TYPE = cice needs BEI_HOME and ESMF_DIR"
exit (1)
endsw
endif
#
# --- make CICE component
#
setenv CICE_DIR ./CICE
cd ${CICE_DIR}
/bin/rm -f comp_ice.log
./comp_ice | tee comp_ice.log
#
# --- make HYCOM component, and update hycom_cice
#
cd ${HYCOM_DIR}
# --- force a relink, because CICE is not in the dependencies
/bin/rm hycom_cice
make ARCH=$ARCH TYPE=$TYPE hycom_cice
# --- some machines require gmake
#gmake ARCH=$ARCH TYPE=$TYPE hycom_cice