-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathCHECKOUT_mom6.csh
executable file
·55 lines (45 loc) · 1.95 KB
/
CHECKOUT_mom6.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
#!/bin/tcsh -f
source $MODULESHOME/init/csh
cd ../SHiELD_SRC/
echo `pwd`
# ---------------- component 'mom6'
echo "Cloning https://github.com/NOAA-GFDL/ocean_BGC.git on branch/tag master"
set git_output=`git clone -q --recursive -b master https://github.com/NOAA-GFDL/ocean_BGC.git >& /dev/stdout`
if ( $? != 0 ) then
echo "$git_output" | sed 's/^/**GIT ERROR** /' > /dev/stderr
exit 1
endif
# Additional checkout commands from XML file
( cd ocean_BGC && git checkout 2023.01 )
git clone -b dev/gfdl https://github.com/NOAA-GFDL/MOM6-examples.git mom6
pushd mom6
git checkout 3220014e
git submodule update --recursive --init src/MOM6 src/SIS2 src/icebergs
(cd src/icebergs && git checkout dev/gfdl)
if ("fffb6f35" != "") then
echo WARNING: Checking out from a fork! Work in progress
(cd src/MOM6;git checkout fffb6f35; )
endif
if ("fac2ec43" != "") then
echo WARNING: Checking out from a fork! Work in progress
(cd src/SIS2;git checkout fac2ec43; )
endif
popd
pushd mom6
set platform_domain = `perl -T -e "use Net::Domain(hostdomain) ; print hostdomain"`
if ("${platform_domain}" =~ *"MsState"* ) then
ln -s /work/noaa/gfdlscr/pdata/gfdl/gfdl_O/datasets/ .datasets
else
ln -s /lustre/f2/pdata/gfdl/gfdl_O/datasets/ .datasets
endif
popd
test -e mom6/.datasets
if ($status != 0) then
echo ""; echo "" ; echo " WARNING: .datasets link in MOM6 examples directory is invalid"; echo ""; echo ""
endif
git clone https://gitlab.gfdl.noaa.gov/ogrp/Gaea-stats-MOM6-examples.git
pushd Gaea-stats-MOM6-examples/regressions/ice_ocean_SIS2
foreach stat ( `find . -name "ocean.stats.*"` )
cp $stat ../../../mom6/ice_ocean_SIS2/$stat
end
popd