[Dart-dev] DART/branches Revision: 12049
dart at ucar.edu
dart at ucar.edu
Sat Nov 4 15:22:35 MDT 2017
hendric at ucar.edu
2017-11-04 15:22:34 -0600 (Sat, 04 Nov 2017)
284
this code allows for options of having read_input_state_from_file = .false.
and ignores the input_state_files. Before this was returning an error.
Similarly if write_output_state_to_file is false and output_state_files
was 'empty' the code used to error out. This is now fixed.
Modified: DART/branches/pmo_io/assimilation_code/programs/perfect_model_obs/perfect_model_obs.f90
===================================================================
--- DART/branches/pmo_io/assimilation_code/programs/perfect_model_obs/perfect_model_obs.f90 2017-11-04 20:27:54 UTC (rev 12048)
+++ DART/branches/pmo_io/assimilation_code/programs/perfect_model_obs/perfect_model_obs.f90 2017-11-04 21:22:34 UTC (rev 12049)
@@ -9,13 +9,16 @@
! Program to build an obs_sequence file from simulated observations.
use types_mod, only : r8, i8, metadatalength, MAX_NUM_DOMS
-use utilities_mod, only : initialize_utilities, register_module, error_handler, &
+
+use utilities_mod, only : register_module, error_handler, &
find_namelist_in_file, check_namelist_read, &
E_ERR, E_MSG, E_DBG, nmlfileunit, timestamp, &
do_nml_file, do_nml_term, logfileunit, &
- open_file, close_file, finalize_utilities
+ open_file, close_file
+
use time_manager_mod, only : time_type, get_time, set_time, operator(/=), print_time, &
generate_seed
+
use obs_sequence_mod, only : read_obs_seq, obs_type, obs_sequence_type, &
get_obs_from_key, set_copy_meta_data, get_obs_def, &
get_time_range_keys, set_obs_values, set_qc, set_obs, &
@@ -26,29 +29,33 @@
use obs_def_mod, only : obs_def_type, get_obs_def_error_variance, get_obs_def_time
+
use obs_model_mod, only : move_ahead, advance_state, set_obs_model_trace
+
use assim_model_mod, only : static_init_assim_model, get_model_size, &
get_initial_condition
-use mpi_utilities_mod, only : task_count, task_sync, initialize_mpi_utilities, &
+use mpi_utilities_mod, only : task_sync, initialize_mpi_utilities, &
finalize_mpi_utilities
use random_seq_mod, only : random_seq_type, init_random_seq, random_gaussian
+
use ensemble_manager_mod, only : init_ensemble_manager, &
end_ensemble_manager, ensemble_type, &
- get_my_num_copies, get_ensemble_time, prepare_to_write_to_vars, &
+ get_my_num_copies, get_ensemble_time, &
prepare_to_read_from_vars, allocate_vars, &
all_vars_to_all_copies, &
all_copies_to_all_vars
-use filter_mod, only : filter_set_initial_time, filter_sync_keys_time
+! JPH Should these be moved? ! utilities_mod perhaps?
+use filter_mod, only : filter_set_initial_time, filter_sync_keys_time
use state_vector_io_mod, only : state_vector_io_init, &
read_state, write_state
-use io_filenames_mod, only : io_filenames_init, file_info_type, file_info_dump, &
- combine_file_info, set_file_metadata, &
- set_io_copy_flag, check_file_info_variable_shape, &
+use io_filenames_mod, only : io_filenames_init, file_info_type, &
+ set_file_metadata, &
+ set_io_copy_flag, &
READ_COPY, WRITE_COPY
use direct_netcdf_mod, only : finalize_single_file_io
@@ -59,9 +66,9 @@
use distributed_state_mod, only : create_state_window, free_state_window
-use forward_operator_mod, only : get_expected_obs_distrib_state
+use forward_operator_mod, only : get_expected_obs_distrib_state
-use mpi_utilities_mod, only : my_task_id
+use mpi_utilities_mod, only : my_task_id
implicit none
@@ -265,44 +272,64 @@
! Initialize file names:
! this routine allocates the second argument to be the correct length
-call parse_filenames(input_state_files, input_filelist, nfilesin)
+call parse_filenames( input_state_files, input_filelist, nfilesin)
call parse_filenames(output_state_files, output_filelist, nfilesout)
-allocate(true_state_filelist(nfilesout))
-
-! mutiple domains ( this is very unlikely to be the case, but in order to
-! set_file_metadata we need to have a file list that has the same number
-! of files as domains.
+! had code true_state.nc. This contains multiple time steps in the
+! case of cycling.
if (nfilesout > 1) then
+ ! mutiple domains ( this is very unlikely to be the case, but in order to
+ ! set_file_metadata we need to have a file list that has the same number
+ ! of files as domains.
+ allocate(true_state_filelist(nfilesout))
do i = 1, nfilesout
write(true_state_filelist(i),'(a,i0.2)') 'true_state_d',i
enddo
else
+ allocate(true_state_filelist(1))
true_state_filelist(1) = 'true_state.nc'
More information about the Dart-dev
mailing list