How do I change time on a dataset [message #77132] |
Thu, 04 August 2011 12:12 |
Ahmed Salahuddin
Messages: 3 Registered: July 2011
|
Junior Member |
|
|
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
|
|
|