[Dart-dev] DART/branches Revision: 10790

dart at ucar.edu dart at ucar.edu
Thu Dec 15 13:55:17 MST 2016


nancy at ucar.edu
2016-12-15 13:55:16 -0700 (Thu, 15 Dec 2016)
75
undo last commit - was intended for a different branch
not the rma_trunk.




Modified: DART/branches/rma_trunk/adaptive_inflate/adaptive_inflate_mod.f90
===================================================================
--- DART/branches/rma_trunk/adaptive_inflate/adaptive_inflate_mod.f90	2016-12-15 20:47:58 UTC (rev 10789)
+++ DART/branches/rma_trunk/adaptive_inflate/adaptive_inflate_mod.f90	2016-12-15 20:55:16 UTC (rev 10790)
@@ -33,8 +33,7 @@
           log_inflation_info,         get_minmax_task_zero,          mean_from_restart,  &
           sd_from_restart,            get_inflation_in_filename,     get_inflation_out_filename,  &
           output_inf_restart,         get_inflate_mean,              get_inflate_sd,     &
-          get_is_prior,               get_is_posterior,              do_ss_inflate,      &
-          do_rtps_inflate
+          get_is_prior,               get_is_posterior,              do_ss_inflate
 
 
 ! version controlled file description for error handling, do not edit
@@ -178,8 +177,7 @@
 type(adaptive_inflate_type), intent(in) :: inflation
 logical :: do_ss_inflate
 
-if (do_single_ss_inflate(inflation) .or. do_varying_ss_inflate(inflation) .or. &
-    do_rtps_inflate(inflation)) then
+if (do_single_ss_inflate(inflation) .or. do_varying_ss_inflate(inflation)) then
    do_ss_inflate = .true.
 else
    do_ss_inflate = .false.
@@ -191,7 +189,7 @@
 subroutine adaptive_inflate_init(inflate_handle, inf_flavor, mean_from_restart, &
    sd_from_restart, output_restart, deterministic, in_file_name, out_file_name, &
    diag_file_name, inf_initial, sd_initial, inf_lower_bound, inf_upper_bound, &
-   sd_lower_bound, ens_handle, missing_ok, label)
+   sd_lower_bound, ens_handle, ss_inflate_index, ss_inflate_sd_index, missing_ok, label)
 
 ! Initializes an adaptive_inflate_type 
 
@@ -208,6 +206,7 @@
 real(r8),                    intent(in)    :: inf_lower_bound, inf_upper_bound
 real(r8),                    intent(in)    :: sd_lower_bound
 type(ensemble_type),         intent(inout) :: ens_handle
+integer,                     intent(in)    :: ss_inflate_index, ss_inflate_sd_index
 logical,                     intent(in)    :: missing_ok
 character(len = *),          intent(in)    :: label
 
@@ -326,10 +325,12 @@
 
 !------------------------------------------------------------------
 ! For obs_space_inflation the restart file is written out here.
-subroutine adaptive_inflate_end(inflate_handle, state_ens_handle)
+subroutine adaptive_inflate_end(inflate_handle, state_ens_handle, ss_inflate_index, &
+   ss_inflate_sd_index)
 
 type(adaptive_inflate_type), intent(in)    :: inflate_handle
 type(ensemble_type),         intent(inout) :: state_ens_handle
+integer,                     intent(in)    :: ss_inflate_index, ss_inflate_sd_index
 
 integer :: restart_unit, io
 
@@ -396,20 +397,7 @@
 
 end function do_single_ss_inflate
 
-!------------------------------------------------------------------
 
-function do_rtps_inflate(inflate_handle)
-
-! Returns true if this inflation type indicates posterior relaxion-to-prior-spread
-! (whitaker & Hamill, 2012)
-
-logical                                 :: do_rtps_inflate
-type(adaptive_inflate_type), intent(in) :: inflate_handle
-
-do_rtps_inflate = (inflate_handle%inflation_flavor == 4)
-
-end function do_rtps_inflate
-
 !------------------------------------------------------------------
 
 function deterministic_inflate(inflate_handle)
@@ -536,7 +524,7 @@
 
 !------------------------------------------------------------------
 
-subroutine inflate_ens(inflate_handle, ens, mean, inflate, var_in, fsprd, asprd)
+subroutine inflate_ens(inflate_handle, ens, mean, inflate, var_in)
 
 ! Inflates subset of ensemble members given mean and inflate
 ! Selects between deterministic and stochastic inflation
@@ -545,7 +533,6 @@
 real(r8),                    intent(inout) :: ens(:)
 real(r8),                    intent(in)    :: mean, inflate
 real(r8), optional,          intent(in)    :: var_in
-real(r8), optional,          intent(in)    :: fsprd, asprd
 
 integer  :: i, ens_size
 real(r8) :: rand_sd, var, sd_inflate
@@ -558,26 +545,13 @@
 endif
 
 if(inflate_handle%deterministic) then
+   ! Just spread the ensemble out linearly for deterministic
+   ! Following line can lead to inflation of 1.0 changing ens on some compilers
+   !!! ens = (ens - mean) * sqrt(inflate) + mean
+   ! Following gives 1.0 inflation having no impact on known compilers


More information about the Dart-dev mailing list