[Dart-dev] DART/branches Revision: 12972
dart at ucar.edu
dart at ucar.edu
Wed Feb 6 14:15:53 MST 2019
nancy at ucar.edu
2019-02-06 14:15:53 -0700 (Wed, 06 Feb 2019)
522
commit to the rma_trunk the changes in filter:
1. allow filter to skip the posterior forward operators
and not write them to the output obs_seq.final
2. only allocate space for additional copies in the
obs_seq.final on task 0. was previously allocating space
on all tasks which was never used.
3. keep doppler fold version of filter in sync.
4. add a test in the inflation module to not allow
skipping the posterior forward operators and enabling
posterior inflation.
5. update the namelist and html files to match
Modified: DART/branches/rma_trunk/assimilation_code/modules/assimilation/adaptive_inflate_mod.f90
===================================================================
--- DART/branches/rma_trunk/assimilation_code/modules/assimilation/adaptive_inflate_mod.f90 2019-02-06 20:54:31 UTC (rev 12971)
+++ DART/branches/rma_trunk/assimilation_code/modules/assimilation/adaptive_inflate_mod.f90 2019-02-06 21:15:53 UTC (rev 12972)
@@ -364,7 +364,8 @@
subroutine validate_inflate_options(inf_flavor, inf_damping, inf_initial_from_restart, &
inf_sd_initial_from_restart, inf_deterministic, inf_sd_max_change, &
- do_prior_inflate, do_posterior_inflate, output_inflation)
+ do_prior_inflate, do_posterior_inflate, output_inflation, &
+ compute_posterior)
integer, intent(in) :: inf_flavor(2)
real(r8), intent(inout) :: inf_damping(2)
@@ -375,6 +376,7 @@
logical, intent(out) :: do_prior_inflate
logical, intent(out) :: do_posterior_inflate
logical, intent(out) :: output_inflation
+logical, intent(in) :: compute_posterior
integer :: i
character(len=32) :: string(2)
@@ -411,6 +413,13 @@
if(inf_flavor(1) == 4) call error_handler(E_ERR, 'validate_inflate_options', &
'RTPS inflation (type 4) only supported for Posterior inflation', source, revision, revdate)
+! Cannot select posterior options if not computing posterior
+if(.not. compute_posterior .and. inf_flavor(2) > 0) then
+ write(msgstring, *) 'cannot enable posterior inflation if not computing posterior values'
+ call error_handler(E_ERR,'validate_inflate_options', msgstring, source, revision, revdate, &
+ text2='"compute_posterior" is false; posterior inflation flavor must be 0')
+endif
+
! 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.
@@ -688,7 +697,7 @@
! Find value at a point one OLD sd above new mean value
new_1_sd = compute_new_density(dist_2, sigma_p_2, sigma_o_2, lambda_mean, lambda_sd, gamma_corr, &
- new_cov_inflate + lambda_sd)
+ new_cov_inflate + lambda_sd)
! If either the numerator or denominator of the following computation
! of 'ratio' is going to be zero (or almost so), return the original incoming
@@ -712,7 +721,10 @@
! Prevent an increase in the sd of lambda???
! For now, this is mostly countering numerical errors in this computation
- if(new_cov_inflate_sd > lambda_sd) new_cov_inflate_sd = lambda_sd
+ if(new_cov_inflate_sd > lambda_sd) then
+ new_cov_inflate_sd = lambda_sd
+ return
+ endif
endif
@@ -770,9 +782,12 @@
! If the updated variance is more than xx% the prior variance, keep the prior unchanged
! for stability reasons. Also, if the updated variance is NaN (not sure why this
- ! can happen; never did when develping this code), keep the prior variance unchanged.
+ ! can happen; never did when developing this code), keep the prior variance unchanged.
if ( new_cov_inflate_sd > sd_max_change_in*lambda_sd .OR. &
- new_cov_inflate_sd /= new_cov_inflate_sd) new_cov_inflate_sd = lambda_sd
+ new_cov_inflate_sd /= new_cov_inflate_sd) then
+ new_cov_inflate_sd = lambda_sd
+ return
+ endif
endif
else
Modified: DART/branches/rma_trunk/assimilation_code/modules/assimilation/filter_mod.dopplerfold.f90
===================================================================
--- DART/branches/rma_trunk/assimilation_code/modules/assimilation/filter_mod.dopplerfold.f90 2019-02-06 20:54:31 UTC (rev 12971)
+++ DART/branches/rma_trunk/assimilation_code/modules/assimilation/filter_mod.dopplerfold.f90 2019-02-06 21:15:53 UTC (rev 12972)
@@ -48,15 +48,15 @@
compute_copy_mean, compute_copy_mean_sd, &
compute_copy_mean_var, duplicate_ens, get_copy_owner_index, &
get_ensemble_time, set_ensemble_time, broadcast_copy, &
- map_task_to_pe, map_pe_to_task, prepare_to_update_copies, &
+ 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, &
print_ens_handle
-use adaptive_inflate_mod, only : do_ss_inflate, mean_from_restart, sd_from_restart, &
- inflate_ens, adaptive_inflate_init, &
- adaptive_inflate_type, set_inflation_mean_copy, &
+use adaptive_inflate_mod, only : do_ss_inflate, mean_from_restart, sd_from_restart, &
+ inflate_ens, adaptive_inflate_init, &
+ adaptive_inflate_type, set_inflation_mean_copy , &
log_inflation_info, set_inflation_sd_copy, &
get_minmax_task_zero, do_rtps_inflate, &
validate_inflate_options
@@ -108,9 +108,8 @@
! Some convenient global storage items
character(len=512) :: msgstring
More information about the Dart-dev
mailing list