Skip to content

Commit

Permalink
Updated ModelVerticalGrid::write_formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
pchakraborty committed Nov 25, 2024
1 parent db8cd4d commit 7a3ff63
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions generic3g/vertical/ModelVerticalGrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,18 @@ subroutine write_formatted(this, unit, iotype, v_list, iostat, iomsg)
integer, intent(out) :: iostat
character(*), intent(inout) :: iomsg

write(unit, "(a, a, g0, a)", iostat=iostat, iomsg=iomsg) &
"ModelVerticalGrid(", &
"num levels: ", this%num_levels, &
")"
write(unit, "(a)", iostat=iostat, iomsg=iomsg) "ModelVerticalGrid("
if (allocated(this%standard_name)) then
write(unit, "(a, 3x, a, a)", iostat=iostat, iomsg=iomsg) new_line("a"), "standard name: ", this%standard_name
end if
write(unit, "(a, 3x, a, g0)", iostat=iostat, iomsg=iomsg) new_line("a"), "num_levels: ", this%num_levels
if (allocated(this%short_name_edge)) then
write(unit, "(a, 3x, a, a)", iostat=iostat, iomsg=iomsg) new_line("a"), "field (edge): ", this%short_name_edge
end if
if (allocated(this%short_name_center)) then
write(unit, "(a, 3x, a, a)", iostat=iostat, iomsg=iomsg) new_line("a"), "field (center): ", this%short_name_center
end if
write(unit, "(a)") ")"

_UNUSED_DUMMY(iotype)
_UNUSED_DUMMY(v_list)
Expand Down

0 comments on commit 7a3ff63

Please sign in to comment.