Skip to content

Modern diag manager: check if field is registered#1151

Merged
thomas-robinson merged 6 commits into
NOAA-GFDL:dmUpdatefrom
uramirez8707:check_if_registered
Mar 29, 2023
Merged

Modern diag manager: check if field is registered#1151
thomas-robinson merged 6 commits into
NOAA-GFDL:dmUpdatefrom
uramirez8707:check_if_registered

Conversation

@uramirez8707
Copy link
Copy Markdown
Contributor

Description
Adds a function to the file_object to check if a field in the file object was registered
Updates send_diag_complete to skip fields that were not registered

This was causing out of bounds issues when a variable was not registered since file_field_ids(ifield) will be -1 so
it will try to do

 diag_field => this%FMS_diag_fields(-1)

Fixes # (issue)

How Has This Been Tested?
CI

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_file_object.F90 Outdated

!< @brief Determine if the field corresponding to the field_id was registered to the file
!! @return .True. if the field was registed to the file
logical function is_field_registered(this, field_id)
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.

Make this pure

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.

@thomas-robinson thomas-robinson merged commit cd26058 into NOAA-GFDL:dmUpdate Mar 29, 2023
rem1776 pushed a commit to rem1776/FMS that referenced this pull request May 1, 2024
* add a subroutine to check if a field in the file object was registered and uses it to skip fields that were not registered
rem1776 pushed a commit to rem1776/FMS that referenced this pull request May 1, 2024
* add a subroutine to check if a field in the file object was registered and uses it to skip fields that were not registered
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.

2 participants