<div dir="ltr"><div><div>Hello Dr. <span class=""> Muthuvel Chelliah,<br><br></span></div><span class="">I assume that you require a new variable such that, in a particular year, you want values for that variable in a some months ( Say June to Septmber) and have to set all other months to undefined. I think you can do this in a tricky way. Please try the attached script. I will explain the concept here with HadISST data. </span><span class=""><span class="">This method can only be used for monthly data since </span>'modify' command does not support creating daily climatology.<br>
<br>'reinit'<br>'sdfopen HadISST_sst.nc'<br><br>suppose you want only data for the indian summer monsoon time ( June to September). ie months 6 to 9<br><br>'set t 6 9'<br>'define sstclim = ave(sst, t+0, t=24, 12)'<br>
'modify sstclim seasonal'<br><br></span></div><span class="">now this new variable sstclim contains only values for June to September and all other values undefined. Now create a new variable such that the values are a constant field '1' form June to September months and all other months are undefined.<br>
</span><div><span class=""><br>'define clim=sstclim/sstclim'<br>'modify clim seasonal'<br><br>This new variable contains value 1 from June to September and all other values undefined. Now multiply it with the real sst data for the entire time period. <br>
<br>'set t 1 100'<br>'define sstnew=sst*clim'<br><br></span></div><div><span class="">The new variable sstnew will have values only for June to September in every year. <br><br></span></div><div><span class="">Krishnamohan<br>
</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 16, 2013 at 6:30 AM, Jennifer Adams <span dir="ltr"><<a href="mailto:jma@cola.iges.org" target="_blank">jma@cola.iges.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Take a look at the docs for the tmave() function. You may not want averaging over your time series, but it might be helpful in setting up a mask to apply to your longer time series to get rid of periods you are not interested in. You could create an ascii file with 0's and 1's, convert to netcdf with ncgen, and apply (multiply or whatever) that mask to your whole time series. <div>
--Jennifer</div><div><br><div><br><div><div><div class="h5"><div>On Apr 15, 2013, at 5:14 PM, Muthuvel Chelliah - NOAA Federal wrote:</div><br></div></div><blockquote type="cite"><div><div class="h5">Hello Grads experts,<br>
<br>Is there any recommendation for the following situation.<br><br>After I define a variable VAR (assume daily data) for a period of <br>long time, can I selectively choose a shorter sub-period within this full<br>
period and set VAR to undef value, and still<br>use the full period of VAR values, with this newly set undefined<br>value for that sub period? I hope this is not confusing.<br><br>The problem I run into is, when I try to redefine VAR <br>
for the shorter period, full period VAR gets deleted, and a new VAR<br>is created only for the shorter period.<br><br>Thanks for any help/suggestions.<br><br>Muthu<br><pre cols="72"><font style="font-family:tahoma,sans-serif">------------------------------------------------------------------<br>
Dr.Muthuvel Chelliah, <a href="mailto:eMail%3AMuthuvel.Chelliah@noaa.gov" target="_blank">eMail:Muthuvel.Chelliah@noaa.gov</a><br>Rm.3008, Climate Prediction Center, Ph:(301) 683-3393<br>NCEP/NWS/NOAA/U.S.Dept.of Commerce,<br>
5830, University Research Court, NCWCP<br>College Park, MD 20740.</font><br></pre></div></div>
_______________________________________________<div class="im"><br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div></blockquote></div><br><div>
<span style="border-spacing:0px 0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="border-spacing:0px 0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="border-spacing:0px 0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><div>
--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org" target="_blank">jma@cola.iges.org</a></div><div><br>
</div><br></span></span></span>
</div>
<br></div></div></div><br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Krishnamohan.K.S<br>CSIR Research Fellow<br>Department Of Atmospheric Sciences<br>Cochin University of Science and Technology<br>Cochin,India
</div>