Skip to content

Update to fms_diag_yaml_mod#1186

Merged
thomas-robinson merged 7 commits into
NOAA-GFDL:dmUpdatefrom
ganganoaa:get_buffer_ids_dmUpdate
Apr 25, 2023
Merged

Update to fms_diag_yaml_mod#1186
thomas-robinson merged 7 commits into
NOAA-GFDL:dmUpdatefrom
ganganoaa:get_buffer_ids_dmUpdate

Conversation

@ganganoaa
Copy link
Copy Markdown
Contributor

@ganganoaa ganganoaa commented Apr 6, 2023

Description
Adds routine get_diag_field_ids to fms_diag_yaml_mod which gets indices of fields corresponding to indices in the sorted variable_list.

Fixes # (issue)
CI

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

Comment thread diag_manager/fms_diag_yaml.F90 Outdated
end function get_diag_fields_entries

!> @brief Gets the output buffer ids corresponding to the indices in the sorted variable_list
!! @return Array of indices of the output buffers
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should say "A copy of the array of indices of the output buffers"

Copy link
Copy Markdown
Contributor Author

@ganganoaa ganganoaa Apr 10, 2023

Choose a reason for hiding this comment

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

I want to change the name of the function to 'get_diag_field_ids'. What do you think?

Comment thread diag_manager/fms_diag_yaml.F90 Outdated

!> @brief Gets the output buffer ids corresponding to the indices in the sorted variable_list
!! @return Array of indices of the output buffers
function get_output_buffer_ids(indices) result(buffer_ids)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The name of this function is misleading. This returns the indices of the field in the diag_yaml%diag_fields object. It is not related to the buffer ids.

type(diagYamlFilesVar_type), allocatable, private, dimension (:) :: diag_fields !< Diag fields info

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think the right name of the function should be something like 'get_diag_field_ids'. Do you agree?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@uramirez8707 Can you comment on this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good

Change get_output_buffer_ids to get_diag_field_ids and update comments.
Replace buffer_ids with field_ids.
Comment thread diag_manager/fms_diag_yaml.F90 Outdated
end function get_diag_fields_entries

!> @brief Gets field indices corresponding to the indices (input argument) in the sorted variable_list
!! @return Array of field indices
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should say "Copy of array of field indices"

Update comment for return
@thomas-robinson thomas-robinson merged commit 8e9ca97 into NOAA-GFDL:dmUpdate Apr 25, 2023
rem1776 pushed a commit to rem1776/FMS that referenced this pull request May 1, 2024
* Adds routine  get_diag_field_ids
rem1776 pushed a commit to rem1776/FMS that referenced this pull request May 1, 2024
* Adds routine  get_diag_field_ids
rem1776 pushed a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 pushed a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 pushed 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.

3 participants