<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="HU" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Dear NCL Users,<o:p></o:p></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:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">year_dry = tointeger(utc_date(0:((tim_dims/2)-1),0)) ; years in dry period<o:p></o:p></p>
<p class="MsoNormal">year_wet = tointeger(utc_date((tim_dims/2):tim_dims-1,0)) ; years in wet_period<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">utc_date2 = cd_calendar(time,0) ; time is daily time data<o:p></o:p></p>
<p class="MsoNormal">year2 = tointeger(utc_date2(:,0)) ; get the years from serial date of daily time data<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">do j=0,(tim_dims/2)-1
<o:p></o:p></p>
<p class="MsoNormal"> do n=0,time_size-1 ; time_size is the length of the daily time data<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> if(year2(n).eq.year_dry(j)) then<o:p></o:p></p>
<p class="MsoNormal"> pr_dry=pr(n,:,:) ; pr is the daily precipitation values pr(time, lon, lat)<o:p></o:p></p>
<p class="MsoNormal"> else<o:p></o:p></p>
<p class="MsoNormal"> pr_wet=pr(n,:,:)<o:p></o:p></p>
<p class="MsoNormal"> end if<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> end do<o:p></o:p></p>
<p class="MsoNormal"> end do<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Can someone suggest me a correct solution.<o:p></o:p></p>
<p class="MsoNormal">Thank you for your help in advance!<o:p></o:p></p>
<p class="MsoNormal">Kind regards,<o:p></o:p></p>
<p class="MsoNormal">Beata<o:p></o:p></p>
</div>
</body>
</html>