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

Home » Public Forums » archive » Re: How do I change time on a dataset
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: How do I change time on a dataset [message #77131 is a reply to message #77126] Thu, 04 August 2011 13:50 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On 8/4/11 3:12 PM, Ahmed Salahuddin wrote:
> Hi IDL Group,
>
> It would be greatly appreciated if someone out there can help me on
> how to shift 1 year forward in time. Here is the details.
> Here is what I have from the file of
> hadam3p_pnw_zezs_1999_1_006983552_0_1 Folder
> zezsga.pdj9dec.pnw.nc
> zezsga.pdk0jan.pnw.nc
> zezsga.pdk0feb.pnw.nc
> zezsga.pdk0mar.pnw.nc
> zezsga.pdk0apr.pnw.nc
> zezsga.pdk0may.pnw.nc
> zezsga.pdk0jun.pnw.nc
> zezsga.pdk0jul.pnw.nc
> zezsga.pdk0aug.pnw.nc
> zezsga.pdk0sep.pnw.nc
> zezsga.pdk0oct.pnw.nc
> zezsga.pdk0nov.pnw.nc
>
> From the above file structure it means only the first file
> (zezsga.pdj9dec.pnw.nc) for dec of 1999 and the remaining files for
> 2000.
>
> Originally, our understanding of the file structure is as follows
> dec1998
> jan1999
> feb1999
> mar1999
> apr1999
> may1999
> jun1999
> jul1999
> aug1999
> sep1999
> oct1999
> nov1999
>
> Thus, the dates are shifted by a full year in the original IDL program
> and I need to have it be consistent. Where can I change this in the
> idl program?
>
> for i=12,334 do begin ; I have 27 years starting from 1980
> if imo gt 11 then begin
> imo=0
> endif
> vararr=tavg(*,*,i) ; I calculated temp avg
> for iarea=0,nareas-1 do begin ; I have 8 areas
> domain=c_area(iarea)
> inarr=vararr(*,*)
>
> regcpdn_area_avg,domain,WOCmask,WOMmask,WOEmask,WOImask,CAma sk,CVmask,WUSmask,WVmask,lon,lat,inarr,outval
> obsarr(iyear,imo,iarea)=outval
> if finite(outval) eq 0 then stop
> endfor
> print,1979+iyear,imo
> if imo eq 0 then iyear=iyear+1
> imo=imo+1
> endfor
>
> Regards,
> salahud

It's hard to tell how this code relates to the lists of years and months
you have above. Maybe it has to do with the original definition of iyear
(which must be above the code you quote) - should be 0 instead of 1,
perhaps?

-Jeremy.
[Message index]
 
Read Message
Read Message
Previous Topic: Re: String formatting nightmare
Next Topic: Undocumented ENVI/IDL routine: widget_envi_lab

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

Current Time: Mon Dec 01 22:02:27 PST 2025

Total time taken to generate the page: 0.32319 seconds