[Thread Prev][Thread Next][Index]
Re: changing origin time scale
Hi Francois,
Ferret-level:
Adding one small detail to mark Verschell's answer using Ferret, since
your time axis is irregular you can use the /FROM_DATA qualifier
define axis/t/name=newt/from_data/t0="**corrected**" t[g=myvar]
to create a new irregular time axis "newt" from the original time
points. Note, however, that the resultant time step values are actually
single precision.
Unix-level:
A simple approach, using the unix-netCDF tools ncdump and ncgen is:
ncdump myfile.nc | sed 's/2-jan-1961/2-jan-1960/g' | ncgen -o
newfile.nc
Note that the sed strings are case sensitive.
Happy Ferreting - steve
=====================================================================
Francois Delclaux wrote:
>
> Hi,
>
> I have a netcdf file (x,y,t) with 12600 values on t-axis,
>
> and (33,25) values on (x,y) axes (21 Mbytes file )
>
> This t-axis is irregular, 360 days for 35 years. But a error has been made
>
> concerning the time origin.
>
> I would like to make a time-translation, and
>
> to change the origin, ie, to make the file begin the 2 january 1960
>
> instead of the 2 january 1961.
>
> What's the best way to do this opration, in ferret or another netcdf tools ...
>
> (avoiding fortran program development !)
>
> Thank's in advance
>
> --
> DELCLAUX Francois
> -----------------------------------------------------------
> IRD (ex ORSTOM) Hydrologie
> BP 5045 34032 Montpellier Cedex FRANCE
> http://www.mpl.orstom.fr/~delclaux/
> mailto:Francois.Delclaux@mpl.orstom.fr
> Tel : (33) (0)4-67-41-64-42 Fax : (33) (0)4-67-54-71-06
> -----------------------------------------------------------
--
| 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