outseis_glob.c 1.82 KB
Newer Older
Tilman Steinweg's avatar
Tilman Steinweg committed
1 2 3 4
/*------------------------------------------------------------------------
 * Copyright (C) 2011 For the list of authors, see file AUTHORS.
 *
 * This file is part of SOFI3D.
5
 *
Tilman Steinweg's avatar
Tilman Steinweg committed
6 7 8
 * SOFI3D is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 2.0 of the License only.
9
 *
Tilman Steinweg's avatar
Tilman Steinweg committed
10 11 12 13
 * SOFI3D is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
14
 *
Tilman Steinweg's avatar
Tilman Steinweg committed
15
 * You should have received a copy of the GNU General Public License
16 17 18
 * along with SOFI3D. See file COPYING and/or
 * <http://www.gnu.org/licenses/gpl-2.0.html>.
 --------------------------------------------------------------------------*/
Tilman Steinweg's avatar
Tilman Steinweg committed
19 20 21 22 23 24 25 26 27 28 29 30
/*------------------------------------------------------------------------
 *   Write seismograms merged from each PE collectively to disk
 *
 *  ----------------------------------------------------------------------*/

#include "fd.h"
#include "segy.h"

/* ****************************  UNDER CONSTRUCTION !!!  ***************************** */


void  outseis_glob(FILE *fp, FILE *fpdata, float **section,
31 32 33 34
                   int **recpos, int **recpos_loc, int ntr, float ** srcpos,
                   int nsrc, int ns, int seis_form[6], int ishot, int comp){
    
    /* declaration of extern variables */
35

36 37
    
    /* declaration of local variables */
38
    int i,j;
39 40
    //float x;
    float temp_float;
41

42 43 44 45 46 47 48 49 50 51 52 53 54
    
    
    
    for(i=1;i<=ntr;i++){ /* Loop over global receivers */
        for(j=1;j<=ns;j++){ /* Loop over time samples */
            temp_float=section[i][j];
            fwrite(&temp_float,sizeof(float),1,fpdata);
        }
    }
    fclose(fpdata);
    
    
    fclose(fpdata);
Tilman Steinweg's avatar
Tilman Steinweg committed
55
}