[Dart-dev] DART/releases Revision: 11474

dart at ucar.edu dart at ucar.edu
Thu Apr 13 09:26:50 MDT 2017


nancy at ucar.edu
2017-04-13 09:26:47 -0600 (Thu, 13 Apr 2017)
215
fix inflation type 4 (RTPS) in filter, and bring the dopplerfold
version of filter back in sync with the plain version.   new commit
of the AVISO obs converter (ocean obs), and continuing updates to
documentation.




Index: DART/releases/Manhattan
===================================================================
--- DART/releases/Manhattan	2017-04-13 01:13:07 UTC (rev 11473)
+++ DART/releases/Manhattan	2017-04-13 15:26:47 UTC (rev 11474)

Property changes on: DART/releases/Manhattan
___________________________________________________________________
Modified: svn:mergeinfo
## -28,7 +28,7 ##
 /DART/branches/rma_sprint:8101-8172
 /DART/branches/rma_state_structure_test_dir:9478-9682
 /DART/branches/rma_state_structure_unit_test:9697-10274
-/DART/branches/rma_trunk:11355-11440
+/DART/branches/rma_trunk:11355-11473
 /DART/branches/rma_trunk_clamping:8792-8807
 /DART/branches/rma_trunk_filename:8017-8163
 /DART/branches/rma_trunk_get_state_fun:8574-8602
Modified: DART/releases/Manhattan/assimilation_code/modules/assimilation/filter_mod.dopplerfold.f90
===================================================================
--- DART/releases/Manhattan/assimilation_code/modules/assimilation/filter_mod.dopplerfold.f90	2017-04-13 01:13:07 UTC (rev 11473)
+++ DART/releases/Manhattan/assimilation_code/modules/assimilation/filter_mod.dopplerfold.f90	2017-04-13 15:26:47 UTC (rev 11474)
@@ -45,8 +45,9 @@
                                   map_task_to_pe,  map_pe_to_task, prepare_to_update_copies,  &
                                   copies_in_window, set_num_extra_copies, get_allow_transpose, &
                                   all_copies_to_all_vars, allocate_single_copy, allocate_vars, &
-                                  get_single_copy, put_single_copy, deallocate_single_copy
-use adaptive_inflate_mod,  only : do_varying_ss_inflate,                &
+                                  get_single_copy, put_single_copy, deallocate_single_copy,   &
+                                  print_ens_handle
+use adaptive_inflate_mod,  only : do_varying_ss_inflate,                                      &
                                   do_single_ss_inflate, inflate_ens, adaptive_inflate_init,   &
                                   adaptive_inflate_type, set_inflation_mean_copy ,            &
                                   log_inflation_info, set_inflation_sd_copy,                  &
@@ -56,7 +57,7 @@
 use smoother_mod,          only : smoother_read_restart, advance_smoother,                    &
                                   smoother_gen_copy_meta_data, smoother_write_restart,        &
                                   init_smoother, do_smoothing, smoother_mean_spread,          &
-                                  smoother_assim,            &
+                                  smoother_assim,                                             &
                                   smoother_ss_diagnostics, smoother_end, set_smoother_trace
 
 use random_seq_mod,        only : random_seq_type, init_random_seq, random_gaussian
@@ -343,24 +344,32 @@
 if (inf_flavor(2) > 1 )                           do_posterior_inflate = .true.
 if (do_prior_inflate .or. do_posterior_inflate)   output_inflation     = .true.
 
-! Observation space inflation for posterior not currently supported
-if(inf_flavor(2) == 1) call error_handler(E_ERR, 'filter_main', &
-   'Posterior observation space inflation (type 1) not supported', source, revision, revdate)
+! Observation space inflation not currently supported
+if(inf_flavor(1) == 1 .or. inf_flavor(2) == 1) call error_handler(E_ERR, 'filter_main', &
+   'observation space inflation (type 1) not currently supported', source, revision, revdate, &
+   text2='contact DART developers if you are interested in using it.')
 
-! Whitaker/Hamill (2012) relaxation-to-prior-spread (rtps) inflation (inf_flavor = 4) only is for posterior
-if ( inf_flavor(1) == 4 ) then 
-   write(msgstring, *) 'Prior inflation [i.e., inf_flavor(1)]=', inf_flavor(1), ' is not allowed.  Must be 0, 1, 2, or 3' 
-   call error_handler(E_ERR,'filter_main', msgstring, source, revision, revdate) 
-endif 
+! Relaxation-to-prior-spread (RTPS) is only an option for posterior inflation
+if(inf_flavor(1) == 4) call error_handler(E_ERR, 'filter_main', &
+   'RTPS inflation (type 4) only supported for Posterior inflation', source, revision, revdate)
 
-! CSS Whitaker/Hamill (2012) relaxation-to-prior-spread (rtps) inflation (inf_flavor = 4)
-!    needs a single parameter from namelist: inf_initial(2).  Do not read-in any files
-!    Also, no damping
+! RTPS needs a single parameter from namelist: inf_initial(2).  
+! Do not read in any files.  Also, no damping.  but warn the user if they try to set different
+! values in the namelist.
 if ( inf_flavor(2) == 4 ) then
-   inf_initial_from_restart(2)    = .false. ! get parameter from namelist inf_inital(2), not from file
+   if (inf_initial_from_restart(2) .or. inf_sd_initial_from_restart(2)) &
+      call error_handler(E_MSG, 'filter_main', 'RTPS inflation (type 4) overrides posterior inflation restart file with value in namelist', &
+         text2='posterior inflation standard deviation value not used in RTPS')
+   inf_initial_from_restart(2) = .false.    ! Get parameter from namelist inf_initial(2), not from file
    inf_sd_initial_from_restart(2) = .false. ! inf_sd not used in this algorithm
-   inf_deterministic(2)           = .true.  ! this algorithm is deterministic
-   inf_damping(2)                 = 1.0_r8  ! no damping
+
+   if (.not. inf_deterministic(2)) &
+      call error_handler(E_MSG, 'filter_main', 'RTPS inflation (type 4) overrides posterior inf_deterministic with .true.')
+   inf_deterministic(2) = .true.  ! this algorithm is deterministic
+
+   if (inf_damping(2) /= 1.0_r8) &
+      call error_handler(E_MSG, 'filter_main', 'RTPS inflation (type 4) disables posterior inf_damping')
+   inf_damping(2) = 1.0_r8  ! no damping
 endif
 
 
@@ -719,6 +728,10 @@
       call trace_message('After  prior inflation damping and prep')
    endif
 
+   ! if relaxation-to-prior-spread inflation, save the prior spread in SPARE_PRIOR_SPREAD
+   if ( do_rtps_inflate(post_inflate) ) &
+      call compute_copy_mean_sd(state_ens_handle, 1, ens_size, ENS_MEAN_COPY, SPARE_PRIOR_SPREAD)
+
    call     trace_message('Before computing prior observation values')
    call timestamp_message('Before computing prior observation values')
 
@@ -845,7 +858,8 @@


More information about the Dart-dev mailing list