You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Up to this point when wrapping FV3GFS, we have always compiled the model with 64-bit precision for both the physics and dynamical core. While it can be compiled and run with full 64-bit precision (as is done in #1), for efficiency SHiELD is generally compiled and run in "mixed mode," meaning that the dynamical core uses 32-bit precision values and the physics uses 64-bit values. @lharris4 would like to see this eventually; quoting from NOAA-GFDL/SHiELD_build#27 (comment):
Note that we will probably eventually need to support 32-bit/mixed-mode arithmetic if we wish for greater uptake of the SHiELD wrapper, since we typically run SHiELD with 32-bit dynamics for efficiency purposes.
The Python wrapper currently implicitly assumes that numbers are in 64-bit precision when building the template fortran and Cython modules for getters and setters (see the data types specified in places like here or here). At a minimum this is something that would need to be relaxed / configurable to support wrapping a mixed-mode model. There could be other details I am not considering as well, but this issue is meant to track notes / discussion about this feature.
The text was updated successfully, but these errors were encountered:
spencerkclark
changed the title
Consider how to enable wrapping a fortran model compiled in mixed 32bit/64bit mode
Consider how to enable wrapping a fortran model compiled in mixed 32-bit / 64-bit mode
Oct 2, 2023
# This is the 1st commit message:
Add updates required for overriding radiative fluxes
# The commit message #2 will be skipped:
# Uncomment and update diagnostic-based test
Up to this point when wrapping FV3GFS, we have always compiled the model with 64-bit precision for both the physics and dynamical core. While it can be compiled and run with full 64-bit precision (as is done in #1), for efficiency SHiELD is generally compiled and run in "mixed mode," meaning that the dynamical core uses 32-bit precision values and the physics uses 64-bit values. @lharris4 would like to see this eventually; quoting from NOAA-GFDL/SHiELD_build#27 (comment):
The Python wrapper currently implicitly assumes that numbers are in 64-bit precision when building the template fortran and Cython modules for getters and setters (see the data types specified in places like here or here). At a minimum this is something that would need to be relaxed / configurable to support wrapping a mixed-mode model. There could be other details I am not considering as well, but this issue is meant to track notes / discussion about this feature.
The text was updated successfully, but these errors were encountered: