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 diag_integral_mod #1217

Merged
merged 42 commits into from
Aug 3, 2023

Conversation

mlee03
Copy link
Contributor

@mlee03 mlee03 commented May 11, 2023

Description
This PR contains mixed mode updates to diag_integral_mod.

All private functions takes in r8_kind arguments.
All input real arguments are converted to r8_kind.
All real mathematical operations are carried out with r8_kind precision

@mlee03 mlee03 requested review from J-Lentz and mcallic2 July 19, 2023 14:02
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/diag_manager/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/field_manager/include>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note to reviewers: field_manager was included twice. Hence this line was deleted in this PR

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
monin_obukhov/include/monin_obukhov.inc Outdated Show resolved Hide resolved
Copy link
Contributor

@rem1776 rem1776 left a comment

Choose a reason for hiding this comment

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

just left one comment for something to look into, but i think it should be fine

@@ -1366,13 +989,13 @@ function get_axis_time (Time, units) result (atime)

call get_time (Time, sec, day)
if (units(1:3) == 'sec') then
atime = float(sec) + 86400.*float(day)
Copy link
Contributor

Choose a reason for hiding this comment

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

was this float intrinsic casting to r4 with a default r8 compile? or was it r8? i think either way the static value would cause implicit casting to the bigger kind, but might be worth double checking.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question! It's not implicitly casted according to the compilation log, but it's a private function and when called, aka xtime=get_axis_time(arguments), xtime is a r8_kind so I think we're safe here.

@rem1776 rem1776 merged commit 0e0956c into NOAA-GFDL:mixedmode Aug 3, 2023
27 checks passed
rem1776 added a commit that referenced this pull request Sep 20, 2023
BREAKING CHANGE: In coupler_types.F90,  `coupler_nd_field_type` and `coupler_nd_values_type` have been renamed to indicate real kind value: `coupler_nd_real4/8_field_type` and `coupler_nd_real4/8_values_type`. The `bc` field within `coupler_nd_bc_type` was modified to use r8_kind within the value and field types, and an additional field added `bc_r4` to use r4_kind values.

Includes:

* feat: eliminate use of real numbers for mixed precision in `block_control` (#1195)

* feat: mixed precision field_manager  (#1205)

* feat: mixed precision random_numbers_mod (#1191)

* feat: mixed precision time_manager reals to r8 and clean up (#1196)

* feat: mixed Precision tracer_manager  (#1212)

* Mixed precision monin_obukhov (#1116)

* Mixed precision: `monin_obukhov` unit tests (#1272)

* mixed-precision diag_integral_mod  (#1217)

* mixed precision time_interp (#1252)

* mixed precision interpolator_mod  (#1305)

* Mixed precision astronomy (#1092)

* Mixed precision `data_override_mod` (#1323)

* mixed precision exchange (#1341)

* coupler mixed precision (#1353)

* Mixed precision topography_mod (#1250)

---------

Co-authored-by: rem1776 <[email protected]>
Co-authored-by: MiKyung Lee <[email protected]>
Co-authored-by: mlee03 <[email protected]>
Co-authored-by: Caitlyn McAllister <[email protected]>
Co-authored-by: Jesse Lentz <[email protected]>
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