[Dart-dev] DART/branches Revision: 11719

dart at ucar.edu dart at ucar.edu
Tue Jun 13 15:40:26 MDT 2017


hendric at ucar.edu
2017-06-13 15:40:26 -0600 (Tue, 13 Jun 2017)
230

removing debug statements and writting helper functions
to make the read_single_files more readable. I have
tried multiple variations of inflation and even single
file IO in and multi file out and things still work as
expected.




Modified: DART/branches/rma_par_single_file/assimilation_code/modules/assimilation/filter_mod.f90
===================================================================
--- DART/branches/rma_par_single_file/assimilation_code/modules/assimilation/filter_mod.f90	2017-06-13 21:21:09 UTC (rev 11718)
+++ DART/branches/rma_par_single_file/assimilation_code/modules/assimilation/filter_mod.f90	2017-06-13 21:40:26 UTC (rev 11719)
@@ -272,7 +272,7 @@
 
 integer,    allocatable :: keys(:)
 integer(i8)             :: model_size
-integer                 :: j, i, iunit, io, time_step_number, num_obs_in_set, ntimes
+integer                 :: i, iunit, io, time_step_number, num_obs_in_set, ntimes
 integer                 :: last_key_used, key_bounds(2)
 integer                 :: in_obs_copy, obs_val_index
 integer                 :: prior_obs_mean_index, posterior_obs_mean_index
@@ -506,10 +506,6 @@
 call set_inflation_mean_copy( post_inflate,  POST_INF_COPY )
 call set_inflation_sd_copy(   post_inflate,  POST_INF_SD_COPY )
 
-! print*, 'my copies, my vars :: ', my_task_id(), state_ens_handle%my_num_copies, state_ens_handle%my_num_vars
-! print*, 'copies             :: ', my_task_id(), state_ens_handle%copies(:,:)
-call task_sync()
-
 call read_state(state_ens_handle, file_info_input, read_time_from_file, time1, prior_inflate, post_inflate, &
                 perturb_from_single_instance)
 
@@ -619,19 +615,7 @@
 
 endif
 
-! print*, my_task_id(), 'size1', size(state_ens_handle%copies(:,1))
-! print*, my_task_id(), 'size2', size(state_ens_handle%copies(1,:))
-! 
-! call task_sync()
-! 
-! do i = 1, state_ens_handle%my_num_copies
-! do j = 1, state_ens_handle%my_num_vars
-!    print*, 'task, copy,j', my_task_id(), i,j,state_ens_handle%copies(i,j)
-! enddo
-! enddo
 
-
-
 AdvanceTime : do
    call trace_message('Top of main advance time loop')
 
@@ -688,14 +672,6 @@
          call     trace_message('After  advancing smoother')
       endif
 
-      ! we are going to advance the model - make sure we're doing single file output
-      ! if (.not. has_cycling) then
-      !    call error_handler(E_ERR,'filter:', &
-      !        'advancing the model inside filter and multiple file output not currently supported', &
-      !        source, revision, revdate, text2='support will be added in subsequent releases', &
-      !        text3='set "single_file_out=.true" for filter to advance the model, or advance the model outside filter')
-      ! endif
-
       call trace_message('Ready to run model to advance data ahead in time', 'filter:', -1)
       call print_ens_time(state_ens_handle, 'Ensemble data time before advance')
       call     trace_message('Before running model')

Modified: DART/branches/rma_par_single_file/assimilation_code/modules/io/dart_time_io_mod.f90
===================================================================
--- DART/branches/rma_par_single_file/assimilation_code/modules/io/dart_time_io_mod.f90	2017-06-13 21:21:09 UTC (rev 11718)
+++ DART/branches/rma_par_single_file/assimilation_code/modules/io/dart_time_io_mod.f90	2017-06-13 21:40:26 UTC (rev 11719)
@@ -211,7 +211,7 @@
 
 ! this is used in many error messages below.  set it here, and
 ! don't reuse string3 here, please.
-write(string3,*)'You may need to supply a model-specific "default write_model_time()" to write the time.'
+write(string3,*)'You may need to supply a model-specific "write_model_time()" to write the time.'
 
 ios = nf90_inq_varid(ncid, "time", VarID)
 
@@ -218,32 +218,34 @@
 ! if the file doesn't already have a "time" variable, we make one
 if (ios /= NF90_NOERR) then
 
-   call error_handler(E_MSG,'default write_model_time','no time variable found in file', &
+   call error_handler(E_MSG,'write_model_time','no time variable found in file', &
               source, revision, revdate, text2='creating one')
 
+   ! begin define mode
    ios = nf90_Redef(ncid)
-   call nc_check(ios, "default write_model_time", "redef")
+   call nc_check(ios, "write_model_time", "redef")
 
-   ! check to see if there is a time and date_str_length
+   ! check to see if there is a time dimension
    ios = nf90_inq_dimid(ncid, "time", dimIds(1))
+
    ! if Time dimension does not exist create it
    if (ios /= NF90_NOERR) then
       call nc_check(nf90_def_dim(ncid, "time", nf90_unlimited, dimIds(1)), &
-        "default write_model_time def_var dimension time")
+        "write_model_time def_var dimension time")
    endif
 
    !>@todo NF90_UNLIMITED
    ios = nf90_def_var(ncid, name="time", xtype=nf90_int, varid=VarID)
-   call nc_check(ios, "default write_model_time", "time def_var")
+   call nc_check(ios, "write_model_time", "time def_var")


More information about the Dart-dev mailing list