1
1
# /bin/bash
2
2
3
- if [[ -n ${KGO_VERSION} ]] ; then
4
- echo " KGO_VERSION=$KGO_VERSION "
5
- else
6
- export KGO_VERSION=v003
7
- echo " set KGO_VERSION=$KGO_VERSION "
8
- fi
3
+ COMPILER=$1
9
4
5
+ case $COMPILER in
10
6
11
- kgo_links=( " https://docs.google.com/uc?export=download&id=1oQBJGFg0F8k-LhRGsCYn-qWzmMMVfQ6K" \
12
- " https://docs.google.com/uc?export=download&id=1b7qwJWqDzoZGcIP0qyUprTV_LErCGpT6" \
13
- " https://docs.google.com/uc?export=download&id=1NvTo3bYaGpz-FUpZ4jta_kRzA04xTCsn" )
7
+ " gfortran" )
8
+ KGO_VERSION=v004
9
+ kgo_links=( " https://docs.google.com/uc?export=download&id=1kC9RViPBdAsGcOivpYXxs3hHJ11Kv8IN" \
10
+ " https://docs.google.com/uc?export=download&id=1X_oOzvY2lf-kyAR-D1E6JfuefkGg1idn" \
11
+ " https://docs.google.com/uc?export=download&id=1c14qBf9VwYJWYVGCu-Cw35F-qqHx0mSg" )
12
+ out_type=( " cosp2_output_um.${COMPILER} .kgo" \
13
+ " cosp2_output.um_global.${COMPILER} .kgo" \
14
+ " cosp2_output.um_global_model_levels.${COMPILER} .kgo" )
15
+ ;;
14
16
15
- out_type=( " cosp2_output_um.gfortran.kgo" \
16
- " cosp2_output.um_global.gfortran.kgo" \
17
- " cosp2_output.um_global_model_levels.gfortran.kgo" )
17
+ " ifort" )
18
+ KGO_VERSION=v005
19
+ kgo_links=( " https://docs.google.com/uc?export=download&id=1R6uvtWno-bhdgxACCwdcaRNXs9l5_G4w" \
20
+ " https://docs.google.com/uc?export=download&id=1bVU1_dx6hXcV_fHX2cLUn-D03T-Hij8z" )
21
+ out_type=( " cosp2_output_um.${COMPILER} .kgo" \
22
+ " cosp2_output.um_global.${COMPILER} .kgo" )
23
+ ;;
24
+
25
+ " ifx" )
26
+ KGO_VERSION=v005
27
+ kgo_links=( " https://docs.google.com/uc?export=download&id=1CLPJ1ikAcGBEiZ3WAGqL-zpaPIgC__po" \
28
+ " https://docs.google.com/uc?export=download&id=1JOrLFbt0BYgpD0h6A3tsoRD4iTJ4jDvZ" )
29
+ out_type=( " cosp2_output_um.${COMPILER} .kgo" \
30
+ " cosp2_output.um_global.${COMPILER} .kgo" )
31
+ ;;
32
+
33
+ * )
34
+ echo " ERROR: Invalid compiler"
35
+ exit 1
36
+ ;;
37
+ esac
38
+
39
+ echo " KGO_VERSION=$KGO_VERSION "
18
40
19
41
# Input: global UM
20
42
DRIVER_DIR=${PWD}
21
43
GDFILE=' https://docs.google.com/uc?export=download&id=17eK4_DVEvFOE9Uf6siXJDpWZJKT1aqkU'
22
44
OUTPATH=data/inputs/UKMO/cosp_input.um_global.nc.gz
23
- wget --no-check-certificate $GDFILE -O $OUTPATH
45
+ curl -sSfL -o $OUTPATH $GDFILE
24
46
gunzip -f ${OUTPATH}
25
47
cd data/inputs/UKMO
26
48
md5sum -c cosp_input.um_global.nc.md5
27
49
28
- if [[ ${KGO_VERSION} == " v002" ]] ; then
29
- for i in ${! kgo_links[@]} ; do
30
- cd ${DRIVER_DIR}
31
- GDFILE=${kgo_links[$i]}
32
- OUTPATH=data/outputs/UKMO/${out_type[$i]} .$KGO_VERSION .nc.gz
33
- wget --no-check-certificate $GDFILE -O $OUTPATH
34
- gunzip -f ${OUTPATH}
35
- cd data/outputs/UKMO
36
- md5sum -c ${out_type[$i]} .$KGO_VERSION .nc.md5
37
- done
38
- else
39
- echo " wrong KGO_VERSION supplied, try 'export KGO_VERSION=v002'"
40
- fi
50
+ for i in ${! kgo_links[@]} ; do
51
+ cd ${DRIVER_DIR}
52
+ GDFILE=${kgo_links[$i]}
53
+ OUTPATH=data/outputs/UKMO/${out_type[$i]} .$KGO_VERSION .nc.gz
54
+ curl -sSfL -o $OUTPATH $GDFILE
55
+ gunzip -f ${OUTPATH}
56
+ cd data/outputs/UKMO
57
+ md5sum -c ${out_type[$i]} .$KGO_VERSION .nc.md5
58
+ done
0 commit comments