wgrib2api: grb2_free_file(..)
Introduction
When files are opened using wgrib2api, they are normally not closed until
the program ends. This
saves time in closing and then reopening files. For most programs using
wgrib2api, there is no need to close files opened using wgrib2api.
However, there are two cases. First, you use wgrib2api to write a file, and you
then want to use the file before the program that created the file ends.
Wgrib2api may buffer some of the writes in an output buffer until the program
ends or until the file is closed. For this case, you have to free the file.
Second, there are exceptional programs which open huge numbers of files.
Since we all write exceptional programs, some more frequently than others,
there is a function to close
usused files that are opened by wgrib2api. This function does not affect
the files opened by the normal fortran "open" routine.
Usage
i = grb2_free_file(FILE)
i = 0 ok
/= 0 failure
FILE: character (len=*) file to close
|