-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (123 loc) · 5.31 KB
/
test_suite.yml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Test suite
on:
# Trigger the CI whenever a commit is pushed to main or develop, i.e., a PR is merged
push:
branches: [main, develop]
# Trigger the CI whenever a commit is pushed to an open PR
pull_request:
env:
# Environment variables for GISS modelE
GISS_HOME: /__w/GISS-GC/GISS-GC
ModelE_Support: /__w/GISS-GC/GISS-GC/run
DATA: /__w/GISS-GC/GISS-GC/run/prod_input_files
# Environment variables for compiler
CC: gcc
CXX: g++
FC: gfortran
F90: gfortran
F77: gfortran
# Misc. environment variables
F_UFMTENDIAN: big
KMP_STACKSIZE: 100000000
OMP_NUM_THREADS: 36
jobs:
# Test that GISS-GC can be compiled without error
compile:
runs-on: ubuntu-22.04
container:
image: ghcr.io/fetch4/giss-gc-dev-env:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
steps:
- uses: actions/checkout@v2
- name: Setup submodules
run: |
git config --global --add safe.directory ${GISS_HOME}
git submodule init
git submodule update
- name: Create fake inputs
run: |
# Make run directories
mkdir -p ${DATA}
mkdir -p ${ModelE_Support}/exec
mkdir -p ${ModelE_Support}/huge_space
mkdir -p ${ModelE_Support}/prod_decks
mkdir -p ${ModelE_Support}/prod_runs
# Fake input files
touch ${DATA}/CD144X90.ext.nc
touch ${DATA}/cloud.epsilon4.72x46
touch ${DATA}/CO2profile.Jul16-2017.txt
touch ${DATA}/CROPS_and_pastures_Pongratz_to_Hurtt_144X90N_nocasp.nc
touch ${DATA}/dH2O_by_CH4_monthly
touch ${DATA}/GHG.CMIP6.1-2014.txt
touch ${DATA}/GIC.144X90.DEC01.1.ext_1.nc
touch ${DATA}/GLMELT_144X90_gas.OCN.nc
touch ${DATA}/H2Ocont_MT_CKD
touch ${DATA}/Irrig144x90_1848to2100_FixedFuture_v3.nc
touch ${DATA}/ISCCP.tautables
touch ${DATA}/LWCorrTables33k
touch ${DATA}/LWTables33k_lowH2O_CO2_O3_planck_1-800
touch ${DATA}/miescatpar.abcdv2
touch ${DATA}/MSU_SSU_RSS_weights.txt
touch ${DATA}/NCARIC.144x90.D7712010_ext.nc
touch ${DATA}/o3_2010_shindell_144x90x49_April1850.nc
touch ${DATA}/oct2003.relhum.nr.Q633G633.table
touch ${DATA}/OST_144x90.1876-1885avg.CMIP6.nc
touch ${DATA}/RD_Fd.nc
touch ${DATA}/RD_Fd.names.txt
touch ${DATA}/REG2X2.5
touch ${DATA}/S144X900098M.ext.nc
touch ${DATA}/sgpgxg.table8
touch ${DATA}/SICE_144x90.1876-1885avg.CMIP6.nc
touch ${DATA}/soil_textures_top30cm_2x2.5
touch ${DATA}/soilcarb_top30cm_2x2.5.nc
touch ${DATA}/solar.CMIP6official.ann1850-2299_with_E3_fastJ.nc
touch ${DATA}/STRATAER.VOL.1850-2014_CMIP6_hdr
touch ${DATA}/top_index_144x90_a.ij.ext.nc
touch ${DATA}/topcld.trscat8
touch ${DATA}/V144x90_EntMM16_height_trimmed_scaled_ext.nc
touch ${DATA}/V144x90_EntMM16_lai_max_trimmed_scaled_ext.nc
touch ${DATA}/V144x90_EntMM16_lai_trimmed_scaled_ext.nc
touch ${DATA}/V144x90_EntMM16_lc_max_trimmed_scaled_nocrops.ext.nc
touch ${DATA}/Z2HX2fromZ1QX1N.BS1.nc
touch ${DATA}/ZSIfac_144x90.1876-1885avg.CMIP6.nc
touch ${DATA}/ZVAR2X25A.nc
mkdir -p ${DATA}/cmip6_nint_inputs_E14TomaOCNf10_4av_decadal/BCA
mkdir -p ${DATA}/cmip6_nint_inputs_E14TomaOCNf10_4av_decadal/BCB
mkdir -p ${DATA}/cmip6_nint_inputs_E14TomaOCNf10_4av_decadal/BCdalbsn
mkdir -p ${DATA}/cmip6_nint_inputs_E14TomaOCNf10_4av_decadal/DUST
mkdir -p ${DATA}/cmip6_nint_inputs_E14TomaOCNf10_4av_decadal/NIT
mkdir -p ${DATA}/cmip6_nint_inputs_E14TomaOCNf10_4av_decadal/O3
mkdir -p ${DATA}/cmip6_nint_inputs_E14TomaOCNf10_4av_decadal/OCA
mkdir -p ${DATA}/cmip6_nint_inputs_E14TomaOCNf10_4av_decadal/SSA
mkdir -p ${DATA}/cmip6_nint_inputs_E14TomaOCNf10_4av_decadal/SUL
mkdir -p ${DATA}/nudging/merra2
touch ${DATA}/nudging/merra2/uwnd.2014.MERRA2onGISSE2.nc4
touch ${DATA}/nudging/merra2/vwnd.2014.MERRA2onGISSE2.nc4
touch ${DATA}/nudging/merra2/uwnd.2015.MERRA2onGISSE2.nc4
touch ${DATA}/nudging/merra2/vwnd.2015.MERRA2onGISSE2.nc4
touch ${DATA}/nudging/merra2/uwnd.2016.MERRA2onGISSE2.nc4
touch ${DATA}/nudging/merra2/vwnd.2016.MERRA2onGISSE2.nc4
- name: Build GISS-GC with GISS_GC_14 rundeck
run: |
. /opt/spack-environment/activate.sh
export RUNID=GISS_GC_14
# Environment variables for passing NetCDF-C paths to GEOS-Chem
export NETCDF_HOME=$(nc-config --prefix)
export GC_BIN=${NETCDF_HOME}/bin
export GC_INCLUDE=${NETCDF_HOME}/include
export GC_LIB=${NETCDF_HOME}/lib
# Environment variables for passing NetCDF-Fortran paths to GEOS-Chem
export NETCDF_F_HOME=$(nf-config --prefix)
export GC_F_BIN=${NETCDF_F_HOME}/bin
export GC_F_INCLUDE=${NETCDF_F_HOME}/include
export GC_F_LIB=${NETCDF_F_HOME}/lib
# Environment variable for OpenMPI build
export MPI_ROOT=/opt/software/linux-ubuntu22.04-skylake/gcc-11.4.0/openmpi-4.1.6-s3fu5gvaasgjy4jecnb6rvemx7oofexx
# Copy over rundeck and modelErc
cp .github/rundecks/${RUNID}.R decks
cp .github/modelErc ~/.modelErc
# Build the model
cd decks
make -j setup RUN=${RUNID} F90=mpif90 GC=YES