OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
close_processing_run.c
Go to the documentation of this file.
1 #include "L1A_prototype.h"
2 #include "PGS_SMF.h"
3 #include "PGS_IO_L0.h"
4 #include "PGS_MODIS_35005.h"
5 
6 void close_processing_run (PGSt_IO_L0_VirtualDataSet L0_file)
7 
8 /*
9 !C***************************************************************************
10 
11 !Description: Function close_processing_run handles the wrap-up processing
12  for each run of the MODIS Level 1A software.
13 
14 !Input Parameters:
15  L0_file ** L0 file descriptor **
16 
17 !Output Parameters:
18  None
19 
20 Return Values:
21  None
22 
23 Externally Defined:
24  PGSt_SMF_status (PGS_SMF.h)
25  PGSt_IO_L0_VirtualDataSet (PGS_IO_L0.h)
26 
27 Called By:
28  level1a
29 
30 Routines Called:
31  PGS_SMF_TestSuccessLevel (PGS_SMF.h)
32  PGS_IO_L0_Close (PGS_IO_L0_Wrap.h)
33  log_fmt_msg
34 
35 !Revision History:
36  revision 2.0 1997/09/22 14:30:00
37  Tom Johnson/GSC (johnson@ltpmail.gsfc.nasa.gov)
38  Original code
39 
40  revision 1.0 1997/08/05 17:30:00
41  Qi Huang/RDC (qhuang@ltpmail.gsfc.nasa.gov)
42  Original design
43 
44 !Team-unique Header:
45  This software is developed by the MODIS Science Data Support
46  Team (SDST) for the National Aeronautics and Space
47  Administration (NASA), Goddard Space Flight Center (GSFC),
48  under contract NAS5-32373.
49 
50 !References and Credits:
51 
52 !Design Notes:
53 
54 
55 !END***************************************************************************
56 */
57 
58 {
59  /***************************************************************************/
60  /* Declare and Initialize Local Variables */
61  /***************************************************************************/
62 
63  extern PGSt_PC_Logical global_L0_logical;
64  PGSt_SMF_status PGS_status; /* SMF-style message returned by function */
65  char *routine = "close_processing_run";
66  char msg[300];
67 
68  /***************************************************************************/
69 
70 
71  /***************************************************************************/
72  /* */
73  /* set routine to "close_processing_run" (done during declaration) */
74  /* */
75  /* */
76  /* CALL PGS_IO_L0_Close to close the L0 file */
77  /* INPUT: L0_file */
78  /* OUTPUT: None */
79  /* RETURN: PGS_status */
80  /* */
81  /* CALL PGS_SMF_TestSuccessLevel to determine if the closing file was */
82  /* successful */
83  /* INPUT: PGS_status */
84  /* OUPUT: None */
85  /* RETURN: TestStatus */
86  /* */
87  /* IF TestStatus is not equal to PGS_TRUE */
88  /* THEN */
89  /* Set msg to "function close_processing_run was unable to close the */
90  /* L0 file successfully" */
91  /* CALL log_fmt_msg to report that the closing L0 file was not */
92  /* successful */
93  /* INPUT: PGS_status, routine, msg */
94  /* OUTPUT: None */
95  /* RETURN: None */
96  /* ENDIF */
97  /* */
98  /***************************************************************************/
99 
100  PGS_status = PGS_IO_L0_Close(L0_file);
101  if (!PGS_SMF_TestSuccessLevel(PGS_status))
102  {
103  sprintf (msg, "Unable to close the L0 file successfully LUN: %d",
106  }
107 }
108 
PGSt_PC_Logical global_L0_logical
Definition: level1a.c:35
void close_processing_run(PGSt_IO_L0_VirtualDataSet L0_file)
void log_fmt_msg(PGSt_SMF_status code, const char *routine, const char *msg_fmt,...)
Definition: log_fmt_msg.c:6
string msg
Definition: mapgen.py:227
#define MODIS_E_PGS_IO_LO_CLOSE