Skip to content
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

Removed functionality from MPAS framework that overwrites attributes #4987

Merged
merged 1 commit into from
Jun 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 19 additions & 16 deletions components/mpas-framework/src/framework/mpas_io_streams.F
Original file line number Diff line number Diff line change
Expand Up @@ -4337,22 +4337,25 @@ subroutine put_get_field_atts(handle, ioDirection, fieldname, attList)
end select
att_cursor => att_cursor % next
end do
else
do while (associated(att_cursor))
select case (att_cursor % attType)
case (MPAS_ATT_INT)
call MPAS_io_get_att(handle, trim(att_cursor % attName), att_cursor % attValueInt, fieldname)
case (MPAS_ATT_INTA)
call MPAS_io_get_att(handle, trim(att_cursor % attName), att_cursor % attValueIntA, fieldname)
case (MPAS_ATT_REAL)
call MPAS_io_get_att(handle, trim(att_cursor % attName), att_cursor % attValueReal, fieldname)
case (MPAS_ATT_REALA)
call MPAS_io_get_att(handle, trim(att_cursor % attName), att_cursor % attValueRealA, fieldname)
case (MPAS_ATT_TEXT)
call MPAS_io_get_att(handle, trim(att_cursor % attName), att_cursor % attValueText, fieldname)
end select
att_cursor => att_cursor % next
end do
! For MPAS_IO_READ the commented out code would overwrite any attributes, such as "units", defined in the
! Registry with values defined in the input file. This default behaviour was undesired for CF-compliant
! units defined in the Registry so this functionality was removed.
!else
! do while (associated(att_cursor))
! select case (att_cursor % attType)
! case (MPAS_ATT_INT)
! call MPAS_io_get_att(handle, trim(att_cursor % attName), att_cursor % attValueInt, fieldname)
! case (MPAS_ATT_INTA)
! call MPAS_io_get_att(handle, trim(att_cursor % attName), att_cursor % attValueIntA, fieldname)
! case (MPAS_ATT_REAL)
! call MPAS_io_get_att(handle, trim(att_cursor % attName), att_cursor % attValueReal, fieldname)
! case (MPAS_ATT_REALA)
! call MPAS_io_get_att(handle, trim(att_cursor % attName), att_cursor % attValueRealA, fieldname)
! case (MPAS_ATT_TEXT)
! call MPAS_io_get_att(handle, trim(att_cursor % attName), att_cursor % attValueText, fieldname)
! end select
! att_cursor => att_cursor % next
! end do
end if

end subroutine put_get_field_atts
Expand Down