About the sation data
Isilda Cunha Menezes
isilda at UEVORA.PT
Thu May 10 12:15:22 EDT 2007
Hello, I only used GRADS to plot station data contour, but I made stnmap
-1 and my data were ok, I don't know if the problem is this, but tries.
Best regards
Isilda
-----Mensagem original-----
De: GRADSUSR at LIST.CINECA.IT [mailto:GRADSUSR at LIST.CINECA.IT] Em nome de
Chaoxia Yuan
Enviada: segunda-feira, 7 de Maio de 2007 8:29
Para: GRADSUSR at LIST.CINECA.IT
Assunto: About the sation data
Dear all,
There days, I have trid to create a station data set through fortran but
met some problems. I have
checked the archive and found no similar question. So I pose it here
and hope anybody can give
me any advice. the work I did as following
1, create the binary data set of station
2, create discription file of the station data
3, run the stnmap commad to get .map file
All the above look working well, but when I use grads to plot the
station data that I have created,@
all the data come out to be the same as zero or sometimes plus or minus
zero in all stations even
though all station data were set to 5 in fortran program as below.
integer nx, ny
parameter (nx = 89, ny = 89)
real lon(nx, ny), lat(nx, ny)
real rain(nx, ny)
integer nflag, nlev, rec
character * 8 stid
integer i, j, k, m, n, recl
real tim
open (11, file = 'lon.dat', access = 'direct',
$ recl = nx * ny * 4)
open (22, file = 'lat.dat', access = 'direct',
$ recl = nx * ny * 4)
open (33, file = 'rain.dat', access = 'direct',
$ recl = nx * ny * 4)
read (11, rec = 1 ) lon
read (22, rec = 1 ) lat
read (33, rec = 1 ) rain
close (11)
close (22)
close (33)
open (111, file = 'test.dat', access = 'direct',
$ form = 'unformatted',
$ recl = 8 * 4)
k = 0
nflag = 1
nlev = 1
tim = 0.0
do j = 1, ny
do i = 1, nx
k = k + 1
write (stid, '(i8)') i + (j - 1) * 89
write (111, rec = k) stid, lat(i, j), lon(i, j), tim,
$ nlev, nflag, 5
C$$$ write (111, rec = k) stid, lat(i, j), lon(i, j), tim,
C$$$ $ nlev, nflag, rain (i, j)
enddo
enddo
k = k + 1
nlev = 0
write (111, rec = k) stid, lat (i, j), lon(i, j), tim, nlev,
$ nflag
close (111)
end
the control file test.ctl is
dset test.dat
dtype station
stnmap station.map
undef -999.0
title station data
tdef 1 linear jan1973 1mo
vars 1
v1 0 99 test
endvars
and the command as below was run
stnmap -i test.ctl
(no mistake when running stnmap command)
Thank you very much for any advice
Chaoxia Yuan
Earth and Planetary Scinece
School of Scinece
The University of Tokyo
More information about the gradsusr
mailing list