3 #***********************************************************************
4 #* GNU Lesser General Public License
6 #* This file is part of the GFDL Flexible Modeling System (FMS).
8 #* FMS is free software: you can redistribute it and/or modify it under
9 #* the terms of the GNU Lesser General Public License as published by
10 #* the Free Software Foundation, either version 3 of the License, or (at
11 #* your option) any later version.
13 #* FMS is distributed in the hope that it will be useful, but WITHOUT
14 #* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 #* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 #* You should have received a copy of the GNU Lesser General Public
19 #* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
20 #***********************************************************************
22 # This is part of the GFDL FMS package. This is a shell script to
23 # execute tests in the test_fms/horiz_interp directory.
25 # Ed Hartnett 11/29/19
28 # Set common test settings.
31 # Create file for test.
32 cat <<_EOF > input.nml
33 &test_horiz_interp_nml
34 test_conserve = .true.
42 test_expect_success
"conservative method with real kind=4" '
43 mpirun -n 2 ./test_horiz_interp_r8
46 test_expect_success
"conservative method with real kind=8" '
47 mpirun -n 2 ./test_horiz_interp_r4
50 cat <<_EOF > input.nml
51 &test_horiz_interp_nml
52 test_conserve = .true.
61 test_expect_success
"conservative method solo wrappers with real kind=4" '
62 mpirun -n 2 ./test_horiz_interp_r8
65 test_expect_success
"conservative method solo wrappers with real kind=8" '
66 mpirun -n 2 ./test_horiz_interp_r4
69 cat <<_EOF > input.nml
70 &test_horiz_interp_nml
79 test_expect_success
"bicubic method with real kind=4" '
80 mpirun -n 2 ./test_horiz_interp_r4
82 test_expect_success
"bicubic method with real kind=8" '
83 mpirun -n 2 ./test_horiz_interp_r8
86 cat <<_EOF > input.nml
87 &test_horiz_interp_nml
97 test_expect_success
"bicubic method solo wrappers with real kind=4" '
98 mpirun -n 2 ./test_horiz_interp_r4
100 test_expect_success
"bicubic method solo wrappers with real kind=8" '
101 mpirun -n 2 ./test_horiz_interp_r8
104 cat <<_EOF > input.nml
105 &test_horiz_interp_nml
106 test_bilinear= .true.
114 test_expect_success
"bilinear method with real kind=4" '
115 mpirun -n 2 ./test_horiz_interp_r4
117 test_expect_success
"bilinear method with real kind=8" '
118 mpirun -n 2 ./test_horiz_interp_r8
121 cat <<_EOF > input.nml
122 &test_horiz_interp_nml
123 test_bilinear= .true.
132 test_expect_success
"bilinear method solo wrapper with real kind=4" '
133 mpirun -n 2 ./test_horiz_interp_r4
135 test_expect_success
"bilinear method solo wrapper with real kind=8" '
136 mpirun -n 2 ./test_horiz_interp_r8
139 # the spherical module has a namelist with an option for the search algorithm used
140 cat <<_EOF > input.nml
141 &test_horiz_interp_nml
142 test_spherical= .true.
149 &horiz_interp_sherical_nml
150 search_method = "radial search"
154 test_expect_success
"spherical method (radial search) with real kind=4" '
155 mpirun -n 2 ./test_horiz_interp_r4
157 test_expect_success
"spherical method (radial search) with real kind=8" '
158 mpirun -n 2 ./test_horiz_interp_r8
161 cat <<_EOF > input.nml
162 &test_horiz_interp_nml
163 test_spherical= .true.
170 &horiz_interp_sherical_nml
171 search_method = "full search"
175 test_expect_success
"spherical method (full search) with real kind=4" '
176 mpirun -n 2 ./test_horiz_interp_r4
178 test_expect_success
"spherical method (full search) with real kind=8" '
179 mpirun -n 2 ./test_horiz_interp_r8
182 cat <<_EOF > input.nml
183 &test_horiz_interp_nml
184 test_spherical= .true.
193 test_expect_success
"spherical method solo wrappers with real kind=4" '
194 mpirun -n 2 ./test_horiz_interp_r4
196 test_expect_success
"spherical method solo wrappers with real kind=8" '
197 mpirun -n 2 ./test_horiz_interp_r8
200 cat <<_EOF > input.nml
201 &test_horiz_interp_nml
210 test_expect_success
"assignment overloads with real kind=4" '
211 mpirun -n 2 ./test_horiz_interp_r4
213 test_expect_success
"assignment overloads with real kind=8" '
214 mpirun -n 2 ./test_horiz_interp_r8