<html><head></head><body><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div></div>
<div><br></div><div>Thank you so much for your helpful comments.</div><div>However could it be related to do not using statements like</div><div><span><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; color: rgb(0, 0, 0);">setfileoption("nc", "FileStructure", "Advanced")<span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;">or <span><pre style="white-space: pre-wrap; color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent;"><span><pre style="white-space: pre-wrap; color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent;">setfileoption("nc", "Format", "NetCDF4Classic")</pre></span></pre></span>Because in the script we don't use these statements while reading input file:</span>
</pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; color: rgb(0, 0, 0);"><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;"><span><span style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">[SNIP]</span></span><br></span></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; color: rgb(0, 0, 0);"><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;"><span><div><span> ;diri = "/Users/shea/Data/ECMWF/ERAI/"</span><br></div><div> diri = "/home/taghizade/97_1_17/5_Era-Interim/"</div><div> fili = "2_ERAI_Prec_2017_Jan_00_12_12.nc"</div><div> pthi = diri+fili</div><div><br></div><div> f = addfile(pthi, "r")</div><div> tp = short2flt(f->tp)</div><div><span><span style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">[SNIP]</span></span><br></div></span><br></span></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; color: rgb(0, 0, 0);"><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;">However I've used them like below:</span></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; color: rgb(0, 0, 0);"><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;"><span><span style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">[SNIP]</span></span></span> </pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; color: rgb(0, 0, 0);"><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;"><span><pre style="white-space: pre-wrap; color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent;"><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;"><div><span><pre style="white-space: pre-wrap; color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent;">setfileoption("nc", "FileStructure", "Advanced")</pre></span> ;diri = "/Users/shea/Data/ECMWF/ERAI/"<br></div><div> diri = "/home/taghizade/97_1_17/5_Era-Interim/"</div><div> fili = "2_ERAI_Prec_2017_Jan_00_12_12.nc"</div><div> pthi = diri+fili</div><div><br></div><div> f = addfile(pthi, "r")</div><div> tp = short2flt(f->tp)</div></span></pre></span><span><pre style="white-space: pre-wrap; color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent;">setfileoption("nc", "Format", "NetCDF4Classic")</pre></span><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; color: rgb(0, 0, 0);"><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;"><span><span style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">[SNIP]</span></span><br></span></pre>and I didn't see any change, but I'm not expert and I thought may be I don't use correct options.</span></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; color: rgb(0, 0, 0);"><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;"><br></span></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; color: rgb(0, 0, 0);"><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;">Sincerely</span></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; color: rgb(0, 0, 0);"><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;">Ehsan</span></pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; color: rgb(0, 0, 0);"><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;"><br></span></pre></span></div>
</div><div id="yahoo_quoted_9557403285" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Sunday, June 10, 2018, 6:45:31 PM GMT+4:30, Dennis Shea <shea@ucar.edu> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv1749068626"><div><div dir="ltr">There appears to be an unusual bug with 6.4.0 with this file. <br clear="none">This has not been encountered before.The work-around is to not use the 'unlimited' designation.<br clear="none"><br clear="none">Please remove the following line:<br clear="none"><br clear="none"><b>filedimdef(ncdf,"time",-1,True ) ; make time UNLIMITED<br clear="none"><br clear="none"></b>====<br clear="none">Writing the file as NetCDF-4 with time <b>not</b> set to unlimited results in a 14 MB file<br clear="none">Writing the file as NetCDF-3, <b>both </b>limited and unlimited,results in 14 MB files<br clear="none"><br clear="none">==== <br clear="none"> A detail: <br clear="none"> <br clear="none">Specifically: The unusual thing about the 474 MB fie is that it seems to think it has <b>chunked </b>variables with a dimension <b>size of 1024</b>:<div class="yiv1749068626gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv1749068626gmail_default"><div class="yiv1749068626gmail_default"> Variable: TP</div><div class="yiv1749068626gmail_default"> Type: float</div><div class="yiv1749068626gmail_default"> Total Size: 3586080 values</div><div class="yiv1749068626gmail_default"> 14344320 bytes</div><div class="yiv1749068626gmail_default"> Number of Dimensions: 3</div><div class="yiv1749068626gmail_default"> Dimensions and sizes:<span style="white-space:pre-wrap;"> </span>[ 31 <time | unlimited> x 241 <latitude> x 480 <longitude> ]</div><div class="yiv1749068626gmail_default"><b> Chunking Info:<span style="white-space:pre-wrap;"> </span>[ 1024 <time> x 241 <latitude> x 480 <longitude> ]</b></div><div class="yiv1749068626gmail_default"><br clear="none"></div><div class="yiv1749068626gmail_default">The large size is coming from a <b>time dimension</b> that it thinks is size 1024:</div></div>This has been reported as <a rel="nofollow" shape="rect" target="_blank" href="https://jira.ucar.edu/browse/NCL-2757">NCL 2757</a>. <br clear="none"><div><br clear="none"><b></b></div></div><div class="yiv1749068626gmail_extra"><br clear="none"><div class="yiv1749068626gmail_quote">On Sat, Jun 9, 2018 at 12:43 PM, Ehsan Taghizadeh <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br clear="none"><blockquote class="yiv1749068626gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv1749068626yqt2069647620" id="yiv1749068626yqt17582"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div style="font-size:16px;"><div style=""></div>
<div style="">Dears,<br clear="none">In the script to write nc format, <span><span style="">fn = "3_ERAI_Prec_2017_Jan_00_12_ 24_ncl.nc4",</span></span></div><div><font face="Helvetica Neue, Helvetica, Arial, sans-serif">which is created, has size of about 450 MB! However input file</font></div><div><span style="">fili = "2_ERAI_Prec_2017_Jan_00_12_<a rel="nofollow" shape="rect" target="_blank" href="http://12.nc">12.nc</a>"</span><br clear="none"></div><div><span style="">is less than 10 MB!</span></div><div><span style="">Also the file which was created with cdo: F_cdo = "<span>2_2_ERAI_Prec_2015_Jan_24_ cdo.nc4</span>", is less than 15 MB!</span></div><div><span style="">Could I ask why the created file in ncl has this large size?</span></div><div><span style="">Also how could I have a nc file with smaller size?</span></div><div><span style=""><br clear="none"></span></div><div><span style="">Sincerely</span></div><span class="yiv1749068626HOEnZb"><font color="#888888"></font></span><div><span style="">Ehsan</span></div><div><span style=""><br clear="none"></span></div><div style=""><br clear="none"></div>
</div><div><div class="yiv1749068626h5"><div class="yiv1749068626m_3262075252042782446yahoo_quoted" id="yiv1749068626m_3262075252042782446yahoo_quoted_8671744985">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Saturday, June 9, 2018, 1:23:31 AM GMT+4:30, Ehsan Taghizadeh <<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="yiv1749068626m_3262075252042782446yiv6691590915"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div></div>
<div>Thanks a lot. It works correctly.</div><div><br clear="none"></div><div>Sincerely</div><div>Ehsan</div><div><br clear="none"></div>
</div><div class="yiv1749068626m_3262075252042782446yiv6691590915yahoo_quoted" id="yiv1749068626m_3262075252042782446yiv6691590915yahoo_quoted_8571891142">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div class="yiv1749068626m_3262075252042782446yiv6691590915yqt3541515046" id="yiv1749068626m_3262075252042782446yiv6691590915yqtfd86237"><div>
On Saturday, June 9, 2018, 1:12:23 AM GMT+4:30, Dennis Shea <<a rel="nofollow" shape="rect" ymailto="mailto:shea@ucar.edu" target="_blank" href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="yiv1749068626m_3262075252042782446yiv6691590915"><div><div dir="ltr">offline:<br clear="none"><br clear="none">Please add the following <b>'filedimdef'</b> to what I previously sent.<br clear="none"><br clear="none">[SNIP] <br clear="none"><div>fileattdef(fo, fAtt)<br clear="none"><br clear="none"> <b>filedimdef(ncdf,"time",-1, True) ; make time UNLIMITED</b><br clear="none"><br clear="none"> var_name = "TP"<br clear="none"></div><div>[SNIP]<br clear="none"></div></div><div class="yiv1749068626m_3262075252042782446yiv6691590915yqt1211617854" id="yiv1749068626m_3262075252042782446yiv6691590915yqt74446"><div class="yiv1749068626m_3262075252042782446yiv6691590915gmail_extra"><br clear="none"><div class="yiv1749068626m_3262075252042782446yiv6691590915gmail_quote">On Fri, Jun 8, 2018 at 2:00 PM, Dennis Shea <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:shea@ucar.edu" target="_blank" href="mailto:shea@ucar.edu">shea@ucar.edu</a>></span> wrote:<br clear="none"><blockquote class="yiv1749068626m_3262075252042782446yiv6691590915gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr">Please use the 'simple method' to write netCDF:<br clear="none"><b><a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Applications/method_1.shtml">https://www.ncl.ucar.edu/ Applications/method_1.shtml</a></b><br clear="none"><br clear="none">===<br clear="none">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;; <br clear="none">;;;Start: writing tp3_ncl in nc file<br clear="none">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;; <br clear="none"> setfileoption("nc", "Format", "NetCDF4")<br clear="none"> dn = "./"<br clear="none"> fn = "3_ERAI_Prec_2017_Jan_00_12_ 24_ncl.nc4"<br clear="none"> pn = dn + fn ; path name<br clear="none"> system("/bin/rm -f " + pn)<br clear="none"><br clear="none"> fo = addfile(pn, "c")<br clear="none"><br clear="none"> fAtt = True ; assign file attributes<br clear="none"> fAtt@title = "ERAI: two-timestep sum"<br clear="none"> fAtt@source_file = fili<br clear="none"> fAtt@Conventions = "None"<br clear="none"> fAtt@creation_date = systemfunc("date")<br clear="none"> fileattdef(fo, fAtt)<br clear="none"><br clear="none">;============================= ============================== ========<br clear="none"> var_name = "TP"<br clear="none"> fo->$var_name$ = tp3_ncl<br clear="none"><br clear="none"></div><div class="yiv1749068626m_3262075252042782446yiv6691590915gmail_extra"><br clear="none"><div class="yiv1749068626m_3262075252042782446yiv6691590915gmail_quote"><div><div class="yiv1749068626m_3262075252042782446yiv6691590915h5">On Fri, Jun 8, 2018 at 8:31 AM, Ehsan Taghizadeh <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br clear="none"></div></div><blockquote class="yiv1749068626m_3262075252042782446yiv6691590915gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="yiv1749068626m_3262075252042782446yiv6691590915h5"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div></div>
<div>Dears,</div><div>I did some editions on previous script, and it seems works better.</div><div>However the problem about time dimensions. I'll be thankful if discard previous script and for any help about new attached file.</div><div><br clear="none"></div><div>Sincerely</div><span class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789HOEnZb"><font color="#888888"></font></span><div>Ehsan</div><div><br clear="none"></div>
</div><div><div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789h5"><div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yahoo_quoted" id="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yahoo_quoted_8643197209">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Friday, June 8, 2018, 5:54:04 PM GMT+4:30, Ehsan Taghizadeh <<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div></div>
<div>Dear Dennis,<br clear="none">Thank you so much for your script.</div><div>In your script, "<span>tp3_ncl</span>" is exactly what I need, as its values are the same as "<span>tp_cdo</span>" values.</div><div>However could I have any help to write this variable (tp3_ncl) in nc file, just like (tp) in (<span>2_ERAI_Prec_2015_Jan_00_12_<a rel="nofollow" shape="rect" target="_blank" href="http://12.nc">12 .nc</a></span>)?</div><div>I've added between 185-218, I've attached the script. However it is absolutely wrong.<br clear="none"></div><div><br clear="none"></div><div>I'll be thankful for any help.</div><div><br clear="none"></div><div>Sincerely</div><div>Ehsan</div><div><br clear="none"></div><div><br clear="none"></div>
</div><div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yahoo_quoted" id="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yahoo_quoted_9377141164">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Tuesday, June 5, 2018, 4:26:15 AM GMT+4:30, Dennis Shea <<a rel="nofollow" shape="rect" ymailto="mailto:shea@ucar.edu" target="_blank" href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966"><div><div dir="ltr"><div><div><div>I am going to add a few more items to a previous response:<br clear="none"><br clear="none"></div>The <b>Golden Rules of data processing are:<br clear="none"><br clear="none">(a) Look at your data!<br clear="none"></b></div><b>(b) Know your data!<br clear="none"></b></div><b>(c) Make sure *you* know what a function or tool is doing to your data<br clear="none"></b><div><div><div><b>---<br clear="none"><br clear="none"></b></div><div>The source netcDF '2_2_ERAI_Prec_2015_Jan_00_12_<a rel="nofollow" shape="rect" target="_blank" href="http://12.nc"> 12.nc</a>' was created from a GRIB file:<br clear="none"><br clear="none">history attribute:<br clear="none">2018-05-16 09:15:25 GMT by grib_to_netcdf-2.7.3: grib_to_netcdf /data/data05/scratch/3c/71/_ma rs-atls00-a562cefde8a29a7288fa 0b8b7f9413f7-b4mPzK.grib -o /data/data04/scratch/41/14/_gr ib2netcdf-atls17-a562cefde8a29 a7288fa0b8b7f9413f7-PZaKeY.nc -utime" ;<br clear="none"><br clear="none">---<br clear="none"></div><div>There are <b>62 time steps</b> on the source ERAI file:<br clear="none"><br clear="none"></div><div> yyyymmddhh tp value<br clear="none"></div><div>(0) ERAI: 2015010112 0.000330344 <b><=== only one value for this calendar day<br clear="none"><br clear="none"></b>(1) ERAI: 2015010200 0.0051588 ......<b> two time steps per calendar day</b> ...<br clear="none">(2) ERAI: 2015010212 0.00401913<br clear="none">(3) ERAI: 2015010300 0<br clear="none">(4) ERAI: 2015010312 0<br clear="none">(5) ERAI: 2015010400 0<br clear="none">(6) ERAI: 2015010412 0.000478998<br clear="none">(7) ERAI: 2015010500 0.00344653<br clear="none"></div><div>[SNIP]<br clear="none">(55) ERAI: 2015012900 0<br clear="none">(56) ERAI: 2015012912 0<br clear="none">(57) ERAI: 2015013000 9.35942e-05<br clear="none">(58) ERAI: 2015013012 7.15703e-05<br clear="none">(59) ERAI: 2015013100 0.00390901<br clear="none">(60) ERAI: 2015013112 0<br clear="none"><br clear="none">(61) ERAI: 2015020100 0.00183889<b> <=== only one value for this calendar day</b></div><div>---<br clear="none"></div><div>To what 'time' does the source ERAI 'time stamp apply"? <br clear="none">That is <b>***USER RESPONSIBILITY*** </b>to know or find the answer.<br clear="none"><br clear="none"></div><div>Three possibilities:<br clear="none"></div><div><br clear="none"></div><div>[1] beginning<br clear="none"></div><div>[2] end<br clear="none"></div><div>[3] 'center-of-mass' ... mid temporal time?<br clear="none"><br clear="none">---<br clear="none"></div><div>NCL's '<b>calculate_daily_values</b>' with <b>'ncrit=2</b>' requires two values on the <b>same calendar day</b><br clear="none"> <a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_daily_values.shtml">https://www.ncl.ucar.edu/ Document/Functions/ Contributed/calculate_daily_ values.shtml</a><br clear="none"><br clear="none"></div><div>With <b>ncrit=2</b> the function returns 30 values ... not 31 or 32. Why?<br clear="none"></div><div>Because it requires 2 values per calendar date. It ignores the 1st and last times because there is only one time step per calendar day<br clear="none"><br clear="none">tp2_ncl<br clear="none"> NCL_tag : calculate_daily_values: arith=sum<br clear="none"><br clear="none"> ----<br clear="none">The function 'tags' it with the <b>1st time step of each *complete* calendar day</b><br clear="none"><br clear="none">(0) NCL: 2015010200 0.00917792<br clear="none">(1) NCL: 2015010300 0<br clear="none">(2) NCL: 2015010400 0.000478998<br clear="none">(3) NCL: 2015010500 0.00879252<br clear="none"></div><div>[SNIP]<br clear="none">(28) NCL: 2015013000 0.000165164<br clear="none">(29) NCL: 2015013100 0.00390901<br clear="none"></div><div><br clear="none"></div><div>---<br clear="none"></div><div>The CDO takes the first two values [0,1], then the next two [2,3], etc. <br clear="none">It 'tags' the time as the 2nd time step<br clear="none"><br clear="none">(0) CDO: 2015010200 0.00548913<br clear="none">(1) CDO: 2015010300 0.00401912<br clear="none">(2) CDO: 2015010400 -1.08611e-10<br clear="none"></div><div>[SNIP]<br clear="none">(29) CDO: 2015013100 0.00398058<br clear="none">(30) CDO: 2015020100 0.00183889<br clear="none"><br clear="none"></div><div>Even though the time 'tags' are the same, they refer to different sums.<br clear="none"></div><div>---<br clear="none"></div><div> <br clear="none"></div><div>NCL can be made to handle the time and data any way the user wants.<b><br clear="none"><br clear="none"></b></div><div>I'll let you look at the attached script and output<b><br clear="none"></b></div><div><b><br clear="none"></b></div></div></div></div><div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966gmail_extra"><br clear="none"><div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966gmail_quote">On Fri, Jun 1, 2018 at 4:03 PM, Ehsan Taghizadeh <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br clear="none"><blockquote class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966yqt6078731353" id="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966yqt39650"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div></div>
<div>Dears,</div><div>About summation of 12 hours precipitation to obtain daily precipitation, as suggested me I used "cdo" and it seems work correctly:</div><div>"<span>cdo -b F32 -f nc4c -z zip timselsum,2 2_2_ERAI_Prec_2015_Jan_00_12_<a rel="nofollow" shape="rect" target="_blank" href="http://12.nc">1 2.nc</a> 2_2_ERAI_Prec_2015_Jan_24_cdo. nc4</span>"</div><div>However I like to know how writing nc files with "Geo2D".</div><div><br clear="none"></div><div>Sincerely</div><span class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966HOEnZb"><font color="#888888"></font></span><div>Ehsan<br clear="none"></div><div><div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966h5"><div><br clear="none"></div>
<div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yahoo_quoted" id="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yahoo_quoted_8329699892">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Thursday, May 31, 2018, 7:12:17 PM GMT+4:30, Ehsan Taghizadeh <<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div></div>
<div>Thank you so much for your nice replies.</div><div>With you comment, it seems work correctly. However I've added some changes to the script to have an output file same as input file, I mean about dimensions, attributes, and so on.</div><div>However I have some difficulties about it and I'll be thankful if I could have your help, again.</div><div>For example about</div><div><span></span><div>fout->tp24_1!1 = tp!1</div><div>fout->tp24_1!2 = tp!2</div><div>I encountered error. It seems they have conflict with following lines:</div><div><span></span><div>fout->latitude = fin->latitude</div><div>fout->longitude = fin->longitude</div><br clear="none"></div><div>Beside that I want to have "<span>tp24_1</span>" with dimension "Geo2D" to plot.</div><div>I attached new version of script, and I'll be thankful if I hear from you.</div><div><br clear="none"></div><div>Sincerley</div><div>Ehsan</div></div>
<div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636yahoo_quoted" id="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636yahoo_quoted_8737910354">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636yqt5050463565" id="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636yqtfd01829"><div>
On Thursday, May 31, 2018, 6:44:48 PM GMT+4:30, Dennis Shea <<a rel="nofollow" shape="rect" ymailto="mailto:shea@ucar.edu" target="_blank" href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636"><div><div dir="ltr"><div><div><div><div><div><div>The <b>golden rule</b> of data processing is <b>look at your data</b><br clear="none"><br clear="none"></div>You have:<br clear="none"><br clear="none">tp=f->tp ; <=== type 'short' [ packed data]<br clear="none"><br clear="none"></div>However, your file has:<br clear="none"><br clear="none"> <b>short</b> tp ( time, latitude, longitude )<br clear="none"> <b> scale_factor </b>: 5.505649013956001e-06<br clear="none"> <b>add_offset </b>: 0.1803980955369768<br clear="none"> _FillValue : -32767<br clear="none"> missing_value : -32767<br clear="none"> units : m<br clear="none"> long_name : Total precipitation<br clear="none"><br clear="none"></div>You <b>*MUST* </b>unpack the variable before computing the sums.<br clear="none"><br clear="none"></div>tp = <b>short2flt</b>(f->tp)<br clear="none"><br clear="none"></div>printVarSummary(tp)<br clear="none"></div>printMinMax(tp,0)<br clear="none"><br clear="none">===<br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml">https://www.ncl.ucar.edu/ Document/Functions/ Contributed/short2flt.shtml</a><br clear="none"><br clear="none"> <br clear="none"><div><div><div><div><br clear="none"><div><br clear="none"><br clear="none"></div></div></div></div></div></div><div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636gmail_extra"><br clear="none"><div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636gmail_quote">On Thu, May 31, 2018 at 7:19 AM, Ehsan Taghizadeh <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br clear="none"><blockquote class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636yqt4170128844" id="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636yqt57530"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div></div>
<div>Dears,<br clear="none">I've tried sum 12 hour precipitation to obtain 24 hour precipitation using attached script.</div><div>However it seems doesn't work correctly!</div><div>I had to sum tp(0,:,:)+tp(1,:,:), also tp(2,:,;)+tp(3,;,:), and so on.</div><div>I uploaded "<span>2_2_ERAI_Prec_2015_Jan_00_12_<a rel="nofollow" shape="rect" target="_blank" href="http://12.nc"> 12.nc</a></span>" in <span><a rel="nofollow" shape="rect" target="_blank" href="http://ftp.cgd.ucar.edu">ftp.cgd.ucar.edu</a>.</span></div><div><span>I'll be thankful if I hear from you.</span></div><div><span><br clear="none"></span></div><div><span>Sincerely</span></div><div><span>Ehsan</span></div><div><br clear="none"></div>
<div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636m_7922525286226352253yahoo_quoted" id="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636m_7922525286226352253yahoo_quoted_8511434241">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Wednesday, May 16, 2018, 8:23:32 AM GMT+4:30, Dennis Shea <<a rel="nofollow" shape="rect" ymailto="mailto:shea@ucar.edu" target="_blank" href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636m_7922525286226352253yiv0436690380"><div><div dir="ltr"><div><div><div><div><div><div><div><div>This is book keeping. Something like:<br clear="none"><br clear="none"></div>loop each year<br clear="none"></div> loop each month<br clear="none"></div> loop each day<br clear="none"> <br clear="none"></div> sum all values occurring between 00:00 and 11:59 inclusive ==>PRC(time,lat,lon,0)<br clear="none"></div> sum all values occurring between 12:00 and 23:59 inclusive ==>PRC(time,lat,lon,1)<br clear="none"><br clear="none"></div> end day<br clear="none"></div> end month<br clear="none"></div> end year<br clear="none"><div><div><div><div><div><div><br clear="none"></div></div></div></div></div></div></div><div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636m_7922525286226352253yiv0436690380gmail_extra"><br clear="none"><div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636m_7922525286226352253yiv0436690380gmail_quote">On Sun, May 13, 2018 at 9:07 AM, Ehsan Taghizadeh <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br clear="none"><blockquote class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636m_7922525286226352253yiv0436690380gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636m_7922525286226352253yiv0436690380yqt3390863335" id="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636m_7922525286226352253yiv0436690380yqt57552"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div>Hi every body;</div><div>Could I have any help to get daily precipitation from Era-Interim, please?</div><div>I mean, a way to sum "<span><span>accumulated precipitation from 00:00 to 12:00</span></span>" with "<span><span>accumulated precipitation from 12:00 to 24:00</span></span>"?</div><div><br clear="none"></div><div>Sincerely</div><span class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636m_7922525286226352253yiv0436690380HOEnZb"><font color="#888888"></font></span><div>Ehsan</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></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></div>
</div></div><div class="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636yqt5050463565" id="yiv1749068626m_3262075252042782446yiv6691590915m_5759331246281426789m_-3566686546299299742yiv7090685966m_-6783576671254890485yiv7438465636yqtfd15583">
</div></div></div></div></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></div>
</div>
</div></div>
</div>
</div></div></div></div></div><br clear="none"></div></div>______________________________ _________________<span class="yiv1749068626m_3262075252042782446yiv6691590915"><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/mailma n/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></span></blockquote></div><br clear="none"></div>
</blockquote></div><br clear="none"></div></div></div></div></div>
</div></div><div class="yiv1749068626m_3262075252042782446yiv6691590915yqt3541515046" id="yiv1749068626m_3262075252042782446yiv6691590915yqtfd81725">
</div></div></div></div></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></div>
</div>
</div></div></body></html>