comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » how can you convert CMIP5 model output time ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
how can you convert CMIP5 model output time ? [message #89086] Wed, 23 July 2014 12:59 Go to next message
siumtesfai is currently offline  siumtesfai
Messages: 62
Registered: April 2013
Member
how can you convert CMIP5 model output time to the Julian day?
Re: how can you convert CMIP5 model output time ? [message #89087 is a reply to message #89086] Wed, 23 July 2014 13:45 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 7/23/14, 1:59 PM, siumtesfai@gmail.com wrote:
> how can you convert CMIP5 model output time to the Julian day?

It looks like CMIP5 model output time is specified in days since some
basetime, bt, specified by the user (looks like it is given in the
"units" attribute to the variable), so something like:

jday = output_day + julday(bt_year, bt_month, bt_day, ...)

should do it.

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
Re: how can you convert CMIP5 model output time ? [message #89089 is a reply to message #89086] Wed, 23 July 2014 14:00 Go to previous messageGo to next message
siumtesfai is currently offline  siumtesfai
Messages: 62
Registered: April 2013
Member
On Wednesday, July 23, 2014 3:59:49 PM UTC-4, siumt...@gmail.com wrote:
> how can you convert CMIP5 model output time to the Julian day?

Here is example CMIP5 model output

netcdf sfcWind_Amon_CSIRO-Mk3-6-0_historical_r10i1p1_185001-200512 {
dimensions:
time = UNLIMITED ; // (1872 currently)
lat = 96 ;
lon = 192 ;
bnds = 2 ;
variables:
double time(time) ;
time:bounds = "time_bnds" ;
time:units = "days since 1850-01-01 00:00:00" ;
time:calendar = "noleap" ;
time:axis = "T" ;
time:long_name = "time" ;
time:standard_name = "time" ;
double time_bnds(time, bnds) ;
double lat(lat) ;
lat:bounds = "lat_bnds" ;
lat:units = "degrees_north" ;
lat:axis = "Y" ;
lat:long_name = "latitude" ;
lat:standard_name = "latitude" ;
double lat_bnds(lat, bnds) ;
double lon(lon) ;
lon:bounds = "lon_bnds" ;
lon:units = "degrees_east" ;
lon:axis = "X" ;
lon:long_name = "longitude" ;
lon:standard_name = "longitude" ;
double lon_bnds(lon, bnds) ;
double height ;
height:units = "m" ;
height:axis = "Z" ;
height:positive = "up" ;
height:long_name = "height" ;
height:standard_name = "height" ;
float sfcWind(time, lat, lon) ;
sfcWind:standard_name = "wind_speed" ;
sfcWind:long_name = "Near-Surface Wind Speed" ;
Re: how can you convert CMIP5 model output time ? [message #89092 is a reply to message #89086] Wed, 23 July 2014 17:37 Go to previous messageGo to next message
siumtesfai is currently offline  siumtesfai
Messages: 62
Registered: April 2013
Member
On Wednesday, July 23, 2014 3:59:49 PM UTC-4, siumt...@gmail.com wrote:
> how can you convert CMIP5 model output time to the Julian day?

Any solution about how to handle the time array in CMIP5 model daily output.
Re: how can you convert CMIP5 model output time ? [message #89096 is a reply to message #89092] Thu, 24 July 2014 01:44 Go to previous messageGo to next message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
On 24.07.2014 02:37, siumtesfai@gmail.com wrote:
> Any solution about how to handle the time array in CMIP5 model daily output.

You answered your own question by printing the variable's attributes:

double time(time) ;
time:bounds = "time_bnds" ;
time:units = "days since 1850-01-01 00:00:00" ;

And Michael gave you the "formula" to use.

So, what did you try and why didn't it work as expected?
Re: how can you convert CMIP5 model output time ? [message #89110 is a reply to message #89096] Thu, 24 July 2014 17:00 Go to previous messageGo to next message
siumtesfai is currently offline  siumtesfai
Messages: 62
Registered: April 2013
Member
On Thursday, July 24, 2014 4:44:45 AM UTC-4, Fabien wrote:
> On 24.07.2014 02:37, siumtesfai@gmail.com wrote:
>
>> Any solution about how to handle the time array in CMIP5 model daily output.
>
>
>
> You answered your own question by printing the variable's attributes:
>
>
>
> double time(time) ;
>
> time:bounds = "time_bnds" ;
>
> time:units = "days since 1850-01-01 00:00:00" ;
>
>
>
> And Michael gave you the "formula" to use.
>
>
>
> So, what did you try and why didn't it work as expected?

Yes I tried

time=time+julday(1850,1,1,0,0,0)
Caldat,month,year,day

It did not work for me.

I should be able to see time ranging from Jan 1850 to Dec 2005 ( 1872 months). I can create my own time ( time=findgen(1872)/12. + 1850)
Re: how can you convert CMIP5 model output time ? [message #89113 is a reply to message #89110] Fri, 25 July 2014 01:51 Go to previous message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
On 25.07.2014 02:00, siumtesfai@gmail.com wrote:
> It did not work for me.

Well if you really want help you will need to be more specific.

> I can create my own time ( time=findgen(1872)/12. + 1850)

... whatever works for you is good for me ;-)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Locating desired values in an array.
Next Topic: writing a variable in a netcdf 4 with IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:29:02 PDT 2025

Total time taken to generate the page: 0.00493 seconds