[Thread Prev][Thread Next][Index]

Re: negative years



Hi Hein Zelle,
I don't think there is a way to specify "BC" in T0. Anyway i think the following method will work for you....provided
matlab looks only for the T-values and not for the "T0" in a netcdf
file....(sorry....i don't have any experience with matlab...)..please
correct me if I am wrong.

! define a time axis with T0="01-JAN-0000 00:00:00"

define axis/t=01-JAN-1900:10-JAN-1900:1/units=days/\
T0="01-JAN-0000 00:00:00" time

! now the T-values on a time axis with T0="00-JAN-0000 00:00:00" will be
! that of above time axis + 1 ==> since units is "days"

define axis/t/units=days/T0="01-jan-0000 00:00:00" tmat=t[gt=time]+1

! Let us assume that matlab reads only the T-values (in the assumption
! that these are Julian Days/Dates based on T0="00-JAN-0000 00:00:00")
! ==> only the time data need's to be correct and the "T0 can be
! wrong"...then regrid the original variable to the second
! time axis (tmat) using @ASN or RESHAPE ...then you will
! have proper t-values to be used in matlab
!
! let matlab_var = original_var[gt=tmat@ASN]


With Regards

Jaison

On Thu, 2 Jun 2005, Hein Zelle wrote:

I have a silly problem reading Ferret-generated netcdf files in
Matlab. Matlab uses julian dates (days since 0000) for all it's time
computations, which works well. However, it defines 0000 as

00-jan-0000 00:00:00

which doesn't exist! I'm trying to define a time axis in ferret that
uses Matlab date numbers as values for t, but I'm having trouble
telling ferret that t0 should be the above date, as Ferret correctly
notices that the date format is invalid.

Is there a way to specify "31-dec-0001 00:00:00 BC" in Ferret?

Hein Zelle

--

Unix is user friendly. It's just very particular about who
it's friends are.

Hein Zelle                     hein@icce.rug.nl
	                        http://www.icce.rug.nl/~hein

--
___________________________________________________

    Jaison Kurian
    Centre for Atmospheric and Oceanic Sciences
    Indian Institute of Science
    B A N G A L O R E   560 012
    Ph: +91-80-22932505 Extn. 229
        +91-80-23600450
    Fax:+91-80-23600865
___________________________________________________

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement