/************************************************************** SUBROUTINE SETSTANDEPSFROMFILE SETSTANDEPS SETS THE DEPTH WHICH CORRESPONDS TO THE STANDARD LEVEL NUMBERS AS GIVEN IN DESIGNATED FILE *******************************************************************/ setstandepsfromfile_( int *ndeps, /* NUMBER OF DEPTHS */ float *standeps /* STANDARD DEPTH LEVELS */ ) { FILE *fpcheck, *fpdepth; int in_num; float xdum1,xdum2; char filename[80], fileextend[5]; *ndeps = 0; /* GET INFORMATION ON WHICH SET OF STANDARD DEPTHS */ if ( (fpcheck = fopen("whichdepthset.inf\0","r")) ==NULL ) { sprintf(filename,"%ssys.inf/whichdepthset.inf\0",MAINBRANCH); if ( (fpcheck = fopen(filename,"r")) ==NULL ) { printf(" unable to open %s\n",filename); return; } } fscanf(fpcheck,"%s",fileextend); in_num= fclose(fpcheck); sprintf(filename,"%ssys.inf/standard_depths_%s.dat\0",MAINBRANCH,fileextend); if ( (fpdepth = fopen(filename,"r")) ==NULL ) printf(" unable to open %s\n",filename); else { while ( !feof(fpdepth) ) { fscanf(fpdepth,"%d %f %f %f\n",&in_num,(standeps+ *ndeps),&xdum1,&xdum2); *ndeps +=1; } } in_num= fclose(fpdepth); }