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

Update filter_mod.rst #605

Merged
merged 6 commits into from
Jan 9, 2024
Merged

Conversation

ann-norcio
Copy link
Contributor

@ann-norcio ann-norcio commented Dec 19, 2023

Description:

Corrected documentation for output_forward_op_errors output

Fixes issue

fixes #530

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

subroutine verbose_forward_op_output:
do i = 1, ens_size
do j = 1, qc_ens_handle%my_num_vars
if(nint(qc_ens_handle%copies(i, j)) /= 0) write(forward_unit, *) i, keys(j), nint(qc_ens_handle%copies(i, j))
end do
end do

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

Corrected documentation for output_forward_op_errors output
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.

Hi Ann, your documentation looks good.
I think there is a bug in the actual code (see the comment)
so we'll take a look a this before merging your updated documentation.

@kdraeder local obs num or key, what do you think is best for debugging?

| | | values listed: the observation number, |
| | | the ensemble member number, and the |
| | | values listed: the ensemble member number,|
| | | the (local) observation number, and the |
Copy link
Member

Choose a reason for hiding this comment

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

thanks for this Ann,

Just looking at the issue #530 with the note on (local) observation number vs observation number

I think the code is incorrect too:

! qc_ens_handle is a real representing an integer; values /= 0 get written out
do i = 1, ens_size
do j = 1, qc_ens_handle%my_num_vars
if(nint(qc_ens_handle%copies(i, j)) /= 0) write(forward_unit, *) i, keys(j), nint(qc_ens_handle%copies(i, j))
end do
end do

keys(j) is going print

keys(1)
keys(2)
keys(3)
...
for every process.

rather than the key for the local observation
keys(qc_ens_handle%my_vars(1))
keys(qc_ens_handle%my_vars(2))
keys(qc_ens_handle%my_vars(3))

I think the code should print:
j local observation number or
keys(qc_ens_handle%my_vars(j)) for the key

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Helen, missed that. Changed it so it prints keys(qc_ens_handle%my_vars(j))

https://github.com/NCAR/DART/pull/605/commits/1b7043eaaaf2ab62c7bd73f8af1ab48422ddd9f4

Copy link
Member

Choose a reason for hiding this comment

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

need to decide whether to print local obs number or key.
The documentation and code need to match, which ever one we pick.

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.

A better solution from JLA:
print out both the local obs number and the key.

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.

A better solution from JLA:
print out both the local obs number and the key.

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 for the changes Ann,
Couple of small fixes still needed
Cheers,
Helen

do j = 1, qc_ens_handle%my_num_vars
if(nint(qc_ens_handle%copies(i, j)) /= 0) write(forward_unit, *) i, keys(j), nint(qc_ens_handle%copies(i, j))
end do
do i = 1, ens_size
Copy link
Member

Choose a reason for hiding this comment

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

dart style guide: 3 spaces for indenting code, so remove the extra spaces from the indenting.
remove the added whitespace a the ends of the lines also.

| | | this file. Each line will list the |
| | | following values: the ensemble member |
| | | number, local observation number, the key |
| | | for the local observation, and then the |
Copy link
Member

Choose a reason for hiding this comment

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

local key is a misleading here. There is only a global key, so remove 'local'

Suggested change
| | | for the local observation, and then the |
| | | for the observation, and then the |

@ann-norcio
Copy link
Contributor Author

Thanks Helen, made these changes.

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.

Looks good!
Prints out info, docs match the code, table all lined up nicely in .rst.

@hkershaw-brown bundle with next release

@hkershaw-brown hkershaw-brown added the release! bundle with next release label Jan 4, 2024
@hkershaw-brown hkershaw-brown merged commit de46876 into NCAR:main Jan 9, 2024
4 checks passed
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.

Documentation of output_forward_op_errors
2 participants