[Thread Prev][Thread Next][Index]

re: erroneour NetCDF time axis

Hi Barbara,

There are two approaches to straightening out your time axis: fix it on-the-fly
in Ferret or fix it in the NetCDF file.

To fix it on-the-fly in Ferret you need only define the CORRECT time aix and
then tell Ferret to "associate" this correct axis with your variable through
the use of the "@ASN" transformation. Example follows:

  yes? DEFINE AXIS/T="1-jan-1981:12:00":"31-dec-1985:12:00":12/units=hours t12
  yes? LET corrected_var = var[GT=t12@ASN}

Now use "corrected_var" instead of the original "var". Since the association is
**by index** Ferret will not try to use the wild and wooly time values in the

To fix the NetCDF file you will need to go back to your code that converts the
data and figure out why at each pass through the loop the code is incrementing
by a power of two. My guess is that this will be pretty simple to find, but I
can't offer any specific guidance.

	- steve


On Nov 6,  2:53pm, Barbara Winter wrote:
> Subject:
> Hello,
> I'm using "converting_to_netcdf" to convert 32-bit ieee to NetCDF. The
> "converting" files do what they should and the data is properly converted;
> alas, the time axis is a disaster. Instead of the timesteps merely being
> incremented by 1 through each pass through the do loop, they end up as
> powers of two. The first five years end up not as years 1, 2, 3, 4, 5 but
> as years 0.0078125, 2, 32, 512, 2048.
> Up to here it is not strictly  a "ferret" problem but a conversion one; I
> send it to this list because the conversion program was supplied by
> ferret (and is outlined in the manual).
> Plotting does actually work. I don't much mind that the date at the top
> is something wild & woolly, but because the dates grow so large so
> quickly, "year 2048" is all ferret cares to deal with! I'd like to get at
> the rest of my record (there are 46 years in all; the last one ends up
> being year "103 billion"), but am unceremoniously expelled from ferret as
> soon as the dates get too big.
> When I tried this problem out on seasoned ferreteers here, they mumbled
> things about time axes being a pain and made me leave. I trust then that
> the problem is a common one and that someone can help me solve it!
> Barbara Winter
>-- End of excerpt from Barbara Winter


		|  NOAA/PMEL               |  ph. (206) 526-6080  
Steve Hankin	|  7600 Sand Point Way NE  |  FAX (206) 526-6744
		|  Seattle, WA 98115-0070  |  hankin@pmel.noaa.gov

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement