diff --git a/developer_tests/namelist/test_read_variable_namelist.f90 b/developer_tests/namelist/test_read_variable_namelist.f90 new file mode 100644 index 0000000000..47b93b48ea --- /dev/null +++ b/developer_tests/namelist/test_read_variable_namelist.f90 @@ -0,0 +1,27 @@ +program test_read_variable_namelist + +use utilities_mod, only : find_namelist_in_file, check_namelist_read +use mpi_utilities_mod, only : initialize_mpi_utilities, & + finalize_mpi_utilities +use types_mod, only : vtablenamelength + +implicit none + +character(len=vtablenamelength) :: state_variables(20, 3) + +integer :: iunit, io + +namelist /model_nml/ & + state_variables + +call initialize_mpi_utilities('test_read_write_restarts') + +call find_namelist_in_file('input.nml', 'model_nml', iunit) +read(iunit, nml = model_nml, iostat = io) +call check_namelist_read(iunit, io, 'model_nml') + +print*, "Hello World!" + +call finalize_mpi_utilities() + +end program test_read_variable_namelist diff --git a/developer_tests/namelist/work/input.nml b/developer_tests/namelist/work/input.nml new file mode 100644 index 0000000000..7a94f7cb9a --- /dev/null +++ b/developer_tests/namelist/work/input.nml @@ -0,0 +1,56 @@ +&model_nml +/ + +&utilities_nml + module_details = .false. + write_nml = 'none' + / + +&preprocess_nml + input_obs_kind_mod_file = '../../../assimilation_code/modules/observations/DEFAULT_obs_kind_mod.F90' + output_obs_kind_mod_file = '../../../assimilation_code/modules/observations/obs_kind_mod.f90' + input_obs_def_mod_file = '../../../observations/forward_operators/DEFAULT_obs_def_mod.F90' + output_obs_def_mod_file = '../../../observations/forward_operators/obs_def_mod.f90' + input_files = '../../../observations/forward_operators/obs_def_AIRS_mod.f90', + '../../../observations/forward_operators/obs_def_AOD_mod.f90', + '../../../observations/forward_operators/obs_def_AURA_mod.f90', + '../../../observations/forward_operators/obs_def_COSMOS_mod.f90', + '../../../observations/forward_operators/obs_def_CO_Nadir_mod.f90', + '../../../observations/forward_operators/obs_def_GWD_mod.f90', + '../../../observations/forward_operators/obs_def_QuikSCAT_mod.f90', + '../../../observations/forward_operators/obs_def_SABER_mod.f90', + '../../../observations/forward_operators/obs_def_altimeter_mod.f90', + '../../../observations/forward_operators/obs_def_cloud_mod.f90', + '../../../observations/forward_operators/obs_def_dew_point_mod.f90', + '../../../observations/forward_operators/obs_def_dwl_mod.f90', + '../../../observations/forward_operators/obs_def_eval_mod.f90', + '../../../observations/forward_operators/obs_def_gps_mod.f90', + '../../../observations/forward_operators/obs_def_gts_mod.f90', + '../../../observations/forward_operators/obs_def_land_mod.f90', + '../../../observations/forward_operators/obs_def_metar_mod.f90', + '../../../observations/forward_operators/obs_def_ocean_mod.f90', + '../../../observations/forward_operators/obs_def_pe2lyr_mod.f90', + '../../../observations/forward_operators/obs_def_radar_mod.f90', + '../../../observations/forward_operators/obs_def_reanalysis_bufr_mod.f90', + '../../../observations/forward_operators/obs_def_rel_humidity_mod.f90', + '../../../observations/forward_operators/obs_def_sqg_mod.f90', + '../../../observations/forward_operators/obs_def_tower_mod.f90', + '../../../observations/forward_operators/obs_def_tpw_mod.f90', + '../../../observations/forward_operators/obs_def_upper_atm_mod.f90', + '../../../observations/forward_operators/obs_def_vortex_mod.f90', + '../../../observations/forward_operators/obs_def_wind_speed_mod.f90' + / + +&mpi_utilities_nml +/ + +&obs_kind_nml +/ + +&ensemble_manager_nml +/ + +&state_vector_io_nml +/ + + diff --git a/developer_tests/namelist/work/quickbuild.sh b/developer_tests/namelist/work/quickbuild.sh new file mode 100755 index 0000000000..270fd678ec --- /dev/null +++ b/developer_tests/namelist/work/quickbuild.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +# DART software - Copyright UCAR. This open source software is provided +# by UCAR, "as is", without charge, subject to all terms of use at +# http://www.image.ucar.edu/DAReS/DART/DART_download + +main() { + + +export DART=$(git rev-parse --show-toplevel) +source "$DART"/build_templates/buildfunctions.sh + +MODEL="none" +EXTRA="$DART"/models/template/threed_model_mod.f90 +dev_test=1 +TEST="namelist" +LOCATION="threed_sphere" + +programs=( +test_read_variable_namelist +) + + +# quickbuild arguments +arguments "$@" + +# clean the directory +\rm -f -- *.o *.mod Makefile .cppdefs + +# build any NetCDF files from .cdl files +cdl_to_netcdf + +# build and run preprocess before making any other DART executables +buildpreprocess + +# build +buildit + +# clean up +\rm -f -- *.o *.mod + +} + +main "$@"