[Dart-dev] DART/branches Revision: 11510

dart at ucar.edu dart at ucar.edu
Thu Apr 20 13:31:39 MDT 2017


hendric at ucar.edu
2017-04-20 13:31:37 -0600 (Thu, 20 Apr 2017)
297
For multiple domains you need two true state files.  This
is unlikely to ever get called since all current models
that have cycling do not have multiple domains.  If they
happen to have multiple domains the 'true state' will be
written out as :
  true_state_d01.nc
  true_state_d02.nc
and so on.




Modified: DART/branches/rma_output_files/assimilation_code/programs/perfect_model_obs/perfect_model_obs.f90
===================================================================
--- DART/branches/rma_output_files/assimilation_code/programs/perfect_model_obs/perfect_model_obs.f90	2017-04-20 03:03:25 UTC (rev 11509)
+++ DART/branches/rma_output_files/assimilation_code/programs/perfect_model_obs/perfect_model_obs.f90	2017-04-20 19:31:37 UTC (rev 11510)
@@ -176,7 +176,7 @@
 type(file_info_type) :: file_info_output
 type(file_info_type) :: file_info_true
 
-character(len=256), allocatable :: input_filelist(:), output_filelist(:)
+character(len=256), allocatable :: input_filelist(:), output_filelist(:), true_state_filelist(:)
 integer :: nfilesin, nfilesout
 
 ! Initialize all modules used that require it
@@ -268,6 +268,19 @@
 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.
+if (nfilesout > 1) then
+   do i = 1, nfilesout
+      write(true_state_filelist(i),'(a,i0.2)') 'true_state_d',i
+   enddo
+else
+   true_state_filelist(1) = 'true_state.nc'
+endif
+
 !> @todo FIXME  if nfilesout == 0 and write_output_state_to_file is .false.
 !> that shouldn't be an error.  if nfilesin == 0 and read_input_state_from_file
 !> is false, that also shouldn't be an error.  (unless you're writing the mean
@@ -283,7 +296,7 @@
 
 ! True State
 call io_filenames_init(file_info_true, 1, cycling=has_cycling, single_file=single_file_out)
-call set_file_metadata(file_info_true, 1, (/'true_state.nc'/), 'true_state', 'true state')
+call set_file_metadata(file_info_true, 1, true_state_filelist, 'true_state', 'true state')
 call set_io_copy_flag( file_info_true, 1, 1, WRITE_COPY, num_output_ens=1)
 
 ! Perfect Restart


More information about the Dart-dev mailing list