[Dart-dev] DART/branches Revision: 12761
dart at ucar.edu
dart at ucar.edu
Mon Aug 6 08:54:19 MDT 2018
nancy at ucar.edu
2018-08-06 08:54:19 -0600 (Mon, 06 Aug 2018)
82
adding moha's enhanced inflation and related module changes
to the recam branch.
Modified: DART/branches/recam/assimilation_code/modules/assimilation/adaptive_inflate_mod.f90
===================================================================
--- DART/branches/recam/assimilation_code/modules/assimilation/adaptive_inflate_mod.f90 2018-08-06 13:52:27 UTC (rev 12760)
+++ DART/branches/recam/assimilation_code/modules/assimilation/adaptive_inflate_mod.f90 2018-08-06 14:54:19 UTC (rev 12761)
@@ -16,26 +16,23 @@
use utilities_mod, only : register_module, open_file, close_file, &
error_handler, E_ERR, E_MSG
use random_seq_mod, only : random_seq_type, random_gaussian, init_random_seq
-use ensemble_manager_mod, only : ensemble_type, &
- get_copy_owner_index, prepare_to_write_to_vars, &
- prepare_to_read_from_vars, prepare_to_update_vars, &
- map_pe_to_task
-
+use ensemble_manager_mod, only : ensemble_type, map_pe_to_task
use mpi_utilities_mod, only : my_task_id, send_to, receive_from, send_minmax_to
implicit none
private
-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, &
- log_inflation_info, get_minmax_task_zero, mean_from_restart, &
- sd_from_restart, &
- output_inf_restart, get_inflate_mean, get_inflate_sd, &
- get_is_prior, get_is_posterior, do_ss_inflate, &
- set_inflation_mean_copy, set_inflation_sd_copy, get_inflation_mean_copy, &
- get_inflation_sd_copy, do_rtps_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, &
+ log_inflation_info, get_minmax_task_zero, mean_from_restart, &
+ sd_from_restart, &
+ output_inf_restart, get_inflate_mean, get_inflate_sd, &
+ get_is_prior, get_is_posterior, do_ss_inflate, &
+ set_inflation_mean_copy, set_inflation_sd_copy, get_inflation_mean_copy, &
+ get_inflation_sd_copy, do_rtps_inflate, validate_inflate_options, &
+ print_inflation_restart_filename
! version controlled file description for error handling, do not edit
@@ -51,16 +48,25 @@
! and a spatially-varying state space inflation that carries
! a mean and variance for the state space inflation at each point.
+!>@todo the 'flavor' should be a string in the namelist and an integer
+!>parameter with a more descriptive name instead of an arbitrary integer.
+!>Same with 1 and 2 corresponding to Prior and Posterior inflation.
+!> eventually these namelist options should move from filter into
+!> this module and then possibly become two different namelists so
+!> we don't have these arrays of length (2).
+
! Type to keep track of information for inflation
type adaptive_inflate_type
private
! Flavor can be 0:none, 1:obs_inflate, 2:varying_ss_inflate, 3:single_ss_inflate
- ! Deprecating 1:obs_inflate, there is concerns how the observation space inflation
- ! is happening. JPH.
+ ! 4 = RTPS, 5 = enhanced ss, modification of 2
+ ! 1:obs_inflate is currently deprecated.
integer :: inflation_flavor
+ integer :: inflation_sub_flavor
logical :: output_restart = .false.
logical :: deterministic
real(r8) :: inflate, sd, sd_lower_bound, inf_lower_bound, inf_upper_bound
+ real(r8) :: sd_max_change
! Include a random sequence type in case non-deterministic inflation is used
type(random_seq_type) :: ran_seq
logical :: allow_missing_in_clm
@@ -73,6 +79,10 @@
integer :: input_sd_copy = -1
end type adaptive_inflate_type
+! types for updating the inflation
+integer, parameter :: GHA2017 = 1
+integer, parameter :: AND2009 = 2
+
! Module storage for writing error messages
character(len=512) :: msgstring, msgstring2
@@ -84,7 +94,8 @@
contains
!------------------------------------------------------------------
-! Accessor functions for adaptive inflate type
+!> Accessor functions for adaptive inflate type
+
function mean_from_restart(inflation)
type(adaptive_inflate_type) :: inflation
@@ -157,13 +168,14 @@
end function get_is_posterior
!------------------------------------------------------------------
-! Check for state_space_inflation
+
function do_ss_inflate(inflation)
type(adaptive_inflate_type), intent(in) :: inflation
More information about the Dart-dev
mailing list