[cig-commits] [commit] : for clarity in last_basin : modified required structure of the DATA/STATIONS_ADJOINT file for adjoint simulations, the first line doesn't have to contain the number of stations any more (98b20ee)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Thu Nov 14 20:16:04 PST 2013
Repository : ssh://geoshell/specfem3d
On branch :
Link : https://github.com/geodynamics/specfem2d/compare/1e201257d91c794056b990a43329e05d04f77454...0000000000000000000000000000000000000000
>---------------------------------------------------------------
commit 98b20ee8ebfc73c7a58227670d0e0ea350ed672f
Author: Pieyre Le Loher <pieyre.le-loher at inria.fr>
Date: Thu Jun 4 12:54:14 2009 +0000
for clarity in last_basin : modified required structure of the DATA/STATIONS_ADJOINT file for adjoint simulations, the first line doesn't have to contain the number of stations any more
>---------------------------------------------------------------
98b20ee8ebfc73c7a58227670d0e0ea350ed672f
locate_receivers.f90 | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/locate_receivers.f90 b/locate_receivers.f90
index 4905a54..0dcaa15 100644
--- a/locate_receivers.f90
+++ b/locate_receivers.f90
@@ -592,12 +592,22 @@
double precision stlat,stlon,stele,stbur
character(len=MAX_LENGTH_STATION_NAME) station_name
character(len=MAX_LENGTH_NETWORK_NAME) network_name
+ character(len=150) dummystring
+ nrec = 0
nrec_filtered = 0
open(unit=IIN, file=trim(filename), status = 'old', iostat = ios)
if (ios /= 0) call exit_mpi(myrank, 'No file '//trim(filename)//', exit')
- read(IIN, *) nrec
+ !read(IIN, *) nrec
+ do while(ios == 0)
+ read(IIN,"(a)",iostat = ios) dummystring
+ if(ios == 0) nrec = nrec + 1
+ enddo
+ close(IIN)
+
+
+ open(unit=IIN, file=trim(filename), status = 'old', iostat = ios)
do irec = 1, nrec
read(IIN, *) station_name, network_name, stlat, stlon, stele, stbur
if(stlat >= LATITUDE_MIN .and. stlat <= LATITUDE_MAX .and. stlon >= LONGITUDE_MIN .and. stlon <= LONGITUDE_MAX) &
@@ -608,8 +618,8 @@
if (myrank == 0) then
open(unit=IIN,file=trim(filename),status='old',action='read')
open(unit=IOUT,file=trim(filtered_filename),status='unknown')
- read(IIN,*) nrec
- write(IOUT,*) nrec_filtered
+ !read(IIN,*) nrec
+ !write(IOUT,*) nrec_filtered
do irec = 1,nrec
read(IIN,*) station_name,network_name,stlat,stlon,stele,stbur
if(stlat >= LATITUDE_MIN .and. stlat <= LATITUDE_MAX .and. stlon >= LONGITUDE_MIN .and. stlon <= LONGITUDE_MAX) &
More information about the CIG-COMMITS
mailing list