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

Home » Public Forums » archive » CMIP5 files - time
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: CMIP5 files - time [message #86145 is a reply to message #86114] Thu, 10 October 2013 17:33 Go to previous messageGo to previous message
SonicKenking is currently offline  SonicKenking
Messages: 51
Registered: October 2010
Member
On Tuesday, October 8, 2013 5:29:08 AM UTC+11, Lim wrote:
> Hi everyone,
>
> I was wondering if you could help me with the following. I am using monthly CMIP5 files. These files are ncdf files. This files have a variable (data) changing with time and the time info embedded in the .nc files.
>
>
>
> Im doing this:
>
> filein='pr_Amon_HadGEM2-ES_piControl_r1i1p1_198412-200911.nc '
>
> ncid = ncdf_open(fileIn)
>
> ncim = ncdf_varid(ncid, 'pr')
>
> NCDF_VARGET, ncid, ncim, _data
>
> sdata=size(_data)
>
> nc=sdata(1) & nl=sdata(2) & nt=sdata(3)
>
> print, nc, nl, nt
>
>
>
> I get : 192 145 300
>
>
>
> The dimensions in the file are time, lat, lon and pr
>
>
>
> I need to read the time from the .nc file and associate each time to the variable. Eg:
>
> time 0 (198412) should be 192x145x0
>
> time 1 (198501) should be 192x145x1
>
> ..
>
> ..
>
> time 299 (200911) should be 192x145x299
>
>
>
> I was wondering if someone could help me solving this problem.
>
>
>
> Thanks
>
>
>
> Lim.

Do you mean something like the following?
for i=0,299 do (scope_varfetch("time_"+strtrim(i,2), /enter)) = _data[*,*,i]
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to speed up kernel density smoothing for many data points
Next Topic: code checking tools

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

Current Time: Wed Oct 08 17:30:56 PDT 2025

Total time taken to generate the page: 0.00375 seconds