diff --git a/test_fms/fms2_io/Makefile.am b/test_fms/fms2_io/Makefile.am index 236b2e3aea..dc7628845e 100644 --- a/test_fms/fms2_io/Makefile.am +++ b/test_fms/fms2_io/Makefile.am @@ -1,45 +1,37 @@ -# This is an automake file for the test_fms/diag_manager directory of the FMS +# This is an automake file for the test_fms/fms2_io directory of the FMS # package. -LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ - $(top_srcdir)/tap-driver.sh +# J.Liptak, R.Menzel # Find the fms_mod.mod file. -AM_CPPFLAGS = -I${top_builddir}/mpp -AM_CPPFLAGS += -I${top_builddir}/fms2_io +AM_CPPFLAGS = -I${top_builddir}/mpp -I${top_builddir}/fms2_io + +# Link to the FMS library. +LDADD = ${top_builddir}/libFMS/libFMS.la # Build this test program. -check_PROGRAMS = test_atmosphere_io +check_PROGRAMS = test_fms2_io test_atmosphere_io # This is the source code for the test. -test_atmosphere_io_SOURCES = argparse.F90 setup.F90 test_atmosphere_io.F90 -test_atmosphere_io_LDADD = ${top_builddir}/libFMS/libFMS.la -EXTRA_DIST = test_atmosphere_io.sh test_atmosphere_io.bats input.nml +test_fms2_io_SOURCES = argparse.F90 test_fms2_io.F90 create_atmosphere_domain.inc \ + create_land_domain.inc create_ocean_domain.inc \ + ocean_restart_file_test.inc land_compressed_restart_file_test.inc \ + land_unstructured_restart_file_test.inc +test_atmosphere_io_SOURCES = argparse.F90 setup.F90 test_atmosphere_io.F90 \ + atmosphere_restart_file_test.inc + +EXTRA_DIST = test_fms2_io.sh test_atmosphere_io.sh argparse.mod: argparse.$(OBJEXT) setup.mod: setup.$(OBJEXT) setup.$(OBJEXT): argparse.mod test_atmosphere_io.$(OBJEXT): setup.mod +test_fms2_io.$(OBJEXT): argparse.mod # Run the test program. -TESTS = test_atmosphere_io.sh +TESTS = test_fms2_io.sh test_atmosphere_io.sh # Set srcdir as evironment variable to be reference in the job script TESTS_ENVIRONMENT = srcdir="$(top_srcdir)" -CLEANFILES = *.mod *.nc logfile.000000.out - -## Build this test program. -#check_PROGRAMS = test_fms2_io -# -## This is the source code for the test. -#test_fms2_io_SOURCES = argparse.F90 test_fms2_io.F90 -#test_fms2_io_LDADD = ${top_builddir}/libFMS/libFMS.la -# -#argparse.mod: argparse.$(OBJEXT) -#test_fms2_io.$(OBJEXT): argparse.mod -# -#CLEANFILES = *.mod -# -## Run the test program. -#TESTS = test_fms2_io.sh +CLEANFILES = *.mod *.nc *.nc.* input.nml logfile.000000.out diff --git a/test_fms/fms2_io/atmosphere_restart_file_test.inc b/test_fms/fms2_io/atmosphere_restart_file_test.inc index 44120690b9..e4719bf22a 100644 --- a/test_fms/fms2_io/atmosphere_restart_file_test.inc +++ b/test_fms/fms2_io/atmosphere_restart_file_test.inc @@ -256,11 +256,6 @@ subroutine atmosphere_restart_file(domain, nz, nt, debug_flag) !Write out the times of each "time step". call write_data(fileobj, "time", 1950. + real(i,kind=real32), unlim_dim_level=i) - - !Write out "intermdiate" restart files. - tstamp = "" - write(tstamp, *) i - call write_restart(fileobj, unlim_dim_level=1, timestamp=trim(tstamp)) enddo !Write out the restart file. diff --git a/test_fms/fms2_io/input.nml b/test_fms/fms2_io/input.nml deleted file mode 100644 index 2ed53b12dd..0000000000 --- a/test_fms/fms2_io/input.nml +++ /dev/null @@ -1 +0,0 @@ -aljds;falkjsd diff --git a/test_fms/fms2_io/test_atmosphere_io.bats b/test_fms/fms2_io/test_atmosphere_io.bats deleted file mode 100755 index baeddeda92..0000000000 --- a/test_fms/fms2_io/test_atmosphere_io.bats +++ /dev/null @@ -1,14 +0,0 @@ -setup() { - # Clear out any previous test files - rm -f *.nc > /dev/null 2>&1 - rm -f *.nc.* > /dev/null 2>&1 - rm -f logfile.*.out > /dev/null 2>&1 - rm -f input.nml - ln -s ${srcdir}/test_fms/fms2_io/input.nml input.nml -} - -@test "1" { - skip - run mpirun -n 6 ./test_atmosphere_io - [ "$status" -eq 0 ] -} diff --git a/test_fms/fms2_io/test_atmosphere_io.sh b/test_fms/fms2_io/test_atmosphere_io.sh index 20427061e3..6e3831103e 100755 --- a/test_fms/fms2_io/test_atmosphere_io.sh +++ b/test_fms/fms2_io/test_atmosphere_io.sh @@ -1,2 +1,10 @@ #!/bin/sh -bats ${srcdir}/test_fms/fms2_io/test_atmosphere_io.bats +# This is part of the GFDL FMS package. This is a shell script to +# execute tests in the test_fms/fms2_io directory. + +# Set common test settings. +. ../test_common.sh +# make an input.nml for mpp_init to read +printf "EOF\n&dummy\nEOF" | cat > input.nml +# run the tests +run_test test_atmosphere_io 6 skip diff --git a/test_fms/fms2_io/test_fms2_io.F90 b/test_fms/fms2_io/test_fms2_io.F90 index 28f524c620..8151bb6ebb 100644 --- a/test_fms/fms2_io/test_fms2_io.F90 +++ b/test_fms/fms2_io/test_fms2_io.F90 @@ -205,17 +205,6 @@ subroutine mpi_check(err) endif end subroutine mpi_check - -subroutine open_check(flag) - - logical, intent(in) :: flag - - if (.not. flag) then - call mpp_error(fatal, "Error occured while opening file.") - endif -end subroutine open_check - - subroutine chksum_match(out_chksum, in_chksum, var_name, debug) integer(kind=int64), intent(in) :: out_chksum diff --git a/test_fms/fms2_io/test_fms2_io.bats b/test_fms/fms2_io/test_fms2_io.bats deleted file mode 100755 index 52f6971bbd..0000000000 --- a/test_fms/fms2_io/test_fms2_io.bats +++ /dev/null @@ -1,11 +0,0 @@ -setup() { - # Clear out any previous test files - rm -f *.nc > /dev/null 2>&1 - rm -f *.nc.* > /dev/null 2>&1 - rm -f logfile.*.out > /dev/null 2>&1 -} - -@test "1" { - run mpirun -n 6 ./test_fms2_io - [ "$status" -eq 0 ] -} diff --git a/test_fms/fms2_io/test_fms2_io.sh b/test_fms/fms2_io/test_fms2_io.sh index 8b1417ee07..98621a8daf 100755 --- a/test_fms/fms2_io/test_fms2_io.sh +++ b/test_fms/fms2_io/test_fms2_io.sh @@ -1,3 +1,14 @@ #!/bin/sh -export PATH="$PATH:../bats/bin" -bats test_fms2_io.bats + +# This is part of the GFDL FMS package. This is a shell script to +# execute tests in the test_fms/fms2_io directory. + +# Authors: Raymond Menzel +# Jessica Liptak +# +# Set common test settings. +. ../test_common.sh +# make a dummy file for mpp_init to read +printf "EOF\n&dummy\nEOF" | cat > input.nml +# run the tests +run_test test_fms2_io 6 skip