Compilation problem with gfortran


 
Thread Tools Search this Thread
Top Forums Programming Compilation problem with gfortran
# 15  
Old 08-03-2011
My SRTM data sample has the following description:

ncols 6001
nrows 6001
xllcorner -10.000416206603
yllcorner 34.999583430181
cellsize 0.00083333333333333
NODATA_value -9999

Is this useful informations?
# 16  
Old 08-03-2011
Hi.

We use the finger to help see the moon, but we should not mix up the finger and the moon.

Is the description of the data the same as the data? ... cheers, drl
# 17  
Old 08-03-2011
Yes this is the description of the data that I want to convert using the fortran program.
# 18  
Old 08-03-2011
Hi.

Please post the output from:
Code:
head -10 rd_wr_formatted.exe srtm_35_05.asc | cut -c1-78

cheers, drl
# 19  
Old 08-03-2011
here is the output:

Code:
==> rd_wr_formatted.exe <==
ELFP�4�!4(44�4�

   
         ! 
$�
  (�
0�4�8�<�@�D�H�
�D$`��������$������$�������������Dž �����Dž$���
������$����������~��������$�S���������������������
�$���������������Dž�����~B�Di���q�������8����D$�$��
��\����$�    ���������D$
                            �D�������D$�������$���������������y
                                                                   �$
[^_]���������U��WVS��l�u
                          �]�E �������U$�������M(�������E,�������U0���
����9�u���U�e3t�������l[^_]�����������U��WVS��|��������U
�
  ���$��

==> srtm_35_05.asc <==
ncols         6001
nrows         6001
xllcorner     -10.000416206603
yllcorner     34.999583430181
cellsize      0.00083333333333333
NODATA_value  -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999

# 20  
Old 08-03-2011
Hi.

Your data file srtm_35_05.asc looks like this:
Code:
ncols         6001
nrows         6001
xllcorner     -10.000416206603
yllcorner     34.999583430181
cellsize      0.00083333333333333
NODATA_value  -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999

and your program is attempting to read this data with this code:
Code:
    do j=1,ny
       read(10,33) (rarray(i,j),i=1,nx)
       write(*,*) i,j,rarray(nx,j)
    end do
 33    format(f6.1, 12000f7.1)

So the first real data line is line 7. The read will fail on the first 6 lines because the format is not correct -- the first items on those lines are not numeric.

Perhaps we should back up here.

How much programming experience do you have?

What is your purpose in trying to analyze this data -- research?, working on a degree?, helping someone? other?

cheers, drl
# 21  
Old 08-03-2011
Ok... I better understand now!

My purpose of trying to analyse this data is for research. Unfortunately I don't have lot of programming experience, that's why I'm maybe asking silly questions...

---------- Post updated at 09:28 AM ---------- Previous update was at 09:02 AM ----------

It worked! I erased the first 6 lines of the data file. And I changed the read(10,33) to read(10,*) and it worked...

Thanks a lot for you help! You kind of save my life!

Cheers,

Greg
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

GFORTRAN library problem: libgFORTRAN.so.1 cannot open....

I've received some executable script for test, but executing this script continuously give me following message ./example: error while loading shared libraries: libgfortran.so.1: cannot open shared object file: No such file or directory Google search told me to do as following $... (1 Reply)
Discussion started by: exsonic
1 Replies

2. Programming

problem compiling with gfortran in two different debian releases

Hello, I hope this is the correct forum for this post. I have the following problem: A Fortran 77 program that has to deal with several large matrices (each approx. 5000 x 5000) and uses lapack and blas subroutines has been correctly compiled and executed using Debian Etch. When I tried... (1 Reply)
Discussion started by: currix
1 Replies

3. Programming

gfortran compiling problem,calling too many arguments

Hello, My problem is with compiling a program modelling shallow water. In it there is a subroutine called stat with 9 parameters. In the main program it is called with 9 parameters also I'm running Ubuntu 11.04 with gfortran version 4.5. Thanks. ---------- Post updated at 11:57 PM... (0 Replies)
Discussion started by: b_franz
0 Replies

4. AIX

Problem in compilation.

Hi, I am executing the below mentioned code:- proc SQLCHECK=SEMANTICS iname=CDBInteractor.pc parse=none code=cpp cpp_suffix=cpp g++ -c main.cpp g++ -o pre_request_engine main.o -I/oracle/oracle/app/product/10g/precomp -L/oracle/oracle/app/product/10g/lib32 -lnsl -ldl And... (2 Replies)
Discussion started by: tushar_tus
2 Replies

5. Programming

C Compilation problem

Dear all I am new to C programming In response to the post cat get_time.c #include <stdlib.h> #include <sys/time.h> main() { struct timeval tv; struct timezone tz; struct tm *tm; gettimeofday(&tv, &tz); tm=localtime(&tv.tv_sec); printf("... (2 Replies)
Discussion started by: on9west
2 Replies

6. AIX

Compilation problem

hi, I first want to apologize for my poor english ! I'm a newbe on Unix system and I have to install NRPE on an AIX 5.3. I have downloaded the NRPE Source code and i need to compile them... the problem is, when I do a: ./configure --enable-command-args --disable-ssl it returns me :... (1 Reply)
Discussion started by: Cyr1us
1 Replies

7. AIX

Pro C Compilation problem

Hi, I have AIX 5.3 and my code is written in proc . i am getting following error during compilation Please help?////..... :-d: Compiling with RMS cc -w -q32 -qidirfirst -ISource/Header -I/usr/vacpp/include -q32 -DRMS -DDISEC -DDBG -DBIGENDIAN -DBIT32 -c -q32... (0 Replies)
Discussion started by: ajaysahoo
0 Replies

8. Programming

Compilation problem on HP-UX

Hi, Environment : HP-UX avalon B.11.11 U 9000/800 3547052374 unlimited-user license aCC version :aCC: HP ANSI C++ B3910B A.03.37 I need to find a way out of this errors.can anyone help me . $ aCC db.cc -I$ORACLE_HOME/rdbms/public -I/disk1/oracle/product/10.2.0.2/* Error (future)... (1 Reply)
Discussion started by: varuntayur
1 Replies

9. Programming

compilation problem

i have a class name 1.c in tht i am using function n wich has his body in 2.c and declaration in 2.h now how can i compile 1.c. ex; 1.c int main() { //some data n(10); //somedata } ***** 2.c int n(int k) { //some data } int main() { some data (2 Replies)
Discussion started by: phani_sree
2 Replies

10. Solaris

compilation problem

I am compiling a software named wine When i run make then at the end following error generated. DVAPI32_ -foversion.res version.rc ld.so.1: ../../tools/wrc/wrc: fatal: relocation error: file ../../tools/wrc/wrc: symbol wine_casemap_upper: referenced symbol not found *** Signal 9 make:... (0 Replies)
Discussion started by: mansoorulhaq
0 Replies
Login or Register to Ask a Question