diff --git a/CHANGELOG.md b/CHANGELOG.md index 21512b2194c4..21333b8d2371 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed bug in FieldSet routines when passing R8 ESMF fields + ### Removed ### Deprecated diff --git a/field_utils/FieldUtilities.F90 b/field_utils/FieldUtilities.F90 index 130d09222f8e..e4f8e2930049 100644 --- a/field_utils/FieldUtilities.F90 +++ b/field_utils/FieldUtilities.F90 @@ -64,7 +64,7 @@ subroutine FieldSet_r8(field,constant_val,rc) if (type_kind == ESMF_TYPEKIND_R4) then call assign_fptr(field,f_ptr_r4,_RC) f_ptr_r4 = constant_val - else if (type_kind == ESMF_TYPEKIND_R4) then + else if (type_kind == ESMF_TYPEKIND_R8) then call assign_fptr(field,f_ptr_r8,_RC) f_ptr_r8 = constant_val else @@ -87,7 +87,7 @@ subroutine FieldSet_r4(field,constant_val,rc) if (type_kind == ESMF_TYPEKIND_R4) then call assign_fptr(field,f_ptr_r4,_RC) f_ptr_r4 = constant_val - else if (type_kind == ESMF_TYPEKIND_R4) then + else if (type_kind == ESMF_TYPEKIND_R8) then call assign_fptr(field,f_ptr_r8,_RC) f_ptr_r8 = constant_val else