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

bug-fix: out of order args in count_state_ens_copies function #704

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

mjs2369
Copy link
Contributor

@mjs2369 mjs2369 commented Jul 23, 2024

Description:

The function count_state_ens_copies had inconsistent ordering of the arguments in the function's definition and calls. This PR corrects this problem.

Fixes issue

fixes #613

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Documentation changes needed?

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.

Tests

Please describe any tests you ran to verify your changes.

Tested to be bitwise identical with filter runs using the old ordering of the arguments (with both cam-fv and wrf)

Checklist for merging

  • Updated changelog entry
  • Documentation updated
  • Update conf.py

Checklist for release

  • Merge into main
  • Create release from the main branch with appropriate tag
  • Delete feature-branch

Testing Datasets

  • Dataset needed for testing available upon request
  • Dataset download instructions included
  • No dataset needed

@mjs2369 mjs2369 requested a review from hkershaw-brown July 23, 2024 00:58
Copy link
Member

@hkershaw-brown hkershaw-brown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Marlee, approved.

As we chatted about, there are a bunch of non-ideal choices made in this code (listed at the end), but this change is a clean fix for the bug.

For bitwise differences, this pull request fixes writing out the INPUT stages.
Note the bug only affect writing the INPUT stages.

In main stages_to_write input was using the wrong prior/posterior

stages_to_write              = 'input'
  inf_flavor                  = **5**,                       0
  inf_initial_from_restart    = .true.,                  **.false.**

main vs. pull_794:

kershaw@derecho3:/glade/derecho/scratch/hkershaw/DART/pull_reqeuests/pull_704/CAM-Run$ nccmp -d input_mean.nc ../CAM-Run.fix/input_mean.nc 
DIFFER : VARIABLE : T : POSITION : [0,0,0,3] : VALUES : 263.551 <> 263.551
stages_to_write              = 'input', 'forecast','output'
  inf_flavor                  = **5,**                       0
  inf_initial_from_restart    = .true.,                  **.true.**

main vs pull_704

nccmp -d input_mean.nc ../CAM-Run.fix/input_mean.nc 

The fix matches the {prior|posterior}_from_restart with the input.nml correctly.

stages_to_write              = 'input', 'forecast','output'
  inf_flavor                  = **5,**                       0
  inf_initial_from_restart    = **.true.,**                  .false.

non-ideal choices:
mixture of module globals: do_prior_inflate & querying the derived type mean_from_restart(prior_inflate), passing in module globals as arguments

@hkershaw-brown hkershaw-brown added the release! bundle with next release label Jul 25, 2024
@hkershaw-brown hkershaw-brown merged commit 05099fd into main Jul 26, 2024
4 checks passed
@hkershaw-brown hkershaw-brown deleted the args-count_state_ens_copies branch July 26, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release! bundle with next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: arguments in the call to count_state_ens_copies
2 participants