[Thread Prev][Thread Next][Index]

Re: [ferret_users] corrupted time axis or ferret bug ?

Hi -
Ferret's coordinate-axis calculations are in double precision, so the precision of the numbers that represent the time axis is not the problem. It represents the time axis correctly for computations or things like writing a subset.  However I think Martin is right that the axis gives the plot routines trouble when setting up the plot axis. This axis is only 2 hours long, but see how the time axis of your plot shows DAYS along the time axis.  The time-axis styles don't go down to hours and minutes.  You can LIST the data and the correct times are shown:
yes? use S1
yes? sh grid temp
 name       axis              # pts   start                end
 LONGITUDE LONGITUDE            7mr   5.477E(5.4775)       5.506E(5.5069)
 LATITUDE  LATITUDE             5 r   43.133N              43.147N
 LEVEL     Z (level)           30 i-  -0.9775              -0.0005
 TIME      TIME                 9 r   01-DEC-2011 00:00    01-DEC-2011 02:00

yes? list/i=4/j=3/k=1 temp
             VARIABLE : temperature (Deg Celsius)
             DATA SET : RIOT
             FILENAME : S1.nc
             SUBSET   : 9 points (TIME)
             LONGITUDE: 5.5E(5.5)
             LATITUDE : 43.1N
             Z (level): -0.9775
 01-DEC-2011 00:00:00 / 1:  14.12
 01-DEC-2011 00:15:00 / 2:  13.97
 01-DEC-2011 00:30:00 / 3:  13.63
 01-DEC-2011 00:45:00 / 4:  13.38
 01-DEC-2011 01:00:00 / 5:  13.27
You could define a time axis that just has units of hours or minutes. If you define it without a /T0= qualifier, then it is not a calendar axis that gets nicely labeled with formatted dates (and we couldn't regrid data on it to a calendar time axis), but you will  get correct plots.  One idea:
yes? define axis/t=0:2:0.25/units="hours, 1-Dec-2001"  `sal,return=taxis`
 *** NOTE: (fyi) units are not subject to auto-conversion: HOURS, 1-DEC-2001
Replacing definition of axis TIME
 *** NOTE: grid  used by data set S1
 *** NOTE: Redefinition may alter apparent contents of data set

yes? shade/i=4/j=3 sal
notice the warning messages when you redefine the axis. They're telling us that units of "hours, 1-Dec-2001" can't be automatically converted to other time units, and that I've redefined the time axis of a dataset.  You could also define a new axis and regrid to it using @ASN as Martin did in his message.

the resulting image

On 5/11/2012 12:06 AM, Nicolas Perenne wrote:

I have a strange problem with the attached NetCDF file (generated by a numerical model, but this one is pretty small). Can't figure it out and was unable to find a clue in the mail archive. 

So this is about 'shade': a vertical slice through the attached NetCDF is fine in y-z but another in t-z doesn't show anything (cf 'pb.jnl' also attached to this mail). 

'plot/k=30' is ok though, and moreover this is the first time I have such a problem with a t-z slice (doing quite a lot of it on various other datasets)

Currently using Ferret V6.72 but same pb with an old (windows) V5.51. 

Do you think it could be a ferret bug, or a corruption of the NetCDF file, or a subtle combination of both?


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement