-
Notifications
You must be signed in to change notification settings - Fork 138
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 field_manager #1205
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, mainly needs some interfaces added for fm_util.F90.
field_manager/fm_util.F90
Outdated
public fm_util_set_value | ||
public fm_util_set_value_integer_array | ||
public fm_util_set_value_logical_array | ||
public fm_util_set_value_real_array | ||
public fm_util_set_value_real_array_r4 | ||
public fm_util_set_value_real_array_r8 | ||
public fm_util_set_value_string_array | ||
public fm_util_set_value_integer | ||
public fm_util_set_value_logical | ||
public fm_util_set_value_real | ||
public fm_util_set_value_real_r4 | ||
public fm_util_set_value_real_r8 | ||
public fm_util_set_value_string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not directly related to the mixed mode update
But this is weird, fm_util_set_value
is an interface and what the users should be calling. The compiler will figure out which function to go to.
Lines 119 to 128 in 003b8e1
interface fm_util_set_value !{ | |
module procedure fm_util_set_value_integer_array | |
module procedure fm_util_set_value_logical_array | |
module procedure fm_util_set_value_real_array | |
module procedure fm_util_set_value_string_array | |
module procedure fm_util_set_value_integer | |
module procedure fm_util_set_value_logical | |
module procedure fm_util_set_value_real | |
module procedure fm_util_set_value_string | |
end interface !} |
public :: fm_get_value_real_r4 !< as above (overloaded function) | ||
public :: fm_get_value_real_r8 !< as above (overloaded function) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment fm_get_value
should be the only public function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree but I'm scared to change it. Coupler_mod in FMS calls fm_util_get_real instead of "fm_util_get_value" so for consistency, I think I'm going to leave this in here. But maybe this can be a separate issue, cleaning up interfaces in field_manager?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, this should be a separate issue, not related to mixed mode.
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]>
Description
In this PR,
field_manager
has been updated to include mixedmode capabilities. All string values that are converted to real values is done in r8_kind precision.Minor changes were required in
coupler_types.F90
where the precision of the pointersparam
andmol_wt
are now explicitly defined as r8_kind. This change is required for compatibility between the current atmos_ocean_fluxes and the mixed-mode-updated field_manager.