<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1513332257820_28232">Hi Dennis!</div><div dir="ltr" id="yui_3_16_0_ym19_1_1513332257820_28233">Many thanks for your help. Specially your information about the coordinates sub-scripting is useful because I use largely GPCP data.</div><div id="yui_3_16_0_ym19_1_1513332257820_28296" dir="ltr">Concerning my problem, I was already aware of the <b>calculate_segment_values</b> function. It is just that I am using an older version of NCL that allows me not to use it. The idea is actually to do the same as this function but using an older version (as I am working in a desktop on which I am not allowed to update anything). <br></div><div id="yui_3_16_0_ym19_1_1513332257820_28643" dir="ltr">So if you have idea this difficulty it will be very well for me.</div><div id="yui_3_16_0_ym19_1_1513332257820_28721" dir="ltr">Thank you!<br></div><div id="yui_3_16_0_ym19_1_1513332257820_28261"><span></span></div><div id="yui_3_16_0_ym19_1_1513332257820_28262"> </div><div id="yui_3_16_0_ym19_1_1513332257820_28291" class="signature">-----------------------------<br>GUIGMA</div> <div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: verdana, helvetica, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Friday, 15 December 2017, 2:39, Dennis Shea <shea@ucar.edu> wrote:<br></font></div> <br><br> <div class="y_msg_container"><div id="yiv6753957736"><div><div dir="ltr"><div><div><div><div><div><div>To be honest, I'm confused.<br clear="none">---<br clear="none"></div>Attached is a version of 'code.ncl' that includes many <b>'printVarSummary</b>'. <br clear="none">It uses a local GPCP 1DDD file.<br clear="none"><br clear="none">Please examine the output so you can follow what is happening. <br clear="none"></div><div>For example look at the printVarSummary(xtemp) before and after the '<b>lonFlip</b>'<br clear="none"></div><div><br clear="none"></div>A few comments:<br clear="none"><br clear="none"></div>[1] GPCP uses longitude coordinates that span 0.5 to 359.5.<br clear="none"> <br clear="none"></div>Your code has: <br clear="none"> f=addfile("GPCP__V1_2dd__PRECIP__1x1__alltimes.nc","r")<br clear="none"> y=f->precip<br clear="none"> x=y(:,{-0.50:30.5},<b>{349.5:10.5}</b>)<br clear="none"><br clear="none"></div>NCL's coordinate subscripting can not correctly span these values. It will return numbers BUT they are not for the region you want. <br clear="none"><br clear="none"></div>NCL requires that the grid be 'flipped' so that it spans -179.5 to 179.5. Then, the following coordinate subscripting could be used:<b> {-10.5:10.5} </b><br clear="none"><br clear="none"><div><div><div><div>[2] I do not know what 'classes' mean in you code description.<br clear="none"><br clear="none"></div><div>[3] For illustration, I used NCL 6.4.0's '<b>calculate_segment_values</b>' to calculate <b>pentad </b>averages.<br clear="none"><br clear="none"> <a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_segment_values.shtml">https://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_segment_values.shtml</a><br clear="none"><br clear="none"></div><div>Hopefully, it will help you get what you want.<br clear="none"><br clear="none"><br clear="none"></div><div><div><div><br clear="none"></div></div></div></div></div></div></div><div class="yiv6753957736gmail_extra"><br clear="none"><div class="yiv6753957736gmail_quote">On Thu, Dec 14, 2017 at 1:32 PM, Kiswendsida Hyacinthe GUIGMA <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:karongseba@gmail.com" target="_blank" href="mailto:karongseba@gmail.com">karongseba@gmail.com</a>></span> wrote:<br clear="none"><blockquote class="yiv6753957736gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv6753957736yqt4959816223" id="yiv6753957736yqt42470"><div><div style="color:#000;background-color:#fff;font-family:verdana, helvetica, sans-serif;font-size:16px;"><div id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3623"><div id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3639"><span id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3624">Hi dear Mary,</span></div><div id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3669"><span id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3624">By "it doesn't work" I mean that I can't get the result I want. <br clear="none"></span></div></div><div id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3625"><span id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3626">My
data come from a pre-processing. Originally, I used GPCP daily data,
extracted my desired region and averaged zonally. I also averaged it
over some latitudes to finally have data at 1D (time). Then I replaced
the time coordinates by other values to take into account the classes.
The classes I am considering here are pentads: I affected to each day a
pentad number that includes year. So in that present case, I would like
to process the totals for each pentad. Attached:<br id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3627" clear="none"></span></div><div id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3628"><span id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3629">1-the code I used <br id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3630" clear="none"></span></div><div dir="ltr" id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3631"><span id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3632">2-the time-series of rr obtained<br id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3633" clear="none"></span></div><div dir="ltr" id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3634"><span id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3635">3-the coordinate values</span></div><div dir="ltr" id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3636"><div dir="ltr" id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3638"><span id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3637">Kindest regards</span></div></div><div id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3598"><span></span></div><div id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3599"> </div><div class="yiv6753957736m_-897226181691201298signature" id="yiv6753957736m_-897226181691201298yui_3_16_0_ym19_1_1513283366027_3600">-----------------------------<br clear="none">GUIGMA</div><div><div class="yiv6753957736h5"> <div class="yiv6753957736m_-897226181691201298qtdSeparateBR"><br clear="none"><br clear="none"></div><div class="yiv6753957736m_-897226181691201298yahoo_quoted" style="display:block;"> <div style="font-family:verdana, helvetica, sans-serif;font-size:16px;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px;"> <div dir="ltr"><font size="2" face="Arial"> On Thursday, 14 December 2017, 16:29, Mary Haley <<a rel="nofollow" shape="rect" ymailto="mailto:haley@ucar.edu" target="_blank" href="mailto:haley@ucar.edu">haley@ucar.edu</a>> wrote:<br clear="none"></font></div> <br clear="none"><br clear="none"> <div class="yiv6753957736m_-897226181691201298y_msg_container"><div id="yiv6753957736m_-897226181691201298yiv9396634742"><div><div dir="ltr"><div class="yiv6753957736m_-897226181691201298yiv9396634742gmail_default" style="font-size:small;">Dear Guigma,</div><div class="yiv6753957736m_-897226181691201298yiv9396634742gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv6753957736m_-897226181691201298yiv9396634742gmail_default" style="font-size:small;">It helps if you can provide more information beyond "it doesn't work".</div><div class="yiv6753957736m_-897226181691201298yiv9396634742gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv6753957736m_-897226181691201298yiv9396634742gmail_default" style="font-size:small;">That is, how is it not working? Are you getting a error? If so, it helps if you can provide the code that is producing the error and the full error.</div><div class="yiv6753957736m_-897226181691201298yiv9396634742gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv6753957736m_-897226181691201298yiv9396634742gmail_default" style="font-size:small;">Thanks,</div><div class="yiv6753957736m_-897226181691201298yiv9396634742gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv6753957736m_-897226181691201298yiv9396634742gmail_default" style="font-size:small;">--Mary</div><div class="yiv6753957736m_-897226181691201298yiv9396634742gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv6753957736m_-897226181691201298yiv9396634742gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv6753957736m_-897226181691201298yiv9396634742gmail_default" style="font-size:small;"><br clear="none"></div></div><div class="yiv6753957736m_-897226181691201298yiv9396634742gmail_extra"><br clear="none"><div class="yiv6753957736m_-897226181691201298yiv9396634742gmail_quote">On Thu, Dec 14, 2017 at 3:53 AM, Kiswendsida Hyacinthe GUIGMA <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:karongseba@gmail.com" target="_blank" href="mailto:karongseba@gmail.com">karongseba@gmail.com</a>></span> wrote:<br clear="none"><blockquote class="yiv6753957736m_-897226181691201298yiv9396634742gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv6753957736m_-897226181691201298yiv9396634742yqt8216204529" id="yiv6753957736m_-897226181691201298yiv9396634742yqt98485"><div><div style="color:#000;background-color:#fff;font-family:verdana, helvetica, sans-serif;font-size:16px;"><div id="yiv6753957736m_-897226181691201298yiv9396634742m_2538590518709073362yui_3_16_0_ym19_1_1513248035228_4533"><span id="yiv6753957736m_-897226181691201298yiv9396634742m_2538590518709073362yui_3_16_0_ym19_1_1513248035228_4665">Hi everyone!</span></div><div dir="ltr" id="yiv6753957736m_-897226181691201298yiv9396634742m_2538590518709073362yui_3_16_0_ym19_1_1513248035228_4551"><span id="yiv6753957736m_-897226181691201298yiv9396634742m_2538590518709073362yui_3_16_0_ym19_1_1513248035228_4573">I have a 1D rainfall amounts timeseries. My coordinate is "qualitative", which means that they represent categories. I just separated my data following many classes of rainfall (rr<1mm, 1<=rr<5, 5<=rr<10 ...) and to each category I affect a distinct number (0,1,2,,,...). I would like to process the total for each class of data. I tried to use the <font id="yiv6753957736m_-897226181691201298yiv9396634742m_2538590518709073362yui_3_16_0_ym19_1_1513248035228_4880" color="#cd232c">where</font> function but it doesn't work. <br clear="none"></span></div><div dir="ltr" id="yiv6753957736m_-897226181691201298yiv9396634742m_2538590518709073362yui_3_16_0_ym19_1_1513248035228_4896"><span id="yiv6753957736m_-897226181691201298yiv9396634742m_2538590518709073362yui_3_16_0_ym19_1_1513248035228_4573">Your help is greatly appreciated. </span></div><div id="yiv6753957736m_-897226181691201298yiv9396634742m_2538590518709073362yui_3_16_0_ym19_1_1513248035228_4534"> </div><div class="yiv6753957736m_-897226181691201298yiv9396634742m_2538590518709073362signature" id="yiv6753957736m_-897226181691201298yiv9396634742m_2538590518709073362yui_3_16_0_ym19_1_1513248035228_4535">-----------------------------<br clear="none">GUIGMA</div></div></div></div><br clear="none">______________________________ _________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/ mailman/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div><br clear="none"><br clear="none"></div> </div> </div> </div></div></div></div></div></div><br clear="none">______________________________ _________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/ mailman/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div><br><br></div> </div> </div> </div></div></body></html>