<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Debasish,<div class=""><br class=""></div><div class="">Try taking out the space between <i class="">systemfunc</i> and <i class="">(“date”) here:</i></div><div class=""><br class=""></div><div class=""><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">fAtt@creation_date = systemfunc ("date")</div></div></div></div></blockquote></div><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">which changes it to this:</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">fAtt@creation_date = systemfunc("date")</div></div></div></div></blockquote><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><br class=""></div></div></div></div></div></div></div></div></div></div><div class=""><br class=""></div><div class="">If that doesn’t solve it, try taking the spaces out of:</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""> fileattdef( fout, fAtt )</div></div></div></div></blockquote></div><div class=""><br class=""></div><div class="">to this</div><div class=""><br class=""></div><div class=""><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""> fileattdef(fout,fAtt )</div></div></div></div></blockquote></div></div><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Good luck,</div><div class="">Toni</div><div class=""><br class=""></div></div></div></div></div><div class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><font face="Calibri" class=""><br class=""></font></div><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><font face="Calibri" class=""><b class="">Toni Klemm, Ph.D.<br class=""></b>Postdoctoral Research Associate</font></div><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Department of Ecosystem Science and Management</div><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">College of Agriculture and Life Sciences</div><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Texas A&M University, College Station, TX</div><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><font face="Calibri" class="">Contributor to the <a href="http://www.eccforum.org" class="">Early Career Climate Forum</a><br class=""><a href="http://www.toni-klemm.de" class="">www.toni-klemm.de</a> | <a href="http://twitter.com/toniklemm" class="">@toniklemm</a></font></div><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><font face="Calibri" class=""><br class=""></font></div><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><font face="Calibri" class=""><br class=""></font></div></div></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Nov 30, 2018, at 12:09 PM, Debasish Hazra <<a href="mailto:debasish.hazra5@gmail.com" class="">debasish.hazra5@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">Thanks Toni. I switched the lines, but it still show error at </div><div class=""> fileattdef( fout, fAtt ) </div><div class="">and odes not create netcdf file. I think the problem comes from this line : </div><div class="">fAtt@creation_date = systemfunc ("date")</div><div class="">Do I have to define date before ?</div><div class="">Debasish<br class=""></div></div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Fri, Nov 30, 2018 at 12:55 PM Toni Klemm <<a href="mailto:toni-klemm@tamu.edu" class="">toni-klemm@tamu.edu</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class="">Hi Debasish,<div class=""><br class=""></div><div class="">That’s because you create the variable fAtt *after* you assign it the creation date. You need to create it *before* you assign any attributes to it. Just switch these two lines:</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">fAtt@creation_date = systemfunc ("date")</div></div></div></div></blockquote></div><div class=""><div class="">
<div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; word-wrap: break-word; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; word-wrap: break-word; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; word-wrap: break-word; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; word-wrap: break-word; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word; line-break: after-white-space;" class=""><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">fAtt               = True</div></div></div></div></blockquote><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><br class=""></div>to this</div><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><br class=""></div><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><div class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div class=""><div class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">fAtt               = True</div></div></div></div></blockquote><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><blockquote type="cite" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">fAtt@creation_date = systemfunc ("date")</div></div></div></div></blockquote></div><div class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><br class=""></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">and it should work.</div><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><br class=""></div><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><br class=""></div><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">Best of luck,</div><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">Toni</div><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><br class=""><font face="Calibri" class=""><br class=""></font></div><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><font face="Calibri" class=""><b class="">Toni Klemm, Ph.D.<br class=""></b>Postdoctoral Research Associate</font></div><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">Department of Ecosystem Science and Management</div><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">College of Agriculture and Life Sciences</div><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">Texas A&M University, College Station, TX</div><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><font face="Calibri" class="">Contributor to the <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.eccforum.org&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=AhPAW_80wDzCMtnVlNa6lt6ob2Ry8twXpfcse-Zzyo0&s=dkIA-iN1GiZcr9S2dVSIsYTWqjsxn3SBNsX76k0PMPM&e=" target="_blank" class="">Early Career Climate Forum</a><br class=""><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.toni-2Dklemm.de&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=AhPAW_80wDzCMtnVlNa6lt6ob2Ry8twXpfcse-Zzyo0&s=VhxrGEIcsx_bmsihHPNLUGS4bru6-0m_Prt036iyrzk&e=" target="_blank" class="">www.toni-klemm.de</a> | <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__twitter.com_toniklemm&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=AhPAW_80wDzCMtnVlNa6lt6ob2Ry8twXpfcse-Zzyo0&s=W2NJGiF2TmAEPo2hBAy4USeevwdcKTq_BjCPqYjQoMY&e=" target="_blank" class="">@toniklemm</a></font></div><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><font face="Calibri" class=""><br class=""></font></div><div style="font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><font face="Calibri" class=""><br class=""></font></div></div></div><br class="m_799958867727905807Apple-interchange-newline"></div><br class="m_799958867727905807Apple-interchange-newline"></div><br class="m_799958867727905807Apple-interchange-newline"></div><br class="m_799958867727905807Apple-interchange-newline"><br class="m_799958867727905807Apple-interchange-newline">
</div>
<div class=""><br class=""><blockquote type="cite" class=""><div class="">On Nov 30, 2018, at 11:47 AM, Debasish Hazra <<a href="mailto:debasish.hazra5@gmail.com" target="_blank" class="">debasish.hazra5@gmail.com</a>> wrote:</div><br class="m_799958867727905807Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">Hi,</div><div class="">I am regridding data and trying to write that in netcdf file but getting error :</div><div class=""><br class=""></div><div class="">     data_regrid = ESMF_regrid(data2,opt)<br class="">      printVarSummary(data_regrid)<br class="">      printMinMax(data_regrid,0)</div><div class="">      ; write netCDF the 'simple' way<br class="">      start_write_time = get_cpu_time()<br class="">      fout  = addfile ("./2016/Regrid/<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__GPM-5F3IMERGDL-5F05-5FprecipitationCal.20160601.nc&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=m6TpKEa7O0Cj3dUZmxrnPvld1cZSrJU2iAFWlhkU_3c&s=s9u-rRMRy_zB-nNalwPJbIwsn969qj_oSze9O9jJcWE&e=" target="_blank" class="">GPM_3IMERGDL_05_precipitationCal.20160601.nc</a>", "c")<br class="">      fAtt@creation_date = systemfunc ("date")<br class="">      fAtt               = True<br class="">      fAtt@Conventions   = "None"<br class="">      fAtt@title         = "Regrid: 0.1 to 0.25 grid via ESMF interpolation"<br class="">      fAtt@source_file   =  "<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__g4.subsetted.GPM-5F3IMERGDL-5F05-5FprecipitationCal.20160601.180W-5F90S-5F180E-5F90N.nc&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=m6TpKEa7O0Cj3dUZmxrnPvld1cZSrJU2iAFWlhkU_3c&s=_wD-kFpaARvGRdB7kAc3f76mIpQWtI5rrl7v1_kGXzI&e=" target="_blank" class="">g4.subsetted.GPM_3IMERGDL_05_precipitationCal.20160601.180W_90S_180E_90N.nc</a>"<br class="">      fileattdef( fout, fAtt )<br class="">      fout->data_regrid = precip<br class="">      end_write_time = get_cpu_time()</div><div class=""><br class=""></div><div class="">But geting the following error : fatal:Variable (fAtt) is undefined, can not assign attribute (creation_date).Any help on how to fix fAtt error ?</div><div class=""><br class=""></div><div class="">Thanks</div><div class="">Debasish</div></div></div></div>
_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class=""><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.ucar.edu_mailman_listinfo_ncl-2Dtalk&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=AhPAW_80wDzCMtnVlNa6lt6ob2Ry8twXpfcse-Zzyo0&s=29ChGHh36O1jDtQZPh_lATDDQDZhDZiwN098O0cqZMw&e=" target="_blank" class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div>
</div></blockquote></div><br class=""></div></body></html>