[Dart-dev] DART/branches Revision: 12486
dart at ucar.edu
dart at ucar.edu
Tue Apr 3 14:11:22 MDT 2018
nancy at ucar.edu
2018-04-03 14:11:22 -0600 (Tue, 03 Apr 2018)
208
we probably don't want all these changes; some are already
on the rma_trunk. but commit everything to this branch
so i can diff it with the rma_trunk and see what never
got reviewed and moved that we want.
Modified: DART/branches/rma_updates_nancy/assimilation_code/modules/assimilation/filter_mod.f90
===================================================================
--- DART/branches/rma_updates_nancy/assimilation_code/modules/assimilation/filter_mod.f90 2018-04-03 17:05:54 UTC (rev 12485)
+++ DART/branches/rma_updates_nancy/assimilation_code/modules/assimilation/filter_mod.f90 2018-04-03 20:11:22 UTC (rev 12486)
@@ -173,7 +173,8 @@
logical :: output_timestamps = .false.
logical :: trace_execution = .false.
logical :: silence = .false.
-logical :: distributed_state = .true. ! Default to do state complete forward operators.
+logical :: distributed_state = .true. ! Default is RMA mode: state complete FOs
+logical :: write_partial_obs_seq_for_debug = .false.
! IO options
! Names of files given explicitly in namelist
@@ -249,7 +250,8 @@
stages_to_write, &
input_state_files, output_state_files, &
output_state_file_list, input_state_file_list, &
- output_mean, output_sd, write_all_stages_at_end
+ output_mean, output_sd, write_all_stages_at_end, &
+ write_partial_obs_seq_for_debug
!----------------------------------------------------------------
@@ -820,8 +822,7 @@
call trace_message('Before observation space diagnostics')
- ! This is where the mean obs
- ! copy ( + others ) is moved to task 0 so task 0 can update seq.
+ ! This is where the mean obs copy ( + others ) is moved to task 0 so it can update seq.
! There is a transpose (all_copies_to_all_vars(obs_fwd_op_ens_handle)) in obs_space_diagnostics
! Do prior observation space diagnostics and associated quality control
call obs_space_diagnostics(obs_fwd_op_ens_handle, qc_ens_handle, ens_size, &
@@ -966,7 +967,7 @@
call trace_message('Before posterior obs space diagnostics')
- ! Write posterior observation space diagnostics
+ ! This is where the mean obs copy ( + others ) is moved to task 0 so it can update seq.
! There is a transpose (all_copies_to_all_vars(obs_fwd_op_ens_handle)) in obs_space_diagnostics
call obs_space_diagnostics(obs_fwd_op_ens_handle, qc_ens_handle, ens_size, &
seq, keys, POSTERIOR_DIAG, num_output_obs_members, in_obs_copy+2, &
@@ -975,9 +976,19 @@
OBS_MEAN_START, OBS_VAR_START, OBS_GLOBAL_QC_COPY, &
OBS_VAL_COPY, OBS_ERR_VAR_COPY, DART_qc_index)
-
call trace_message('After posterior obs space diagnostics')
+ ! this costs time and only runs on task 0. it should only be set to true if
+ ! filter is crashing before execution finishes and you want to see what the
+ ! obs_seq file looks like so far. the full file will be written at the normal
+ ! end of execution.
+ if (write_partial_obs_seq_for_debug) then
+ call trace_message('Before writing partial output sequence file for debug')
+ ! Only pe 0 outputs the observation space diagnostic file
+ if(my_task_id() == 0) call write_obs_seq(seq, obs_sequence_out_name)
+ call trace_message('After writing partial output sequence file for debug')
+ endif
+
! this block computes the adaptive state space posterior inflation
! (it was applied earlier, this is computing the updated values for
! the next cycle.)
Modified: DART/branches/rma_updates_nancy/assimilation_code/modules/io/state_vector_io_mod.f90
===================================================================
--- DART/branches/rma_updates_nancy/assimilation_code/modules/io/state_vector_io_mod.f90 2018-04-03 17:05:54 UTC (rev 12485)
+++ DART/branches/rma_updates_nancy/assimilation_code/modules/io/state_vector_io_mod.f90 2018-04-03 20:11:22 UTC (rev 12486)
@@ -73,6 +73,8 @@
use single_file_io_mod, only : init_singlefile_output, write_singlefile, &
read_singlefile
+!use assim_tools_mod, only : get_missing_ok_status
+
use netcdf
@@ -288,6 +290,8 @@
integer :: domain ! loop index
type(stage_metadata_type) :: restart_files
+real(r8) :: clm_missing = 1e+36
+
! check whether file_info handle is initialized
call assert_file_info_initialized(file_info, 'read_restart_direct')
@@ -310,6 +314,11 @@
! Need Temporary print of initial model time?
+!! a semi-hack for the CLM missing values in state mess.
+!if (get_missing_ok_status()) then
+! where(state_ens_handle%copies == clm_missing) state_ens_handle%copies = MISSING_R8
+!endif
+
end subroutine read_restart_direct
@@ -325,6 +334,8 @@
integer :: dart_index !< where to start in state_ens_handle%copies
More information about the Dart-dev
mailing list