NCAR / DART

Data Assimilation Research Testbed
https://dart.ucar.edu/
Apache License 2.0
184 stars 139 forks source link

bug: arguments in the call to count_state_ens_copies #613

Open jlaucar opened 6 months ago

jlaucar commented 6 months ago

The order of arguments in the call to count_state_ens_copies in filter_mod.f90 is inconsistent with the argument list in the function. The call has prior_inflate and posterior_inflate in this order as the second and third arguments; this is reversed in the function.

This appears in all DART version since at least 2017.

The impacts of this error are unclear. It is possible that some diagnostics output about inflation is mislabeled. It is possible that in some cases the diagnostic output is skipped.

hkershaw-brown commented 6 months ago

lines of code: https://github.com/NCAR/DART/blob/99ebec56a6efdd243ed026da24b29a1a45bb8cdd/assimilation_code/modules/assimilation/filter_mod.f90#L462

https://github.com/NCAR/DART/blob/99ebec56a6efdd243ed026da24b29a1a45bb8cdd/assimilation_code/modules/assimilation/filter_mod.f90#L2242

mixture of module globals do_prior_inflate & querying the derived type mean_from_restart(prior_inflate). Also passing in module globals as arguments: https://github.com/NCAR/DART/blob/99ebec56a6efdd243ed026da24b29a1a45bb8cdd/assimilation_code/modules/assimilation/filter_mod.f90#L2282-L2286