Former-commit-id:a8d90da9c0
[formerly4f86b07eb0
] [formerlya8d90da9c0
[formerly4f86b07eb0
] [formerly42189b5f88
[formerly 0c4514d3be8e7dee89a2abe903b51155a2895fd4]]] Former-commit-id:42189b5f88
Former-commit-id:f1256f2a9e
[formerlyb7f1dbe72b
] Former-commit-id:775a338b90
48 lines
1.7 KiB
C
48 lines
1.7 KiB
C
#include "geminc.h"
|
|
#include "gemprm.h"
|
|
|
|
void gdc_gtmf ( char *gdfile, char *cycle, char *availableTimes, int *iret )
|
|
/************************************************************************
|
|
C* Input parameters: *
|
|
C* GDFILE CHAR* Grid file name *
|
|
C* CYCLE CHAR* Cycle(Gempak format) *
|
|
C* Output parameters: *
|
|
C* AVAILABLETIMES CHAR* List of GEMPAK times *
|
|
C* IRET INTEGER Return code *
|
|
C* 0 = normal return *
|
|
************************************************************************/
|
|
{
|
|
int ngdftm,ier=0;
|
|
int maxt = 500;
|
|
char gdatim[4]="";
|
|
char mtime_list[500][20];
|
|
/*----------------------------------------------------------------------*/
|
|
*iret = 0;
|
|
|
|
gd_gtmf (gdfile, gdatim, cycle, &maxt, &ngdftm, mtime_list,
|
|
&ier,strlen (gdfile), strlen (gdatim), strlen (cycle),
|
|
20 /* mtime_list size */ );
|
|
if ( ier == 0 && ngdftm > 0 ) {
|
|
int jj;
|
|
for ( jj = 0; jj < ngdftm; jj ++ ) {
|
|
int lens;
|
|
mtime_list[jj][19] = '\0';
|
|
lens = strcspn (mtime_list[jj], "\t \0");
|
|
mtime_list[jj][lens] = '\0';
|
|
|
|
if ( jj == 0 ) {
|
|
strcpy ( availableTimes, mtime_list[jj]);
|
|
}
|
|
else {
|
|
strcat ( availableTimes, mtime_list[jj]);
|
|
}
|
|
if ( jj < ngdftm - 1 ) {
|
|
strcat ( availableTimes,"|" );
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
*iret = ier;
|
|
}
|
|
return;
|
|
}
|