<div dir="ltr"><div><div><div><div><div>Thank you for the response. I will try and explain more clearly what I am looking to achieve.<br><br></div>I would like to take my variable from x(time,lat,lon), where time is in "days since YYYY-MM-DD", and make the variable be: x(year,month,day,lat,lon), where year, month and day are their own dimensions. <br><br></div>Ultimately I would like to pull out data from each month individually with a statement such as: dec=x( : , 12 , : , : , : ). With leap days present within the dataset, I cannot figure out a way to achieve this without having year, month, day being their own dimensions.<br><br></div>Hopefully this is more clear.<br></div>Thanks!<br></div>Zac<br><div><div><div><div><div><div><div><div><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Dennis Shea</b> <span dir="ltr"><<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>></span><br>Date: Tue, Jun 9, 2015 at 11:11 PM<br>Subject: Re: [ncl-talk] Adding additional dimensions to an existing variable<br>To: Zachary Suriano <<a href="mailto:zsuriano@udel.edu">zsuriano@udel.edu</a>><br><br><br><div dir="ltr"><div>This is offline.<br><br></div>I am not sure of the question. It may be misleading<br><br><h2><font size="2">"Adding additional dimensions to an existing variable"</font></h2><p>To me and I suspect others ... adding extra dimensions woylmean</p><p><br></p><p> x(time,lat,lon) ; 3D</p><p>Addin a fimension might be</p><p><br></p><p> x(ncase,time,lat,lon) ; 4D<br></p><p><br></p><p>or, even,</p><p><br></p><p> x(ncase,time,level,lat,lon) ; 5D</p><p><br></p><p><br></p><p>===================================</p><p><br></p><p>Adding extra **variables**</p><p><br></p><p> x(time,lat,lon)</p><p><br></p><p> date(time) ; (say) yyyymmdd</p><p> datesec(time) ; seconds into current date</p><p><br></p><p> yyyy(time)</p><p> month(time)</p><p> day(time)</p><p> hour(time)</p><p><br></p><p>Is this what you meant????</p><p><br></p><p>Please respond to ncl-talk only ...I get way too much email.</p><p>====================</p><p><br></p><p>You can use <br></p><p><br></p><p>f = addfile(..., "w")</p><p><br></p><p> f->date = date</p><p><br></p><p>etc</p><p><br></p><p>Make a copy of the file for testing purposes.</p><p><br></p><p>*ALWAYS* include what version of NCL u r using</p><p><br></p><p>ncl -V</p><p><br></p><p>Again ... ncl-talk only and please do not address me directly</p><p><br></p><p>Just make a post</p><p><br></p><p>Good luck<br></p><p><br></p><p><br></p><p><br></p><p> <br></p><p><br></p><p> <br></p><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Jun 9, 2015 at 1:25 PM, Zachary Suriano <span dir="ltr"><<a href="mailto:zsuriano@udel.edu" target="_blank">zsuriano@udel.edu</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div>Hello,<br><br>I have a question regarding a ncl script I am writing. I have searched
through the manual and online forums and have come back empty
handed.<br><br>I have a file of daily snow depth changes (time,lat,lon) and
would like to add additional dimensions to the variable. Time is in
"days since ..." format and I would like to add (in the form of
additional dimensions) the year, month, day that correspond to the time
stamp while keeping the original time dimension the same. This way I can
quickly and easily filter the data by month/etc later on without having
to worry about leap years messing with the indexing. <br><br>I have the year/month/day arrays already generated from "calendar_decode2"<br>but when I try to add/merge them I keep running into issues. Any suggestions or solutions would be very much appreciated. <br><br></div>Thank you,<br><br></div>Zac Suriano</div>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</div><br></div></div></div></div></div></div></div></div></div>