The CLOSE statement is used to close an opened file.
close (file_variable) wherefile_variable
is the variable of the opened file.This statement closes an already opened file for the duration of the simulation run. It is primarily used to compensate for system limitations pertaining to the number of files open simultaneously.