geodynamics / Rayleigh

Rayleigh: Pseudo-spectral MHD
GNU General Public License v3.0
59 stars 48 forks source link

Removal of Write(6,*) #575

Closed feathern closed 3 weeks ago

feathern commented 3 weeks ago

This PR removes all calls to write(6,*) in the code that can be encountered during the course of a normal simulation. Instead, stdout%print is used, which is redirected to a log file, if desired. This change prevents a situation where some error message could be written out to standard out, whereas others would appear in the log file. Note that several references to write(6,*) have been retained. These are not encountered during normal usage of the code and can still be helpful for debugging. In addition, many references to write(6,*) which were commented out or unnecessary have been removed. This PR fixes issue #325 .

feathern commented 3 weeks ago

Great -- thanks for reviewing. I meant to note that using stdout%print in Input.F90 wasn't really possible (at least not in an easy way) since it can't be initialized until main_input is read. Until that file is read, we don't know if the user specified an output file or what its name was. That's why I left write(6,*) in Input.F90. Just wanted to make a note of that. Merging now...