Re: time

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Jul 31 2013 - 11:04:37 MDT

Setareh,

You need to read the documentation on a function before you post your questions to ncl-talk. Many questions you've had could be answered by doing some research:

http://www.ncl.ucar.edu/Document/Functions/Contributed/yyyymm_time.shtml

The argument is telling you that the first argument's type is wrong. If you read the documentation, you will see that the first argument is supposed to be an integer.

My guess is that "year" is a float or a double. It needs to be an integer:

  firstyr = toint(year(0))
   lastyr = toint(year(ntim-1))

--Mary

On Jul 31, 2013, at 10:30 AM, Setareh Rahimi wrote:

> Dear all,
>
> I use a data set in which time is base on udunits which is units of time from a basedate. For example, days since 1800-01-01. In data file, time is defined as string.when I run codes below I get an error saying : argument type mismatch on argument (0) of yyyymm_time. I also tried integer, float and double, but still got the same error. Please adice me how fix this issue.
>
> year = yyyymm/100
> firstyr = year(0)
> lastyr = year(ntim-1)
> nyear = lastyr-firstyr+1
> yyyymm = yyyymm_time(firstyr,lastyr , "string")
>
>
>
> Thank you in advance.
>
>
>
>
>
>
>
> --
> S.Rahimi
>
> _______________________________________________
> 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 Wed Jul 31 11:04:46 2013

This archive was generated by hypermail 2.1.8 : Thu Aug 01 2013 - 15:55:03 MDT