height-radius plot
Mary Jo Nath
Mary-Jo.Nath at NOAA.GOV
Wed Feb 7 10:13:13 EST 2007
Jeffrey,
Assuming that R is not a function of Z, instead of writing R and Z to
the file as data, put them into the CTL file as the dimension levels,
something like this:
DSET 0.3sf_grads.dat
byteswapped
TITLE Sample
UNDEF -9999
XDEF 30 levels 0 (add other radius values here) 155
YDEF 1 linear 1 1
ZDEF 32 levels 39 (add other heights here) 18000
TDEF 4 linear 12:00Z15SEP1999 180MN
vars 1
t_az 32 99 TEMP AZ. AVG.
endvars
(NOTE: If X is equally spaced, then you can use
XDEF 30 LINEAR startingX incrementX
Same with the ZDEF.)
Write only the t_az data to the file.
When you plot, "set z 1 32", set your time, and display.
-MJ
JEFFREY S GALL wrote:
> I was hoping someone could help me with this problem that I have been
> stuck on for a while.
> I want to make a height-radius contour plot of temperature at 1 given
> time, i.e. have
> radius from 0 to 150km on the x-axis and height z=39m to 18000m on the
> y-axis.
>
> I open the file using:
>
> OPEN(541,FILE='0.3sf_grads.dat',FORM='UNFORMATTED',
> & ACCESS='DIRECT',RECL=KX*IX*4)
>
> where IX=32 and KX=30, that is 32 points in the x-dir and 30 points in
> the y-dir.
>
> I then write the radius, height and temperature to the file:
>
> IREC=1
> WRITE(541,REC=IREC) ((R(K,I),K=1,KX),I=1,IR)
> IREC=IREC+1
> WRITE(541,REC=IREC) ((Z(K,I),K=1,KX),I=1,IR)
> IREC=IREC+1
> WRITE(541,REC=IREC) ((T(K,I),K=1,KX),I=1,IR)
> IREC=IREC+1
>
> It should be noted that R(K,1)=0.0 and R(K,IR)=155.0km. Also,
> Z(1,I)=39.0m and
> Z(KX,I)=18000m.
>
> Now, I want to create the corresponding .ctl file (0.3sf_grads.ctl)
> such that temperature
> is contoured on the r-z place. I have checked my tempearture, radius,
> and height values
> and I know they are correct. I would like the distance (radius) in km
> to be plotted on
> the x-axis and height in m on the y-axis.
>
> Any help in fixing this problem would be most appreciated, as I havent
> been able to find
> a solution to the problem. Thanks.
>
> Jeff
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20070207/b414deeb/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Mary-Jo.Nath.vcf
Type: text/x-vcard
Size: 217 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20070207/b414deeb/attachment.vcf
More information about the gradsusr
mailing list