[Dart-dev] DART/branches Revision: 10932

dart at ucar.edu dart at ucar.edu
Mon Jan 23 10:08:02 MST 2017


hendric at ucar.edu
2017-01-23 10:07:59 -0700 (Mon, 23 Jan 2017)
56
adding the final inflation values to the output
files.




Modified: DART/branches/rma_single_file/filter/filter_mod.f90
===================================================================
--- DART/branches/rma_single_file/filter/filter_mod.f90	2017-01-21 22:02:59 UTC (rev 10931)
+++ DART/branches/rma_single_file/filter/filter_mod.f90	2017-01-23 17:07:59 UTC (rev 10932)
@@ -75,8 +75,8 @@
 
 use quality_control_mod,   only : initialize_qc
 
-use state_space_diag_mod,  only : netcdf_file_type, init_diag_output, finalize_diag_output, &
-                                  filter_state_space_diagnostics
+use state_space_diag_mod,  only : netcdf_file_type, init_singlefile_output, &
+                                  finalize_singlefile_output, write_single_file
 
 !------------------------------------------------------------------------------
 
@@ -696,12 +696,13 @@
 
       if (get_stage_to_write('preassim')) then
          if (single_file_out) then
-            call filter_state_space_diagnostics(file_info_preassim, curr_ens_time, &
-                  PreAssimStateUnit,  state_ens_handle, &
-                  model_size, num_output_state_members, output_state_mean_index, &
-                  output_state_spread_index, output_inflation, &
+            call write_single_file(curr_ens_time, &
+                  PreAssimStateUnit, state_ens_handle, &
+                  model_size, num_output_state_members, &
+                  output_inflation, &
                   ENS_MEAN_COPY, ENS_SD_COPY, &
-                  prior_inflate, PRIOR_INF_COPY, PRIOR_INF_SD_COPY)
+                  prior_inflate, PRIOR_INF_COPY, PRIOR_INF_SD_COPY, &
+                  post_inflate, POST_INF_COPY, POST_INF_SD_COPY)
          else
             if (write_all_stages_at_end) then
                ! If needed, store copies(mean, sd, inf_mean, inf_sd) that would have
@@ -837,11 +838,12 @@
        (time_step_number / output_interval * output_interval == time_step_number)) then
       if (get_stage_to_write('postassim')) then
          if (single_file_out) then
-            call filter_state_space_diagnostics(file_info_postassim, curr_ens_time, &
+            call write_single_file(curr_ens_time, &
                   PostAssimStateUnit, state_ens_handle, &
-                  model_size, num_output_state_members, output_state_mean_index, &
-                  output_state_spread_index, output_inflation, &
+                  model_size, num_output_state_members, &
+                  output_inflation, &
                   ENS_MEAN_COPY, ENS_SD_COPY, &
+                  prior_inflate, PRIOR_INF_COPY, PRIOR_INF_SD_COPY, &
                   post_inflate, POST_INF_COPY, POST_INF_SD_COPY)
          else
             if (write_all_stages_at_end) then
@@ -849,7 +851,7 @@
                ! gone in Posterior_Diag.nc and write them at the end
                call store_postassim(state_ens_handle)
             else
-                  call write_state(state_ens_handle, file_info_postassim)
+               call write_state(state_ens_handle, file_info_postassim)
             endif
          endif
       endif
@@ -918,14 +920,18 @@
    call end_ensemble_manager(qc_ens_handle)
 
    call trace_message('Bottom of main advance time loop')
-   if (single_file_out) then
-      call filter_state_space_diagnostics(file_info_output, curr_ens_time, &
-            OutputStateUnit, state_ens_handle, &
-            model_size, num_output_state_members, output_state_mean_index, &
-            output_state_spread_index, output_inflation, &
-            ENS_MEAN_COPY, ENS_SD_COPY, &
-            post_inflate, POST_INF_COPY, POST_INF_SD_COPY)
-   endif
+   ! if ((output_interval > 0) .and. &
+   !     (time_step_number / output_interval * output_interval == time_step_number)) then
+      if (single_file_out) then
+         call write_single_file(curr_ens_time, &
+               OutputStateUnit, state_ens_handle, &
+               model_size, num_output_state_members, &
+               output_inflation, &
+               ENS_MEAN_COPY, ENS_SD_COPY, &
+               prior_inflate, PRIOR_INF_COPY, PRIOR_INF_SD_COPY, &
+               post_inflate, POST_INF_COPY, POST_INF_SD_COPY)
+      endif
+   ! endif
 end do AdvanceTime
 
 !call test_state_copies(state_ens_handle, 'last')
@@ -943,7 +949,32 @@
 call trace_message('Before writing state restart files if requested')
 call timestamp_message('Before writing state restart files if requested')
 
-if (.not. single_file_out) then
+if (single_file_out) then
+
+   call write_single_file(curr_ens_time, &
+         OutputStateUnit, state_ens_handle, &
+         model_size, num_output_state_members, &
+         output_inflation, &
+         ENS_MEAN_COPY, ENS_SD_COPY, &
+         prior_inflate, PRIOR_INF_COPY, PRIOR_INF_SD_COPY, &
+         post_inflate, POST_INF_COPY, POST_INF_SD_COPY)
+


More information about the Dart-dev mailing list