Skip to content

Commit

Permalink
Merge pull request #1069 from GEOS-ESM/hotfix/atrayano/#1064_incorrec…
Browse files Browse the repository at this point in the history
…t_file_timestamp

Fixes #1064. This bug has been in MAPL for a long time (classical "fe…
  • Loading branch information
tclune authored Oct 12, 2021
2 parents ee03b6e + 606b714 commit ac39ab5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

### Fixed

- Fixes #1064. This is bug has been in MAPL for a long time. It shows only when the user specifies a non-default duration, and the last step of the duration interval is written to a new, separate file
## [2.8.6] - 2021-09-13

### Added
Expand Down
14 changes: 7 additions & 7 deletions gridcomps/History/MAPL_HistoryGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3460,13 +3460,6 @@ subroutine Run ( gc, import, export, clock, rc )
_VERIFY(STATUS)
endif

if( NewSeg .and. list(n)%unit /= 0 .and. list(n)%duration /= 0 ) then
if (list(n)%unit > 0 ) then
call FREE_FILE( list(n)%unit )
end if
list(n)%unit = 0
endif

end do

if(any(Writing)) call WRITE_PARALLEL("")
Expand Down Expand Up @@ -3647,6 +3640,13 @@ subroutine Run ( gc, import, export, clock, rc )

endif OUTTIME

if( NewSeg .and. list(n)%unit /= 0 .and. list(n)%duration /= 0 ) then
if (list(n)%unit > 0 ) then
call FREE_FILE( list(n)%unit )
end if
list(n)%unit = 0
endif

enddo POSTLOOP

if (any(writing)) then
Expand Down

0 comments on commit ac39ab5

Please sign in to comment.