<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 Rick,<div class=""><br class=""></div><div class="">Sadly, that’s not the problem. It occurs in the very first loop already.</div><div class=""><br class=""></div><div class="">However, I just commented out </div><div class=""><br class=""></div><div class="">;<span class="Apple-tab-span" style="white-space:pre"> </span>ncdf->lat_1 = lat_1</div><div class=""><br class=""></div><div class="">which is three lines above the line that doesn’t work, and now the script runs without problems. I still don’t understand why this is happening. Could it be a bug in NCL, some sort of problem with too many variables in an output file?<br class=""><div class=""><br class="webkit-block-placeholder"></div><div class="">Toni</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><br class=""><br class=""><b class="">Toni Klemm, Ph.D.<br class=""></b>Postdoctoral Research Associate<br class="">Department of Ecosystem Science and Management<br class="">College of Agriculture and Life Sciences<br class="">Texas A&M University, College Station, TX<br class=""><a href="http://www.toni-klemm.de" class="">www.toni-klemm.de</a> | <a href="http://www.twitter.com/toniklemm" class="">@toniklemm</a><br class="">Editorial Board member, <a href="http://www.eccforum.org" class="">Early Career Climate Forum</a><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""></div></div></div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Oct 23, 2019, at 2:43 PM, Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" class="">brownrig@ucar.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Calibri; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; 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;" class=""><div class="">Hi (offline for a moment):</div><div class=""><br class=""></div><div class="">I can not see the problem either. I note that the lines in question are in a doubly-nested loop. Does this error occur on the very first attempt at writing a netcdf? Each time through the loop(s), you are reassigning the filevariable ncdf -- I'm wondering if the "previous" file is not getting closed or perhaps the var ncdf retains some stale information? Perhaps just before the end of the "if (netCDF1) " statement, place a delete(ncdf), which somewhat counterintuitively, will close the file.</div><div class=""><br class=""></div><div class="">Rick<br class=""></div></div><br style="caret-color: rgb(0, 0, 0); font-family: Calibri; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; 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;" class=""><div class="gmail_quote" style="caret-color: rgb(0, 0, 0); font-family: Calibri; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; 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;"><div dir="ltr" class="gmail_attr">On Wed, Oct 23, 2019 at 1:03 PM Toni Klemm via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="overflow-wrap: break-word;" class="">Hello NCL Community,<div class=""><br class=""></div><div class="">I am perplexed by what seems to be a very simple error in my script (attached). I am analyzing gridded data for the U.S. Great Plains region and have divided the region into 6 parts, Northern, Central, and Southern Plains as well as each of them into east and west. </div><div class=""><br class=""></div><div class="">After analyzing the data I am assembling everything to save in an output file, but for some reason this line in my code</div><div class=""><br class=""></div><div class="">ncdf->lat_2 = lat_2</div><div class=""><br class=""></div><div class="">gets this error message and the program crashes:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Dimension sizes of left hand side do not match right hand side</span></div><div class=""><br class=""></div><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;" 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;" 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;" class=""><div class="">“lat_2” is the latitude dimension associated with the Central Plains data.</div><div class=""><br class=""></div><div class="">“lat_1” three lines above it does not get an error, but when I comment lat_2 out, then lat_3, three lines down, gets the same error.</div><div class=""><br class=""></div><div class="">I looked very carefully and changed the script in a number of ways, but I cannot find the reason for this error. lat_1 is longer than lat_2 and lat_3 (see below), but that shouldn’t be the reason.</div><div class=""><br class=""></div><div class=""><div class="">I did a printVarSummary on all three, but it didn’t give me any clues:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Variable: lat_1</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Type: float</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Total Size: 676 bytes</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> 169 values</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Number of Dimensions: 1</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Dimensions and sizes:<span style="white-space: pre-wrap;" class=""> </span>[lat | 169]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Coordinates: </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> lat: [42..49]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Number Of Attributes: 2</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> long_name :<span style="white-space: pre-wrap;" class=""> </span>latitude</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> units :<span style="white-space: pre-wrap;" class=""> </span>degrees_north</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188); min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Variable: lat_2</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Type: float</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Total Size: 580 bytes</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> 145 values</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Number of Dimensions: 1</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Dimensions and sizes:<span style="white-space: pre-wrap;" class=""> </span>[lat | 145]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Coordinates: </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> lat: [36..42]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Number Of Attributes: 2</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> long_name :<span style="white-space: pre-wrap;" class=""> </span>latitude</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> units :<span style="white-space: pre-wrap;" class=""> </span>degrees_north</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188); min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Variable: lat_3</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Type: float</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Total Size: 580 bytes</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> 145 values</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Number of Dimensions: 1</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Dimensions and sizes:<span style="white-space: pre-wrap;" class=""> </span>[lat | 145]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Coordinates: </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> lat: [30..36]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Number Of Attributes: 2</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> long_name :<span style="white-space: pre-wrap;" class=""> </span>latitude</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(34, 79, 188);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> units :<span style="white-space: pre-wrap;" class=""> </span>degrees_north</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><br class=""></span></div></div></div><div class="">Does anyone have a suggestion? I appreciate your help!</div><div class=""><br class=""></div><div class="">Tank you very much,</div><div class="">Toni</div><div class=""><br class=""></div><div class=""><br class=""><b class="">Toni Klemm, Ph.D.<br class=""></b>Postdoctoral Research Associate<br class="">Department of Ecosystem Science and Management<br class="">College of Agriculture and Life Sciences<br class="">Texas A&M University, College Station, TX<br class=""><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.toni-2Dklemm.de&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=sDafbGmyKPR5OQ8WtRt5k5Mo7DoX0xF9js_2lyVQZdE&s=OS40pGsx6HC0-JwGgMzYsIvQgnHirMy8x7lQ1OPcwfQ&e=" target="_blank" class="">www.toni-klemm.de</a> | <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.twitter.com_toniklemm&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=sDafbGmyKPR5OQ8WtRt5k5Mo7DoX0xF9js_2lyVQZdE&s=8187HO3W45kOnzV2tJWGiB-WuN9l4rtyMeaHDTvEHqY&e=" target="_blank" class="">@toniklemm</a><br class="">Editorial Board member, <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.eccforum.org&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=sDafbGmyKPR5OQ8WtRt5k5Mo7DoX0xF9js_2lyVQZdE&s=-lfhexfh0FBaS_GYU8rbB3vthAgLH5fzVyWB07-f3Qw&e=" target="_blank" class="">Early Career Climate Forum</a><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""></div></div></div></div></div></div></div><div style="overflow-wrap: break-word;" class=""><div class=""></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=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=sDafbGmyKPR5OQ8WtRt5k5Mo7DoX0xF9js_2lyVQZdE&s=CPhrZgPJaFLOgKilmyK2qkZkapwM62TOpy6F73wuchc&e=" rel="noreferrer" target="_blank" class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div></div></blockquote></div><br class=""></div></body></html>