Closed eclare108213 closed 1 year ago
Recommend adding
! Should not be needed, bug in some MacOS implementations
close(ice_stdout)
close(nu_diag)
do n = 1,nx
close (nu_diag_out+n-1)
enddo
Also, I'm not sure I'd call this a bug. This is a workaround for a system bug outside Icepack :)
Also, I'm not sure I'd call this a bug. This is a workaround for a system bug outside Icepack :)
Yes, but isn't it best practice to close all open files before ending a program, to avoid these kinds of problems? Maybe that's a 30-year-old best practice that's less relevant today, until suddenly it's relevant again...
I'll extend as suggested. Thanks!
I also closed the restart file and the SHEBA forcing file; now running a base_suite to make sure everything compiles, runs and completes. Regression is difficult because the original code doesn't complete on my laptop, but that could be tested on a different machine.
Base_suite now completes - summary results are posted in the PR template above.
There is still a problem with the grid-cell diagnostic files not being completely written before the program ends, so keeping issue https://github.com/CICE-Consortium/Icepack/issues/401 open for now.
[x] Short (1 sentence) summary of your PR: Close the diagnostics file at the end of the program.
[x] Developer(s): @cmbitz @eclare108213
[x] Suggest PR reviewers from list in the column to the right.
[x] Please copy the PR test results link or provide a summary of testing completed below. This change compiles, runs, and completes properly on my laptop. Results from base_suite without regression:
How much do the PR code changes differ from the unmodified code?
Does this PR create or have dependencies on CICE or any other models?
Does this PR add any new test cases?
Is the documentation being updated? ("Documentation" includes information on the wiki or in the .rst files from doc/source/, which are used to create the online technical docs at https://readthedocs.org/projects/cice-consortium-cice/.)
[x] Please provide any additional information or relevant details below:
Addresses #401. Without closing the file, "ICEPACK COMPLETED" was not written/flushed to the diagnostics file in a newer Mac OS and the scripts returned a "not completed" message.