[ . . . ]
use coads_climatology.cdf
shade/x=50w:20e/y=30s:30n/levels=(14,29,1) SST[l=@ave]
---> 15 color levels, with levels 0(1), the colorscale is OK
shade/x=50w:20e/y=30s:30n/levels=(0.014,0.029,0.001) SST[l=@ave]/1000
---> 15 color levels, with levels 0(1/1000), the colorscale is missing the last level
That must be due to the binary (internal) representation of the fractional numbers like 0.001 . Because the internal representation of 0.001 is slightly larger than the exact value, the last contour level is slightly larger than 0.029 and is excluded from the list. See the demonstration in Fortran below.
As a workaround, make the terminal point slightly larger, perhaps by 1/10 of delta, than the target:
levels=(0.014,0.0291,0.001)
This is not just a problem of PyFerret. It exists in any programming languages (which, by the way, makes me wonder how the Julia language generates the desired list of numbers from "0.014:0.001:0.029" . . . ).
Best regards,
Ryo
---------
program try
implicit NONE
real(4), parameter:: c0 = 0.014, c1 = 0.029, del =
<º)))><..·