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

fix diag_send_complete loops and add get_file_ids #1407

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

rem1776
Copy link
Contributor

@rem1776 rem1776 commented Nov 13, 2023

Description
moves the loops around in diag_send_complete so that it goes through the fields, and then the files the field is in.

I've had this as part of the average updates but figured it would better to put it in separately.

Fixes # (issue)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also note
any relevant details for your test configuration (e.g. compiler, OS). Include
enough information so someone can reproduce your tests.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

cycle
endif
! Check if buffer alloc'd
has_input_buff: if (diag_field%has_input_data_buffer()) then
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this if statement can be moved to outside the file loop.
allocate_diag_field_output_buffers and fms_diag_do_reduction are looping through the number of buffers for the field. The number of buffers for the field is the same as the number of files the field is in, so i think we will be doing the reductions twice here.


call this%fms_diag_do_io()
" -"//trim(error_string)))
endif has_input_buff
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add an else here and error out with a message saying that math_needs_to_be_done is true, but there is no input buffer?

@rem1776 rem1776 merged commit 99822ba into NOAA-GFDL:dmUpdate Nov 15, 2023
17 of 18 checks passed
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants