namespace mom_coms¶
Overview¶
Interfaces to non-domain-oriented communication subroutines, including the MOM6 reproducing sums facility. More…
namespace mom_coms { // interfaces interface assignment(=); interface operator(+); interface operator(-); interface reproducing_sum; // global functions logical function, public query_efp_overflow_error(); subroutine, public reset_efp_overflow_error(); type(efp_type) function, public efp_plus(EFP1 EFP1, EFP2 EFP2); type(efp_type) function, public efp_minus(EFP1 EFP1, EFP2 EFP2); real function, public efp_to_real(EFP1 EFP1); real function, public efp_real_diff(EFP1 EFP1, EFP2 EFP2); type(efp_type) function, public real_to_efp(val val, overflow overflow); subroutine, public efp_list_sum_across_pes(EFPs EFPs, nval nval, errors errors); subroutine, public mom_infra_end(); } // namespace mom_coms
Detailed Documentation¶
Interfaces to non-domain-oriented communication subroutines, including the MOM6 reproducing sums facility.
Global Functions¶
logical function, public query_efp_overflow_error()
Returns the status of the module’s error flag.
subroutine, public reset_efp_overflow_error()
Reset the module’s error flag to false.
type(efp_type) function, public efp_plus(EFP1 EFP1, EFP2 EFP2)
Add two extended-fixed-point numbers.
Parameters:
efp1 |
The first extended fixed point number |
efp2 |
The second extended fixed point number |
Returns:
The result in extended fixed point format
type(efp_type) function, public efp_minus(EFP1 EFP1, EFP2 EFP2)
Subract one extended-fixed-point number from another.
Parameters:
efp1 |
The first extended fixed point number |
efp2 |
The extended fixed point number being subtracted from the first extended fixed point number |
Returns:
The result in extended fixed point format
real function, public efp_to_real(EFP1 EFP1)
Return the real number that an extended-fixed-point number corresponds with.
Parameters:
efp1 |
The extended fixed point number being converted |
real function, public efp_real_diff(EFP1 EFP1, EFP2 EFP2)
Take the difference between two extended-fixed-point numbers (EFP1 - EFP2) and return the result as a real number.
Parameters:
efp1 |
The first extended fixed point number |
efp2 |
The extended fixed point number being subtracted from the first extended fixed point number |
Returns:
The real result
type(efp_type) function, public real_to_efp(val val, overflow overflow)
Return the extended-fixed-point number that a real number corresponds with.
Parameters:
val |
The real number being converted |
overflow |
Returns true if the conversion is being done on a value that is too large to be represented |
subroutine, public efp_list_sum_across_pes(EFPs EFPs, nval nval, errors errors)
This subroutine does a sum across PEs of a list of EFP variables, returning the sums in place, with all overflows carried.
Parameters:
efps |
The list of extended fixed point numbers |
nval |
The number of values being summed. |
errors |
A list of error flags for each sum |
subroutine, public mom_infra_end()
This subroutine carries out all of the calls required to close out the infrastructure cleanly. This should only be called in ocean-only runs, as the coupler takes care of this in coupled runs.