<div dir="ltr"><div><div>year_dry =....<br></div><div>year_wet =<br></div>day_year = ..... ;<b> year value for each day</b><br><br></div>iyr = ind(<br><pre>idry = <strong>get1Dindex</strong>(day_year,year_dry)<br>iwet = <strong>get1Dindex</strong>(day_year,year_wet)<br><br></pre><pre>pwet = prcDay(iwet,:,:)<br></pre><pre>pdry = prcDay(idry,:,:)<br></pre></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 25, 2018 at 8:42 AM, Beáta Szabó-Takács <span dir="ltr"><<a href="mailto:szabo.b@czechglobe.cz" target="_blank">szabo.b@czechglobe.cz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="#0563C1" vlink="#954F72" lang="HU">
<div class="m_-3838231286420123020WordSection1">
<p class="MsoNormal">Dear NCL Users,<u></u><u></u></p>
<p class="MsoNormal">I created an ncl script (dr_wet.ncl) to calculate the dry and wet period based on spatial mean yearly precipitation sum data. I would like to get the daily precipitation data in dry and in wet period but I do not know how I should calculate
it? I attached the script. I tried the following way but unfortunately it does not give correct values:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">year_dry = tointeger(utc_date(0:((tim_<wbr>dims/2)-1),0)) ; years in dry period<u></u><u></u></p>
<p class="MsoNormal">year_wet = tointeger(utc_date((tim_dims/<wbr>2):tim_dims-1,0)) ; years in wet_period<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">utc_date2 = cd_calendar(time,0) <wbr> ; time is daily time data<u></u><u></u></p>
<p class="MsoNormal">year2 = tointeger(utc_date2(:,0)) <wbr> ; get the years from serial date of daily time data<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">do j=0,(tim_dims/2)-1 <wbr> <wbr>
<u></u><u></u></p>
<p class="MsoNormal"> do n=0,time_size-1 <wbr> <wbr> ; time_size is the length of the daily time data<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> if(year2(n).eq.year_dry(j)) then<u></u><u></u></p>
<p class="MsoNormal"> pr_dry=pr(n,:,:) <wbr> <wbr> ; pr is the daily precipitation values pr(time, lon, lat)<u></u><u></u></p>
<p class="MsoNormal"> else<u></u><u></u></p>
<p class="MsoNormal"> pr_wet=pr(n,:,:)<u></u><u></u></p>
<p class="MsoNormal"> end if<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> end do<u></u><u></u></p>
<p class="MsoNormal"> end do<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Can someone suggest me a correct solution.<u></u><u></u></p>
<p class="MsoNormal">Thank you for your help in advance!<u></u><u></u></p>
<p class="MsoNormal">Kind regards,<u></u><u></u></p>
<p class="MsoNormal">Beata<u></u><u></u></p>
</div>
</div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>