fix: improve modern diag manager performance (#1634)
[FMS.git] / test_fms / diag_manager / test_var_masks.sh
blob761fb345cf249702e2f6381e6e1e123102a37eaa
1 #!/bin/sh
3 #***********************************************************************
4 #* GNU Lesser General Public License
5 #*
6 #* This file is part of the GFDL Flexible Modeling System (FMS).
7 #*
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
16 #* for more details.
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 # Set common test settings.
23 . ../test-lib.sh
25 if [ -z "${skipflag}" ]; then
26 # create and enter directory for in/output files
27 output_dir
29 cat <<_EOF > diag_table.yaml
30 title: test_var_masks
31 base_date: 2 1 1 0 0 0
32 diag_files:
33 - file_name: test_var_masks
34 freq: 1 days
35 time_units: hours
36 unlimdim: time
37 varlist:
38 - module: atmos
39 var_name: ua
40 reduction: average
41 kind: r4
42 _EOF
44 # remove any existing files that would result in false passes during checks
45 rm -f *.nc
47 my_test_count=1
48 printf "&diag_manager_nml \n use_modern_diag=.true. \n/" | cat > input.nml
49 test_expect_success "Running diag_manager with a field with a variable mask (test $my_test_count)" '
50 mpirun -n 1 ../test_var_masks
52 test_expect_success "Checking answers for when diag_manager with a field with a variable mask (test $my_test_count)" '
53 mpirun -n 1 ../check_var_masks
56 test_done