34 MODULE fms_diag_elem_weight_procs_mod
62 ELEMENTAL REAL(r4_kind) FUNCTION addwf_r4(buff, field, weight, pow_value )
63 REAL(r4_kind),
INTENT(in) :: buff
64 REAL(r4_kind),
INTENT(IN) :: field
65 REAL(r4_kind),
INTENT(IN) :: weight
66 INTEGER,
INTENT(IN) :: pow_value
68 SELECT CASE(pow_value)
72 addwf_r4 = buff + (weight * field) * (weight * field)
74 addwf_r4 = buff + (weight * field) ** pow_value
81 ELEMENTAL REAL(r8_kind) FUNCTION addwf_r8(buff, field, weight, pow_value )
82 REAL(r8_kind),
INTENT(in) :: buff
83 REAL(r8_kind) ,
INTENT(IN) :: field
84 REAL(r8_kind),
INTENT(IN) :: weight
85 INTEGER,
INTENT(IN) :: pow_value
87 SELECT CASE(pow_value)
91 addwf_r8 = buff + (weight * field) * (weight * field)
93 addwf_r8 = buff + (weight * field) ** pow_value
100 ELEMENTAL INTEGER(i4_kind) FUNCTION addwf_i4(buff, field, weight, pow_value )
101 INTEGER(i4_kind),
INTENT(in) :: buff
102 INTEGER(i4_kind),
INTENT(IN) :: field
103 INTEGER,
INTENT(IN) :: weight
104 INTEGER,
INTENT(IN) :: pow_value
105 SELECT CASE(pow_value)
109 addwf_i4 = buff + (weight * field) * (weight * field)
111 addwf_i4 = buff + (weight * field) ** pow_value
118 ELEMENTAL INTEGER(i8_kind) FUNCTION addwf_i8(buff, field, weight, pow_value )
119 INTEGER(i8_kind),
INTENT(in) :: buff
120 INTEGER(i8_kind) ,
INTENT(IN) :: field
121 INTEGER,
INTENT(IN) :: weight
122 INTEGER,
INTENT(IN) :: pow_value
124 SELECT CASE(pow_value)
128 addwf_i8 = buff + (weight * field) * (weight * field)
130 addwf_i8 = buff + (weight * field) ** pow_value
133 END MODULE fms_diag_elem_weight_procs_mod
elemental integer(i8_kind) function addwf_i8(buff, field, weight, pow_value)
Calculates and returns the value given by this formula: returned_value = buff + (weight * field)**pow...
elemental real(r4_kind) function addwf_r4(buff, field, weight, pow_value)
Calculates and returns the value given by this formula: returned_value = buff + (weight * field)**pow...
elemental real(r8_kind) function addwf_r8(buff, field, weight, pow_value)
Calculates and returns the value given by this formula: returned_value = buff + (weight * field)**pow...
elemental integer(i4_kind) function addwf_i4(buff, field, weight, pow_value)
Calculates and returns the value given by this formula: returned_value = buff + (weight * field)**pow...
Interface for the elemental function addwf, which Calculates and returns the value given by this form...