Modern diag manager: add subzaxis#1148
Merged
Merged
Conversation
…to use when setting filename
Member
thomas-robinson
left a comment
There was a problem hiding this comment.
I'm a little concerned about the mixed-mode support here and the real casting.
Comment on lines
+1243
to
+1249
| type is (real(kind=r4_kind)) | ||
| !TODO need to include the conversion to "real" because nearest_index doesn't take r4s and r8s | ||
| subaxis_indices(1) = nearest_index(real(zbounds(1)), real(zaxis_data)) | ||
| subaxis_indices(2) = nearest_index(real(zbounds(2)), real(zaxis_data)) | ||
| type is (real(kind=r8_kind)) | ||
| subaxis_indices(1) = nearest_index(real(zbounds(1)), real(zaxis_data)) | ||
| subaxis_indices(2) = nearest_index(real(zbounds(2)), real(zaxis_data)) |
Member
There was a problem hiding this comment.
I think there may be an issue here with the types and just using real()
Contributor
Author
There was a problem hiding this comment.
Once axis_utils2 is updated for mixed mode, the conversion to real can be done correctly:
type is (real(kind=r4_kind))
!TODO need to include the conversion to "real" because nearest_index doesn't take r4s and r8s
subaxis_indices(1) = nearest_index(zbounds(1), zaxis_data)
subaxis_indices(2) = nearest_index(zbounds(2), zaxis_data)
type is (real(kind=r8_kind))
subaxis_indices(1) = nearest_index(real(zbounds(1), kind=r8_kind), zaxis_data)
subaxis_indices(2) = nearest_index(real(zbounds(2), kind=r8_kind), zaxis_data)
Right now nearest_index only takes in "reals", so this won't compile ...
Member
There was a problem hiding this comment.
OK, I think I understand now. We need to keep track of this.
| axis_ptr => diag_axis(this%axis_ids(i)) | ||
| dimnames(i) = axis_ptr%axis%get_axis_name(is_regional) | ||
| enddo | ||
| !< Duplicated do loops for #performance |
Member
There was a problem hiding this comment.
Is the # going to mess with any preprocessing or text editor highlighting? Is something like VScode actually going to read this as a hash? I don't actually know.
thomas-robinson
approved these changes
Mar 10, 2023
rem1776
pushed a commit
to rem1776/FMS
that referenced
this pull request
May 1, 2024
* write the time data based on how FMS is compiled * Implement capability to specifiy which time in a time average period to use when setting filename * Fix race conditions + add send_data tests * add the sub z axis * Add edges_names when defining the diurnal axis * Fix string length and adds some more documentation updates * simplify the register_field call
rem1776
pushed a commit
to rem1776/FMS
that referenced
this pull request
May 1, 2024
* write the time data based on how FMS is compiled * Implement capability to specifiy which time in a time average period to use when setting filename * Fix race conditions + add send_data tests * add the sub z axis * Add edges_names when defining the diurnal axis * Fix string length and adds some more documentation updates * simplify the register_field call
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
subRegionfrom the subaxis type because I was not really using itFixes # (issue)
How Has This Been Tested?
CI including added test
Checklist:
make distcheckpasses