109 char msgbuf[PGSd_PC_FILE_PATH_MAX];
110 char filefunc[] = __FILE__
", main";
113 __TIME__
" using makefile " MAKEFILE_REVISION , filefunc);
116 IMSL_SET_PRINT, IMSL_WARNING, 0,
117 IMSL_SET_PRINT, IMSL_FATAL, 0,
118 IMSL_SET_PRINT, IMSL_TERMINAL, 0,
119 IMSL_SET_STOP, IMSL_FATAL, 0,
120 IMSL_SET_STOP, IMSL_TERMINAL, 0,
124 printf(
"MODIS GEO version %s, built %s %s\n",
129 modsmf(
MODIS_E_GEO,
"GEO_read_param_file()", filefunc);
135 PGSt_integer land_sea_layer=PGSd_DEM_WATER_LAND;
136 PGSt_integer numFiles;
141 modsmf(
MODIS_E_GEO,
"PGS_DEM_Open() for land-sea mask", filefunc);
146 sprintf(msgbuf,
"PGS_PC_GetConfigData(%ld)",
155 modsmf(
MODIS_E_GEO,
"GEO_initialize_DEM()", filefunc);
159 else if (PGS_PC_GetNumberOfFiles(
l1aID, &numFiles)!=PGS_S_SUCCESS)
161 sprintf(msgbuf,
"PGS_PC_GetNumberOfFiles(%ld)", (
long)
l1aID);
172 PGSt_integer copy_vers =
version;
174 char l1a_file_name[PGSd_PC_FILE_PATH_MAX];
177 if (PGS_PC_GetReference(
l1aID, ©_vers, l1a_file_name)
180 sprintf(msgbuf,
"PGS_PC_GetReference(%ld,%ld)",(
long)
l1aID,
188 char geo_file_name[PGSd_PC_FILE_PATH_MAX];
194 if (PGS_PC_GetReference(
geoID, ©_vers, geo_file_name)
197 sprintf(msgbuf,
"PGS_PC_GetReference(%ld,%ld)",
205 &geo_params,
version) != PGS_S_SUCCESS)
207 sprintf(msgbuf,
"GEO_locate_one_granule(%s,%s)",
208 l1a_file_name, geo_file_name);
224 modsmf(
MODIS_E_GEO,
"PGS_DEM_Close(land_sea_layer)", filefunc);
228 sprintf(msgbuf,
" = %d", returnStatus);