Dear Dennis,
It works, thanks very much!
The data file is too large to send by email. Besides, this question has nothing to do with CDO, which I just use here to show data info.
In addition, I have another two questions as:
Question-1:If I know a specific year, e.g. 2009, is there any NCL function to judge whether it is a leap year?
Question-2:
What is the difference about
time_at_units = "yyyymmdd"
and
time_at_units = "yyyymmdd"
Thanks very much again!
Mark
________________________________
From: Dennis Shea <shea_at_ucar.edu>
To: Mark Chan <cym263_at_yahoo.com>
Cc: "ncl-talk_at_ucar.edu" <ncl-talk_at_ucar.edu>
Sent: Thursday, April 5, 2012 1:13 AM
Subject: Re: warning:FileVarAttDef: Variable (time) has no attributes to assign
You should send this to the CDO mailing list.
The original ASCII file 'ecmwf_temp_2009_monthly_mean.dat'
is not available nor is the netCDF file the script created.
*speculation*
To be CF compliant, I believe the 'time' variable must have
units of the form
"hours since ..." or "seconds since ..." or ""days since"
You can specify an arbitrary start date in the units.
See:
http://www.ncl.ucar.edu/Document/Functions/Built-in/cd_inv_calendar.shtml
You could have an 'auxiliary time variable, eg
date = ...
date!0 = "time"
date_at_units = "yyyymmdd"
On 4/4/12 8:09 AM, Mark Chan wrote:
> Dear NCL users,
>
> The attached file is my NCL script, that is used for writing netCDF
> file. It works but always show a warning message as:
> warning:FileVarAttDef: Variable (time) has no attributes to assign
>
> Can someone help to get rid of this warning message? I wish you could
> give more suggestion to make it better, and moreover, give an advice for
> writting "hourly" data.
>
> Thank you very much!
> Mark
>
> --------------created data info-----------------------------
> >$ cdo info my_simple.nc
> -1 : Date Time Param Level Size Miss : Minimum Mean Maximum
> 1 : 2009-01-01 00:00:00 -1 0 1036800 0 : -49.800 4.2846 35.400
> 2 : 2009-02-01 00:00:00 -1 0 1036800 0 : -48.600 3.3501 34.400
> 3 : 2009-03-01 00:00:00 -1 0 1036800 0 : -56.900 3.1774 33.800
> 4 : 2009-04-01 00:00:00 -1 0 1036800 0 : -69.000 4.2939 35.500
> 5 : 2009-05-01 00:00:00 -1 0 1036800 0 : -63.600 6.5704 38.300
> 6 : 2009-06-01 00:00:00 -1 0 1036800 0 : -61.200 7.7993 38.600
> 7 : 2009-07-01 00:00:00 -1 0 1036800 0 : -58.700 8.4162 40.000
> 8 : 2009-08-01 00:00:00 -1 0 1036800 0 : -67.200 7.7216 40.300
> 9 : 2009-09-01 00:00:00 -1 0 1036800 0 : -65.100 6.8033 36.400
> 10 : 2009-10-01 00:00:00 -1 0 1036800 0 : -54.400 5.8541 34.200
> 11 : 2009-11-01 00:00:00 -1 0 1036800 0 : -39.500 5.1426 33.600
> 12 : 2009-12-01 00:00:00 -1 0 1036800 0 : -51.600 4.5734 34.000
> cdo info: Processed 12441600 values from 1 variable over 12 timesteps. (
> 0.47s )
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 5 01:43:29 2012
This archive was generated by hypermail 2.1.8 : Mon Apr 09 2012 - 13:43:03 MDT