[Thread Prev][Thread Next][Index]

Re: log scale on Z axis



Hi, Ferret does not have a native capability to make 2-dimensional log plots. Here is a message from the archive, that we later made in to an FAQ:

http://ferret.pmel.noaa.gov/Ferret/Mail_Archives/fu_99/msg00230.html

http://www.ferret.noaa.gov/Ferret/FAQ/custom_plots/2D_log_plot.html

Here is a quick example of an X-Z plot, using the Levitus Climatology dataset that is released with Ferret. I don't do the fancy labeling but it would be similar to what is done in the above message. Note that the Z axis of the data has a depth of 0 at K=1, which has no log. I use 0 here, but you could use another value. One might define the axis using 0 but not plot it (shade/k=2:20/y=0 temp...). The axis you define must be monotonic.

yes? use levitus_climatology
yes? shade/y=0 temp ! without the log axis

yes? list z[gz=temp], log(z[gz=temp])

DATA SET: /home/ja9/tmap/fer_dsets/data/levitus_climatology.cdf
DEPTH (m): 0 to 5000
Column 1: Z is Z (axis ZAXLEVITR)
Column 2: EX#2 is LOG(Z[GZ=TEMP])
Z EX#2
0 / 1: 0. ....
10 / 2: 10. 1.000
20 / 3: 20. 1.301
30 / 4: 30. 1.477
50 / 5: 50. 1.699
75 / 6: 75. 1.875
100 / 7: 100. 2.000
150 / 8: 150. 2.176
200 / 9: 200. 2.301
300 / 10: 300. 2.477
400 / 11: 400. 2.602
600 / 12: 600. 2.778
800 / 13: 800. 2.903
1000 / 14: 1000. 3.000
1200 / 15: 1200. 3.079
1500 / 16: 1500. 3.176
2000 / 17: 2000. 3.301
3000 / 18: 3000. 3.477
4000 / 19: 4000. 3.602
5000 / 20: 5000. 3.699

yes? define axis/depth/z/units="log meters" zlog = if k gt 1 then log(z[gz=temp]) else 0 yes? shade/y=0 temp[gz=zlog@asn]

The labeling would be similar to what is done in the FAQ.

Ansley

hengkek@nus.edu.sg wrote:

Greetings

How do I get ferret to contour/shade/fill in log scale for Z axis?

I.e. something like:

use "bathymetry.nc"
fill/level=(1,100000,'log') depth

Thanks for any pointers. I found similar questions in the archives but no replies there. (http://ferret.pmel.noaa.gov/Ferret/Mail_Archives/fu_98/msg00165.html)

regards
-chk
Physical Oceanography
Singapore


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement