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

Write buffer prep #1311

Merged
merged 4 commits into from
Aug 1, 2023
Merged

Conversation

uramirez8707
Copy link
Contributor

Description
To prepare for the write_buffer update:

  1. The buffer_ids were added to the diag_file object (this is needed to loop through them and write in diag_send_complete)
  2. Adds the functionality to get the size of the subaxis (this is needed so that the subregional variables can be allocated to the correct size)
  3. Adds the field id and yaml id to the output_buffer object (this is needed so that we can get information about the variable when writing for the variable)

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

@@ -287,6 +292,16 @@ subroutine add_field_and_yaml_id (this, new_field_id, yaml_id)
endif
end subroutine add_field_and_yaml_id

!> \brief Adds a field and yaml ID to the file
subroutine add_buffer_ids (this, buffer_id)
Copy link
Member

Choose a reason for hiding this comment

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

The name of this routine is a bit misleading. It only adds one ID, but ids is plural in the routine name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@thomas-robinson
Copy link
Member

"Adds the field id and yaml id to the output_buffer object (this is needed so that we can get information about the variable when writing for the variable)"
Writing is done on a file level, and the file object should have all of this information. So why does the buffer object need this?

1 similar comment
@thomas-robinson
Copy link
Member

"Adds the field id and yaml id to the output_buffer object (this is needed so that we can get information about the variable when writing for the variable)"
Writing is done on a file level, and the file object should have all of this information. So why does the buffer object need this?

@uramirez8707
Copy link
Contributor Author

"Adds the field id and yaml id to the output_buffer object (this is needed so that we can get information about the variable when writing for the variable)" Writing is done on a file level, and the file object should have all of this information. So why does the buffer object need this?

We are looping through the buffer_ids for the file. The field_ids in the diag file object do not necessary correspond to the buffer_ids (i.e buffer_ids(i) may not be the buffer for field_ids(i)). They were added to the file as the fields were registering/data was sent.

@thomas-robinson thomas-robinson merged commit bfe4cad into NOAA-GFDL:dmUpdate Aug 1, 2023
27 checks passed
rem1776 pushed a commit to rem1776/FMS that referenced this pull request May 1, 2024
* Adds the buffer ids to the diag file object in the register call

* add functionality to get the size of the subaxis

* Add the field id and the yaml id to the buffer object (with getter and setter functions)
rem1776 pushed a commit to rem1776/FMS that referenced this pull request May 1, 2024
* Adds the buffer ids to the diag file object in the register call

* add functionality to get the size of the subaxis

* Add the field id and the yaml id to the buffer object (with getter and setter functions)
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