[Dart-dev] DART/branches Revision: 11160
dart at ucar.edu
dart at ucar.edu
Mon Feb 27 15:29:40 MST 2017
nancy at ucar.edu
2017-02-27 15:29:31 -0700 (Mon, 27 Feb 2017)
489
most important change - the postassim output location was
incorrect. it is now moved before posterior inflation is
applied. also added trace and timestamp messages around
the places we do output, and removed a duplicate write if
you're deferring all i/o until the end.
add error checks for namelist combinations we don't
support to filter and PMO. remove the need for 'has_cycling'
in the namelist of filter and pmo.
removed 'has_cycling' from the namelists where we had
added it.
Modified: DART/branches/rma_trunk/filter/filter_mod.dopplerfold.f90
===================================================================
--- DART/branches/rma_trunk/filter/filter_mod.dopplerfold.f90 2017-02-27 22:25:32 UTC (rev 11159)
+++ DART/branches/rma_trunk/filter/filter_mod.dopplerfold.f90 2017-02-27 22:29:31 UTC (rev 11160)
@@ -18,7 +18,7 @@
delete_obs_from_seq, delete_seq_head, &
delete_seq_tail, replace_obs_values, replace_qc, &
destroy_obs_sequence, get_qc_meta_data, add_qc
-
+
use obs_def_mod, only : obs_def_type, get_obs_def_error_variance, get_obs_def_time, &
get_obs_kind
use obs_def_utilities_mod, only : set_debug_fwd_op
@@ -75,6 +75,8 @@
use quality_control_mod, only : initialize_qc
+use state_space_diag_mod, only : finalize_singlefile_output
+
!------------------------------------------------------------------------------
implicit none
@@ -131,7 +133,7 @@
integer :: POSTASSIM_POSTINF_MEAN = COPY_NOT_PRESENT
integer :: POSTASSIM_POSTINF_SD = COPY_NOT_PRESENT
-logical :: do_prior_inflate = .false.
+logical :: do_prior_inflate = .false.
logical :: do_posterior_inflate = .false.
!----------------------------------------------------------------
@@ -168,10 +170,10 @@
integer, parameter :: MAXFILES = 200
!>@todo FIXME - how does this work for multiple domains? ens1d1, ens2d1, ... ens1d2 or
!> ens1d1 ens1d2, ens1d1 ens2d2, etc i like the latter better.
-character(len=256) :: input_state_files(MAXFILES) = 'null'
-character(len=256) :: output_state_files(MAXFILES) = 'null'
+character(len=256) :: input_state_files(MAXFILES) = 'null'
+character(len=256) :: output_state_files(MAXFILES) = 'null'
! Name of files containing a list of {input,output} restart files, 1 file per domain
-character(len=256) :: input_state_file_list(MAX_NUM_DOMS) = 'null'
+character(len=256) :: input_state_file_list(MAX_NUM_DOMS) = 'null'
character(len=256) :: output_state_file_list(MAX_NUM_DOMS) = 'null'
! Read in a single file and perturb this to create an ensemble
logical :: perturb_from_single_instance = .false.
@@ -182,9 +184,9 @@
logical :: has_cycling = .false. ! filter will advance the model
! Stages to write. Valid values include:
! input, preassim, postassim, output
-character(len=10) :: stages_to_write(4) = (/"output ", "null ", "null ", "null "/)
+character(len=10) :: stages_to_write(4) = (/"output ", "null ", "null ", "null "/)
-!>@todo FIXME
+!>@todo FIXME
!> for preassim and postassim output it might be we should
!> be controlling the writing of individual ensemble members
!> by looking at the num_output_state_member value. 0 means
@@ -229,7 +231,7 @@
inf_lower_bound, inf_upper_bound, inf_sd_lower_bound, &
silence, &
distributed_state, &
- single_file_in, single_file_out, has_cycling, &
+ single_file_in, single_file_out, &
perturb_from_single_instance, perturbation_amplitude, &
stages_to_write, &
input_state_files, output_state_files, &
@@ -246,7 +248,7 @@
!----------------------------------------------------------------
!> The code does not use %vars arrays except:
-!> * Task 0 still writes the obs_sequence file, so there is a transpose (copies to vars) and
+!> * Task 0 still writes the obs_sequence file, so there is a transpose (copies to vars) and
!> sending the obs_fwd_op_ens_handle%vars to task 0. Keys is also size obs%vars.
!> * If you read dart restarts state_ens_handle%vars is allocated.
!> * If you write dart diagnostics state_ens_handle%vars is allocated.
@@ -369,7 +371,20 @@
call trace_message('After initializing inflation')
+! for now, set 'has_cycling' to match 'single_file_out' since we're only supporting
+! multi-file output for a single pass through filter, and allowing cycling if we're
+! writing to a single file.
+has_cycling = single_file_out
+
+! don't allow cycling and write all at end - might never be supported
+if (has_cycling .and. write_all_stages_at_end) then
+ call error_handler(E_ERR,'filter:', &
+ 'advancing the model inside filter and writing all state data at end not supported', &
+ source, revision, revdate, text2='delaying write until end only supported when advancing model outside filter', &
+ text3='set "write_all_stages_at_end=.false." to cycle and write data as it is computed')
+endif
+
! Setup the indices into the ensemble storage:
! Can't output more ensemble members than exist
@@ -437,6 +452,8 @@
call trace_message('Before reading in ensemble restart files')
call timestamp_message('Before reading in ensemble restart files')
+! for now, assume that we only allow cycling if single_file_out is true.
More information about the Dart-dev
mailing list