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

Mixed precision axis_utils2 #1081

Closed
wants to merge 32 commits into from
Closed

Conversation

mcallic2
Copy link
Contributor

@mcallic2 mcallic2 commented Nov 28, 2022

Description
Adds all changes needed for axis_utils2 to add mixed mode precision

Fixes # (issue)

How Has This Been Tested?
Autotools using oneapi and gcc compiler, and cmake

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

@mcallic2 mcallic2 changed the base branch from main to mixedmode November 29, 2022 14:35
@mcallic2 mcallic2 changed the title Axis utils Mixed mode precision to axis_utils Nov 29, 2022
@mcallic2 mcallic2 marked this pull request as draft December 5, 2022 18:41
@mcallic2 mcallic2 marked this pull request as ready for review December 7, 2022 18:51
@mcallic2 mcallic2 changed the title Mixed mode precision to axis_utils Mixed precision axis_utils Dec 8, 2022
@mcallic2 mcallic2 changed the title Mixed precision axis_utils Mixed precision axis_utils2 Dec 12, 2022
write (unit,*) '=> Error: "nearest_index" array must be monotonically increasing &
&when searching for nearest value to ',value
write (unit,*) '=> Error: "nearest_index" array must be monotonically increasing' &
& // 'when searching for nearest value to ', value
Copy link
Contributor

Choose a reason for hiding this comment

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

is this change necessary?

Copy link
Contributor Author

@mcallic2 mcallic2 Dec 14, 2022

Choose a reason for hiding this comment

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

I believe the \\ are for the gcc compiler to understand the string concatanation

keep_going = .true.
do while (i <= ia .and. keep_going)
i = i+1
if (value <= array(i)) then
frac_index = float(i-1) + (value-array(i-1))/(array(i)-array(i-1))
keep_going = .false.
FRAC_INDEX_ = float(i-1) + (value-array(i-1))/(array(i)-array(i-1))
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of float, real(i-1,FMS_AI_KIND_)

@@ -26,7 +26,7 @@ program test_axis_utils
use axis_utils2_mod, only : axis_edges
use fms2_io_mod, only : open_file, close_file, write_data, register_axis, register_field, &
FmsNetcdfFile_t, register_variable_attribute
use platform_mod, only : r8_kind
use platform_mod, only : r4_kind, r8_kind
Copy link
Contributor

Choose a reason for hiding this comment

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

You do not need the test_axis_utils.F90 file and should be deleted?

mcallic2 and others added 5 commits December 21, 2022 15:37
BREAKING CHANGE: The following namelist flags are deprecated and will now result in a fatal error if used: grid_center_bug, read_data_bug, retain_cm3_bug, and reproduce_siena
@rem1776
Copy link
Contributor

rem1776 commented Jan 4, 2023

@mcallic2 I think you pulled from main instead of from the mixedmode branch, you should just need to revert the last commit

@mcallic2
Copy link
Contributor Author

mcallic2 commented Jan 9, 2023

I messed up pulling in main on this PR. I created a new PR to hide my shame, please refer to that.

@mcallic2 mcallic2 closed this Jan 9, 2023
@mcallic2 mcallic2 deleted the axis_utils branch January 20, 2023 15:20
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.

4 participants