Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QCEFF rpts inflate #748

Open
hkershaw-brown opened this issue Oct 3, 2024 · 0 comments
Open

QCEFF rpts inflate #748

hkershaw-brown opened this issue Oct 3, 2024 · 0 comments
Labels
QCEFF quantile conserving filters

Comments

@hkershaw-brown
Copy link
Member

In filter_ensemble_inflate inflation does transform to/from probit.

non-RTPS inflation:

transform_to_probit
inflate
transform_from_probit

! This is an initial test of doing inflation in probit space
! Note that this appears to work with adaptive inflation, but more research would be good
! Probably also shouldn't be used with groups for now although it is coded to do so
do j = 1, ens_handle%my_num_vars
call get_state_meta_data(ens_handle%my_vars(j), my_state_loc, my_state_kind)
! Need to specify what kind of prior to use for each
call probit_dist_info(my_state_kind, .true., .true., dist_type, &
bounded_below, bounded_above, lower_bound, upper_bound)
call transform_to_probit(grp_size, ens_handle%copies(grp_bot:grp_top, j), &
dist_type, dist_params, probit_ens(1:grp_size), .false., &
bounded_below, bounded_above, lower_bound, upper_bound)
! Compute the ensemble mean in transformed space
probit_ens_mean = sum(probit_ens(1:grp_size)) / grp_size
! Inflate in probit space
call inflate_ens(inflate, probit_ens(1:grp_size), probit_ens_mean, &
ens_handle%copies(inflate_copy, j))
! Transform back from probit space
call transform_from_probit(grp_size, probit_ens(1:grp_size), &
dist_params, ens_handle%copies(grp_bot:grp_top, j))
end do

RTPS inflation:

inflate

if ( do_rtps_inflate(inflate)) then
if ( present(SPARE_PRIOR_SPREAD) .and. present(ENS_SD_COPY)) then
write(msgstring, *) ' doing RTPS inflation'
call error_handler(E_MSG,'filter_ensemble_inflate:',msgstring,source)
!Reset the RTPS factor to the given input.nml value
ens_handle%copies(inflate_copy, 1:ens_handle%my_num_vars) = inf_initial(POSTERIOR_INF)
do j = 1, ens_handle%my_num_vars
call inflate_ens(inflate, ens_handle%copies(grp_bot:grp_top, j), &
ens_handle%copies(ENS_MEAN_COPY, j), ens_handle%copies(inflate_copy, j), 0.0_r8, &
ens_handle%copies(SPARE_PRIOR_SPREAD, j), ens_handle%copies(ENS_SD_COPY, j))
end do
else
write(msgstring, *) 'internal error: missing arguments for RTPS inflation, should not happen'
call error_handler(E_ERR,'filter_ensemble_inflate',msgstring,source)
endif
else

@hkershaw-brown hkershaw-brown added the QCEFF quantile conserving filters label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QCEFF quantile conserving filters
Projects
None yet
Development

No branches or pull requests

1 participant