Skip to content

Commit

Permalink
Merge pull request #620 from uramirez8707/test_fms_fix
Browse files Browse the repository at this point in the history
Adds tests to test_fms/diag_manager
  • Loading branch information
thomas-robinson authored Nov 16, 2020
2 parents e7e4883 + a900c53 commit 7d1a441
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 90 deletions.
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ AC_CONFIG_FILES([Makefile
docs/Makefile
test_fms/test_common.sh
test_fms/Makefile
test_fms/ufs_crash/Makefile
test_fms/diag_manager/Makefile
test_fms/data_override/Makefile
test_fms/exchange/Makefile
Expand Down
2 changes: 1 addition & 1 deletion test_fms/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
ACLOCAL_AMFLAGS = -I m4

# Make targets will be run in each subdirectory. Order is significant.
SUBDIRS = ufs_crash diag_manager data_override exchange monin_obukhov drifters \
SUBDIRS = diag_manager data_override exchange monin_obukhov drifters \
mosaic interpolator fms fms2_io mpp mpp_io time_interp time_manager \
horiz_interp field_manager axis_utils affinity

Expand Down
3 changes: 2 additions & 1 deletion test_fms/diag_manager/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ AM_CPPFLAGS = -I${top_srcdir}/include \
LDADD = ${top_builddir}/libFMS/libFMS.la

# Build this test program.
check_PROGRAMS = test_diag_manager
check_PROGRAMS = test_diag_manager test_diag_manager_time

# This is the source code for the test.
test_diag_manager_SOURCES = test_diag_manager.F90
test_diag_manager_time_SOURCES = test_diag_manager_time.F90

# Run the test.
TESTS = test_diag_manager2.sh
Expand Down
File renamed without changes.
8 changes: 7 additions & 1 deletion test_fms/diag_manager/test_diag_manager2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,14 @@ setup_test 20 "Test 20: Get diag_field_id, ID found and not found"
setup_test 21 "Test 21: Add axis attributes"
setup_test 22 "Test 22: Get 'nv' axis id"
setup_test 23 "Test 23: Unstructured grid"
echo Run with mpp_io

echo "Test 24: Modified diag_table"
rm -f input.nml diag_table
touch input.nml
cp $top_srcdir/test_fms/diag_manager/diagTables/diag_table_24 diag_table
run_test test_diag_manager_time 1

echo Run with mpp_io
setup_test_mppio 1 "Test 1: Data array is too large in x and y direction"
setup_test_mppio 2 "Test 2: Data array is too large in x direction"
setup_test_mppio 3 "Test 3: Data array is too large in y direction"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
program test_diag_manager
!***********************************************************************
!* GNU Lesser General Public License
!*
!* This file is part of the GFDL Flexible Modeling System (FMS).
!*
!* FMS is free software: you can redistribute it and/or modify it under
!* the terms of the GNU Lesser General Public License as published by
!* the Free Software Foundation, either version 3 of the License, or (at
!* your option) any later version.
!*
!* FMS is distributed in the hope that it will be useful, but WITHOUT
!* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
!* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
!* for more details.
!*
!* You should have received a copy of the GNU Lesser General Public
!* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
!***********************************************************************

!> @brief This programs tests diat_manager with the following diag_table
!! test_diag_manager
!! 2 1 1 0 0 0
!! "ocn%4yr%2mo%2dy%2hr", 1, "days", 1, "days", "time", 1, "days", "2 1 1 0 0 0"
!! "test_diag_manager_mod", "sst", "sst", "ocn%4yr%2mo%2dy%2hr", "all", .true., "none", 2

program test_diag_manager_time

use mpp_domains_mod
use diag_manager_mod
Expand Down Expand Up @@ -71,4 +96,4 @@ program test_diag_manager
call diag_manager_end(Time)
call fms_end

end program test_diag_manager
end program test_diag_manager_time
49 changes: 0 additions & 49 deletions test_fms/ufs_crash/Makefile.am

This file was deleted.

3 changes: 0 additions & 3 deletions test_fms/ufs_crash/input.nml

This file was deleted.

32 changes: 0 additions & 32 deletions test_fms/ufs_crash/test_diag_manager2.sh

This file was deleted.

0 comments on commit 7d1a441

Please sign in to comment.