[Dart-dev] DART/branches Revision: 12851

dart at ucar.edu dart at ucar.edu
Tue Sep 25 14:30:41 MDT 2018


hendric at ucar.edu
2018-09-25 14:30:41 -0600 (Tue, 25 Sep 2018)
325

merging in rma_fix_broken, which updates the developer_tests

  * test_cf_conventions, and
  * test_read_write_restarts

the test_cf_conventions, is a useful template for some simple
unit testing, and test_read_write_restarts contains all of the
useful code for reading and writting restart files into an 
ensemble handle.




Index: DART/branches/rma_trunk
===================================================================
--- DART/branches/rma_trunk	2018-09-25 20:07:45 UTC (rev 12850)
+++ DART/branches/rma_trunk	2018-09-25 20:30:41 UTC (rev 12851)

Property changes on: DART/branches/rma_trunk
___________________________________________________________________
Modified: svn:mergeinfo
## -18,6 +18,7 ##
 /DART/branches/rma_closest_member_tool:12576-12617
 /DART/branches/rma_diag:9623-9737
 /DART/branches/rma_fill_inf:12517-12656
+/DART/branches/rma_fix_broken:12835-12848
 /DART/branches/rma_fix_clm_restarts:9634-11919
 /DART/branches/rma_fixed_filenames:10702-10895
 /DART/branches/rma_kinds_to_state_structure:8952-9431
Modified: DART/branches/rma_trunk/assimilation_code/modules/io/io_filenames_mod.f90
===================================================================
--- DART/branches/rma_trunk/assimilation_code/modules/io/io_filenames_mod.f90	2018-09-25 20:07:45 UTC (rev 12850)
+++ DART/branches/rma_trunk/assimilation_code/modules/io/io_filenames_mod.f90	2018-09-25 20:30:41 UTC (rev 12851)
@@ -303,6 +303,7 @@
    esize = SIZE(restart_files,1)
    file_info%stage_metadata%filenames(1:esize,:) = restart_files(:,:)
 endif
+
 if(present(root_name))                  file_info%root_name                     = root_name
 if(present(check_output_compatibility)) file_info%check_output_compatibility    = check_output_compatibility
 file_info%initialized = .true.

Modified: DART/branches/rma_trunk/developer_tests/io/test_cf_conventions.f90
===================================================================
--- DART/branches/rma_trunk/developer_tests/io/test_cf_conventions.f90	2018-09-25 20:07:45 UTC (rev 12850)
+++ DART/branches/rma_trunk/developer_tests/io/test_cf_conventions.f90	2018-09-25 20:30:41 UTC (rev 12851)
@@ -6,33 +6,23 @@
 
 program test_cf_conventions
 
-use             types_mod, only : r4, r8, i8, metadatalength, MISSING_R8 
+use             types_mod, only : r4, r8, i8, MISSING_R8 , MISSING_R4
 use         utilities_mod, only : register_module, error_handler, E_MSG, E_ERR
-use  adaptive_inflate_mod, only : adaptive_inflate_init, &
-                                  adaptive_inflate_type
-use     mpi_utilities_mod, only : initialize_mpi_utilities, &
-                                  finalize_mpi_utilities
-use       assim_model_mod, only : static_init_assim_model, &
-                                  get_model_size
-use   state_vector_io_mod, only : read_state, write_state
-use  ensemble_manager_mod, only : init_ensemble_manager, &
-                                  ensemble_type, &
+use  adaptive_inflate_mod, only : adaptive_inflate_init
+use     mpi_utilities_mod, only : initialize_mpi_utilities, finalize_mpi_utilities
+use   state_vector_io_mod, only : read_state, write_state, state_vector_io_init 
+use  ensemble_manager_mod, only : init_ensemble_manager, ensemble_type,        &
                                   set_num_extra_copies
-use      io_filenames_mod, only : io_filenames_init, &
-                                  io_filenames_finalize, &
-                                  file_info_type, &
-                                  get_output_file
-use   state_structure_mod, only : get_xtype,             &
-                                  get_units,             &
-                                  get_long_name,         &
-                                  get_short_name,        &
-                                  get_has_missing_value, &
-                                  get_FillValue,         &
-                                  get_missing_value,     &
-                                  get_add_offset,        &
-                                  get_scale_factor
-use      time_manager_mod, only : time_type, &
-                                  set_time
+use      io_filenames_mod, only : io_filenames_init, io_filenames_finalize,    &
+                                  file_info_type, netcdf_file_type, READ_COPY, &
+                                  set_file_metadata, set_io_copy_flag
+use   state_structure_mod, only : get_xtype,  get_units, get_long_name,        &
+                                  get_short_name, get_has_missing_value,       &
+                                  get_FillValue, get_missing_value,            &
+                                  get_add_offset, get_scale_factor,            &
+                                  add_domain, state_structure_info,            &
+                                  get_sum_variables
+use      time_manager_mod, only : time_type, set_time
 use            filter_mod, only : filter_set_initial_time
 use            assert_mod, only : assert_equal
 
@@ -46,26 +36,22 @@
 character(len=32 ), parameter :: revision = "$Revision$"
 character(len=128), parameter :: revdate  = "$Date$"
 
-logical, save :: module_initialized = .false.
+! this should be a namelist variable
+logical :: verbose = .false.
 
 type(ensemble_type)         :: ens_handle
 type(file_info_type)        :: file_info_input
-type(file_info_type)        :: file_info_output
 type(time_type)             :: time1
-type(adaptive_inflate_type) :: prior_inflate_handle, post_inflate_handle
-type(netcdf_file_type)      :: PriorStateUnit_handle, PosteriorStateUnit_handle
 type(time_type)             :: curr_ens_time
+character(len=256)          :: test_file(1) = "cf_test.nc"
 
 integer(i8) :: model_size
-integer     :: ens_size, num_extras, num_copies


More information about the Dart-dev mailing list