RE: [ncl-talk] ascii data

From: Martin Montero <mmontero_at_nyahnyahspammersnyahnyah>
Date: Mon, 21 Nov 2005 09:22:19 -0600

Hi Varejao,

I had a problem very similar on my machine, and I solved it with something
like this:

Add:

matrix = transpose(matrix)

after reading your file. Good luck,
Martin.

**********************************
Martín J. Montero Martínez
Hidrometerorología, IMTA
Paseo Cuauhnáhuac 8532, Col. Progreso
Jiutepec, Mor. 62550
Tel: +52 777 3293600 x 824
Fax: +52 777 3293683

-----Mensaje original-----
De: ncl-talk-bounces_at_ucar.edu [mailto:ncl-talk-bounces_at_ucar.edu] En nombre
de Varejão Júnior
Enviado el: Domingo, 20 de Noviembre de 2005 09:03 p.m.
Para: ncl-talk_at_ucar.edu
Asunto: [ncl-talk] ascii data

Hi,

I've just intalled the NCL for x86_64 and I have a problem reading and
writing ascii data.
I just read a file (asciiread) and then write the data in a new file.
So, the new data are not equal to the data on the original file.

I read this:

... ... ...
-9999.000 -9999.000 -9999.000 -9999.000 -9999.000 -9999.000
-9999.000 -9999.000 -9999.000 -9999.000 -9999.000 -9999.000
-9999.000 -9999.000 -9999.000 -9999.000 -9999.000 -9999.000
-9999.000 -9999.000 -9999.000 -9999.000 -9999.000 -9999.000
-9999.000 -9999.000 -9999.000 -9999.000 -9999.000 -9999.000
-9999.000 -9999.000 -9999.000 -9999.000 -9999.000 -9999.000
-9999.000 -9999.000 -9999.000 -9999.000 -9999.000 -9999.000
-9999.000 -9999.000 -9999.000 -9999.000 -9999.000 -9999.000
-9999.000 -9999.000 -9999.000 -9999.000 -9999.000 -9999.000
... ... ...

and after write the data in a new file:

... ... ...
-999.000 9.000 -9999.000 -9999.000 -9999.000 -9999.000 -9999.000
-9999.000 -999.000 9.000 -9999.000 -9999.000 -9999.000 -9999.000
-9999.000 -9999.000 -999.000 9.000 -9999.000 -9999.000 -9999.000
-9999.000 -9999.000 -9999.000 -999.000 9.000 -9999.000 -9999.000
-9999.000 -9999.000 -9999.000 -9999.000 -999.000 9.000 -9999.000
... ... ...

Some -9999 data are broken in two data: a -999 and a 9.
The script that I used are:

begin

matrix = asciiread("file_name.asc", (/360, 720/), "float")

opt = True
opt_at_fout = "new_file.asc"

write_matrix (matrix, "720f10.3", opt)

                
end

Help, please!

Thanks,

Varejão

--
######################################
Claudeci Gomes Varejão Júnior
Computer Science
Federal University of Viçosa
Viçosa    Minas Gerais    Brasil
http://www.dpi.ufv.br
http://madeira.dea.ufv.br
######################################
       "Cuidado com o stress....é melhor chegar atrasado nesta vida,
do que adiantado na outra!"
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Nov 21 2005 - 08:22:19 MST

This archive was generated by hypermail 2.2.0 : Mon Nov 21 2005 - 10:28:39 MST