-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Corrections and updates for installation
- Loading branch information
Showing
3 changed files
with
230 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Copy ACCESS-OM2 JRA55 executables to bin with githash in name, and config.yaml to match. | ||
# All changes to config.yaml are reported. | ||
# NB: requires ACCESS_OM_DIR environment variable. | ||
# NB: doesn't handle CORE2 experiments (though this could easily be added). | ||
# Andrew Kiss https://github.com/aekiss | ||
|
||
set -e | ||
|
||
matmpath=${ACCESS_OM_DIR}/src/matm/build_jra55/matm_jra55.exe | ||
fmspath=${ACCESS_OM_DIR}/src/mom/exec/nci/ACCESS-OM/fms_ACCESS-OM.x | ||
cice1path=${ACCESS_OM_DIR}/src/cice5/build_auscom_360x300_24p/cice_auscom_360x300_24p.exe | ||
cice025path=${ACCESS_OM_DIR}/src/cice5/build_auscom_1440x1080_480p/cice_auscom_1440x1080_480p.exe | ||
cice010path=${ACCESS_OM_DIR}/src/cice5/build_auscom_3600x2700_1200p/cice_auscom_3600x2700_1200p.exe | ||
mppnccombinepath=${ACCESS_OM_DIR}/src/mom/bin/mppnccombine.nci | ||
|
||
config1path=${ACCESS_OM_DIR}/control/1deg_jra55_ryf/config.yaml | ||
config025path=${ACCESS_OM_DIR}/control/025deg_jra55_ryf/config.yaml | ||
config010path=${ACCESS_OM_DIR}/control/01deg_jra55_ryf/config.yaml | ||
|
||
bindir=${ACCESS_OM_DIR}/bin | ||
|
||
mkdir -p ${bindir} | ||
|
||
echo "Getting executable hashes..." | ||
cd $(dirname "${matmpath}") && matmhash=`git rev-parse --short=8 HEAD` | ||
cd $(dirname "${fmspath}") && fmshash=`git rev-parse --short=8 HEAD` | ||
cd $(dirname "${cice1path}") && cicehash=`git rev-parse --short=8 HEAD` # NB only one hash for all three cice builds | ||
|
||
echo "Copying executables to "${bindir}" with hashes added to names..." | ||
matmbn=$(basename "${matmpath}") | ||
matmhashexe="${matmbn%.*}"_${matmhash}."${matmpath##*.}" | ||
echo " cp ${matmpath} ${bindir}/${matmhashexe}" | ||
cp ${matmpath} ${bindir}/${matmhashexe} | ||
|
||
fmsbn=$(basename "${fmspath}") | ||
fmshashexe="${fmsbn%.*}"_${fmshash}."${fmspath##*.}" | ||
echo " cp ${fmspath} ${bindir}/${fmshashexe}" | ||
cp ${fmspath} ${bindir}/${fmshashexe} | ||
|
||
cice1bn=$(basename "${cice1path}") | ||
cice1hashexe="${cice1bn%.*}"_${cicehash}."${cice1path##*.}" | ||
echo " cp ${cice1path} ${bindir}/${cice1hashexe}" | ||
cp ${cice1path} ${bindir}/${cice1hashexe} | ||
|
||
cice025bn=$(basename "${cice025path}") | ||
cice025hashexe="${cice025bn%.*}"_${cicehash}."${cice025path##*.}" | ||
echo " cp ${cice025path} ${bindir}/${cice025hashexe}" | ||
cp ${cice025path} ${bindir}/${cice025hashexe} | ||
|
||
cice010bn=$(basename "${cice010path}") | ||
cice010hashexe="${cice010bn%.*}"_${cicehash}."${cice010path##*.}" | ||
echo " cp ${cice010path} ${bindir}/${cice010hashexe}" | ||
cp ${cice010path} ${bindir}/${cice010hashexe} | ||
|
||
echo " cp ${mppnccombinepath} ${bindir}/mppnccombine" | ||
cp ${mppnccombinepath} ${bindir}/mppnccombine # no hash for mppnccombine | ||
|
||
|
||
echo "Fixing exe in "${config1path}" to match executable names..." | ||
sed "s/${matmbn%.*}.*/${matmhashexe}/g" < ${config1path} > ${config1path}-tmp | ||
sed "s/${fmsbn%.*}.*/${fmshashexe}/g" < ${config1path}-tmp > ${config1path}-tmp2 | ||
sed "s/${cice1bn%.*}.*/${cice1hashexe}/g" < ${config1path}-tmp2 > ${config1path}-tmp3 | ||
diff ${config1path} ${config1path}-tmp3 || true | ||
mv ${config1path}-tmp3 ${config1path} | ||
rm ${config1path}-tmp* | ||
|
||
echo "Fixing exe in "${config025path}" to match executable names..." | ||
sed "s/${matmbn%.*}.*/${matmhashexe}/g" < ${config025path} > ${config025path}-tmp | ||
sed "s/${fmsbn%.*}.*/${fmshashexe}/g" < ${config025path}-tmp > ${config025path}-tmp2 | ||
sed "s/${cice025bn%.*}.*/${cice025hashexe}/g" < ${config025path}-tmp2 > ${config025path}-tmp3 | ||
diff ${config025path} ${config025path}-tmp3 || true | ||
mv ${config025path}-tmp3 ${config025path} | ||
rm ${config025path}-tmp* | ||
|
||
echo "Fixing exe in "${config010path}" to match executable names..." | ||
sed "s/${matmbn%.*}.*/${matmhashexe}/g" < ${config010path} > ${config010path}-tmp | ||
sed "s/${fmsbn%.*}.*/${fmshashexe}/g" < ${config010path}-tmp > ${config010path}-tmp2 | ||
sed "s/${cice010bn%.*}.*/${cice010hashexe}/g" < ${config010path}-tmp2 > ${config010path}-tmp3 | ||
diff ${config010path} ${config010path}-tmp3 || true | ||
mv ${config010path}-tmp3 ${config010path} | ||
rm ${config010path}-tmp* | ||
|
||
echo "Success." | ||
exit 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Compile ACCESS-OM2 at 1, 1/4 and 1/10 degree resolution wth JRA-55 forcing | ||
# NB: requires ACCESS_OM_DIR environment variable. | ||
# Andrew Kiss https://github.com/aekiss | ||
|
||
set -e | ||
|
||
export OASIS_ROOT=${ACCESS_OM_DIR}/src/oasis3-mct/ | ||
|
||
cd ${ACCESS_OM_DIR} | ||
|
||
# echo "Downloading experiment input data and creating directories..." | ||
# ./get_input_data.py | ||
|
||
echo "Compiling OASIS3-MCT..." | ||
cd ${OASIS_ROOT} | ||
make | ||
|
||
echo "Compiling MOM5.1..." | ||
cd ${ACCESS_OM_DIR}/src/mom/exp | ||
./MOM_compile.csh --type ACCESS-OM --platform nci | ||
|
||
echo "Compiling CICE5.1 at 1 degree..." | ||
cd ${ACCESS_OM_DIR}/src/cice5 | ||
make # 1 degree | ||
echo "Compiling CICE5.1 at 1/4 degree..." | ||
make 025deg | ||
echo "Compiling CICE5.1 at 1/10 degree..." | ||
make 01deg | ||
|
||
echo "Compiling MATM JRA-55 file-based atmosphere... " | ||
cd ${ACCESS_OM_DIR}/src/matm | ||
make jra55 | ||
|
||
echo "Checking all executables have been built..." | ||
ls ${ACCESS_OM_DIR}/src/mom/exec/nci/ACCESS-OM/fms_ACCESS-OM.x | ||
ls ${ACCESS_OM_DIR}/src/matm/build_jra55/matm_jra55.exe | ||
ls ${ACCESS_OM_DIR}/src/cice5/build_auscom_360x300_24p/cice_auscom_360x300_24p.exe | ||
ls ${ACCESS_OM_DIR}/src/cice5/build_auscom_1440x1080_480p/cice_auscom_1440x1080_480p.exe | ||
ls ${ACCESS_OM_DIR}/src/cice5/build_auscom_3600x2700_1200p/cice_auscom_3600x2700_1200p.exe | ||
|
||
source ${ACCESS_OM_DIR}/hashexe.sh | ||
|
||
echo "Success." | ||
echo "You will need to edit project, shortpath and possibly timestep in ${ACCESS_OM_DIR}/control/*/config.yaml" | ||
|
||
exit 0 | ||
|