[udunits] how to control netcdf time stamp?

Dear Fellow users,
I am relatively new to netcdf and i have a problem with time stamps.
To start with, I have a netcdf file of monthly precipitation (e.g. monthlydata.nc) for a year 1985 (12 time steps). It has time axis but not time attributes which means when I display it using ferret, it shows T=1,2 and so on for 12 time steps.

What I need is first time step to be displayed as 1985-01-01 00:00:00 i.e. the beginning of each month.

Well for that I created a cdl file with time attributes as,

netcdf time {
dimensions:
time = UNLIMITED ; // (12 currently)
variables:
float time(time) ;
time:units = "months since 1985-01-01 00:00:00" ;
time:title = "Time" ;
time:long_name = "Time axis" ;
time:calendar="gregorian";
time:time_step="monthly";
time:time_origin = "1985-01-01 00:00:00" ;
data: time =
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12;}

I then created the netcdf file (time.nc) from this cdl file using
ncgen -o ncfile cdlfile

After that I used

ncrcat ?A ?v time time.nc monthlydata.nc

After that it puts the time attributes in the monthlydata.nc. But when I use ferret to display the data, the time stamps are displayed as 1985-01-31 10:52, 1985-03-02 10:52 ?.1985-12-31 10:52.

So, I want to change the time stamps as 1985-01-01 00:00:00, 1985-02-01 
00:00:00 and so on.
Is there any way I can do that?
Any prompt help will be greatly appreciated.
Truly
Sujan






  • 2008 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the udunits archives: