Skip to content

Commit

Permalink
Explicitly copy the input file into the output if the transform fails
Browse files Browse the repository at this point in the history
for the transform_all case.

This version has been tested with the lorenz_96_tracer tests. All tests run
to completion. All of the RMSE tests reproduce the baseline values except for:
Case 1 ensemble size 6 and 15
Case 2 ensemble size 6 and 15
Case 3 ensemble size 6 and 10
  • Loading branch information
jlaucar committed Dec 23, 2024
1 parent 7bc2724 commit 1f2b7e1
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ subroutine transform_all_to_probit(ens_size, num_vars, state_ens, distribution_t
do i = 1, num_vars
call transform_to_probit(ens_size, state_ens(1:ens_size, i), distribution_type(i), &
p(i), temp_ens, use_input_p, bounded_below, bounded_above, lower_bound, upper_bound, ierr(i))
if(ierr(i) == 0) probit_ens(1:ens_size, i) = temp_ens
if(ierr(i) == 0)
probit_ens(1:ens_size, i) = temp_ens
else
! If transform failed, return the input state
probit_ens(1:ens_size, i) = state_ens(1:ens_size, i)
endif
end do

end subroutine transform_all_to_probit
Expand Down Expand Up @@ -366,7 +371,7 @@ subroutine to_probit_bounded_normal_rh(ens_size, state_ens, p, probit_ens, &
ierr = 0

if(use_input_p) then
! Need tthis to fail if p isn't available. Is that possible?
! Need this to fail if p isn't available. Is that possible?
! Get the quantiles for each of the ensemble members in a BNRH distribution
call bnrh_cdf_initialized_vector(state_ens, ens_size, p, quantile)
else
Expand Down

0 comments on commit 1f2b7e1

Please sign in to comment.