[Dart-dev] DART/branches Revision: 10741
dart at ucar.edu
dart at ucar.edu
Fri Nov 11 13:38:28 MST 2016
hendric at ucar.edu
2016-11-11 13:38:28 -0700 (Fri, 11 Nov 2016)
82
moving routine to track writting inflation files back
into the inflation module.
Modified: DART/branches/rma_fixed_filenames/adaptive_inflate/adaptive_inflate_mod.f90
===================================================================
--- DART/branches/rma_fixed_filenames/adaptive_inflate/adaptive_inflate_mod.f90 2016-11-11 17:21:36 UTC (rev 10740)
+++ DART/branches/rma_fixed_filenames/adaptive_inflate/adaptive_inflate_mod.f90 2016-11-11 20:38:28 UTC (rev 10741)
@@ -25,13 +25,13 @@
implicit none
private
-public :: update_inflation, do_obs_inflate, &
+public :: update_inflation, do_obs_inflate, &
do_varying_ss_inflate, do_single_ss_inflate, inflate_ens, &
adaptive_inflate_init, adaptive_inflate_type, &
- deterministic_inflate, solve_quadratic, &
+ deterministic_inflate, solve_quadratic, &
log_inflation_info, get_minmax_task_zero, mean_from_restart, &
sd_from_restart, &
- get_inflate_mean, get_inflate_sd, &
+ output_inf_restart, get_inflate_mean, get_inflate_sd, &
get_is_prior, get_is_posterior, do_ss_inflate
@@ -101,6 +101,19 @@
end function sd_from_restart
!------------------------------------------------------------------
+
+function output_inf_restart(inflation)
+
+type(adaptive_inflate_type) :: inflation
+logical :: output_inf_restart
+
+output_inf_restart = inflation%output_restart
+
+end function
+
+!------------------------------------------------------------------
+
+!------------------------------------------------------------------
function get_inflate_mean(inflation)
type(adaptive_inflate_type) :: inflation
@@ -157,7 +170,7 @@
!------------------------------------------------------------------
subroutine adaptive_inflate_init(inflate_handle, inf_flavor, mean_from_restart, &
- sd_from_restart, deterministic, &
+ sd_from_restart, output_inflation, deterministic, &
inf_initial, sd_initial, inf_lower_bound, inf_upper_bound, &
sd_lower_bound, ens_handle, ss_inflate_index, ss_inflate_sd_index, missing_ok, label)
@@ -167,6 +180,7 @@
integer, intent(in) :: inf_flavor
logical, intent(in) :: mean_from_restart
logical, intent(in) :: sd_from_restart
+logical, intent(in) :: output_inflation
logical, intent(in) :: deterministic
real(r8), intent(in) :: inf_initial, sd_initial
real(r8), intent(in) :: inf_lower_bound, inf_upper_bound
@@ -194,6 +208,7 @@
! Load up the structure first to keep track of all details of this inflation type
inflate_handle%inflation_flavor = inf_flavor
+inflate_handle%output_restart = output_inflation
inflate_handle%deterministic = deterministic
inflate_handle%inflate = inf_initial
inflate_handle%sd = sd_initial
@@ -210,10 +225,6 @@
! Set obs_diag unit to -1 indicating it has not been opened yet
inflate_handle%obs_diag_unit = -1
-if (inf_flavor > 1) then
- inflate_handle%output_restart = .true.
-endif
-
! Cannot support non-determistic inflation and an inf_lower_bound < 1
if(.not. deterministic .and. inf_lower_bound < 1.0_r8) then
write(msgstring, *) 'Cannot have non-deterministic inflation and inf_lower_bound < 1'
Modified: DART/branches/rma_fixed_filenames/filter/filter_mod.f90
===================================================================
--- DART/branches/rma_fixed_filenames/filter/filter_mod.f90 2016-11-11 17:21:36 UTC (rev 10740)
+++ DART/branches/rma_fixed_filenames/filter/filter_mod.f90 2016-11-11 20:38:28 UTC (rev 10741)
@@ -228,7 +228,7 @@
type(file_info_type) :: file_info
-logical :: ds, all_gone, allow_missing, do_inflation
+logical :: ds, all_gone, allow_missing, output_inflation
! real(r8), allocatable :: temp_ens(:) ! for smoother
real(r8), allocatable :: prior_qc_copy(:)
@@ -277,6 +277,9 @@
endif
end do
+! state space inflation is turned on, so we want to output inflation values
+if (inf_flavor(1) > 1 .or. inf_flavor(2) > 1) 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)
More information about the Dart-dev
mailing list