awips2/nativeLib/rary.ohd.pproc.gribit/TEXT/gbfclos.c
root 8e80217e59 Initial revision of AWIPS2 11.9.0-7p5
Former-commit-id: a02aeb236c [formerly 9f19e3f712] [formerly 06a8b51d6d [formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]]
Former-commit-id: 06a8b51d6d
Former-commit-id: 3360eb6c5f
2012-01-06 08:55:05 -06:00

51 lines
1 KiB
C

#include <stdio.h>
#include "create_fortran_link.h"
/*
#include "geminc.h"
#include "gemprm.h"
*/
#ifdef UNDERSCORE
#define gbf_clos gbf_clos_
#endif
extern FILE *fptr;
create_fortran_link( void, gbf_clos, (int* iret), (iret))
/************************************************************************
* gbf_clos *
* *
* This function closes the output GRIB file. *
* *
* gbf_clos ( iret ) *
* *
* Input parameters: *
* None. *
* *
* Output parameters: *
* *iret int Return code *
* -6 = No file has been opened *
** *
* G. Krueger/EAI 3/96 *
* K. Brill 8/99 Adapted from cvl_clos; make *fptr ext. *
***********************************************************************/
{
int ier;
/*---------------------------------------------------------------------*/
*iret = 0;
if ( fptr == NULL ) {
*iret = -6;
return;
}
/*
* Close the file and check the status.
*/
ier = fclose (fptr);
if ( ier != 0 ) printf ( "Error closing GRIB file.\n" );
}