<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hi, Christoph -- <div>The 'read' function in the scripting language boils down to a call to 'fgets' with a hard-coded size limit of RSIZ-3 (where RSIZ is defined to be 600). I'm not sure why this limit is 600, but it could probably be changed for version 2.0.  In the meanwhile, you can call 'read' in your script two (or more) times and concatenate the results to get a complete line from your input file. This technique was implemented in the basemap.gs script because some of the lines in the polygon ascii files were very long. Relevant scripts lines from basemap.gs are copied below, but they are based on the premise that there is known text at the beginning of the line (in this case, the 5th word of each line in the ascii file is "draw"). You may need to modify this code for your application to distinguish between a reading of a new line and the reading of the continuation of a really long line. </div><div>--Jennifer</div><div><br class="webkit-block-placeholder"></div><div><div><br class="webkit-block-placeholder"></div><div>* Read the first record from the polygon file</div><div>result = read(file)</div><div>rc = sublin(result,1)</div><div>rc = subwrd(rc,1)</div><div>if (rc!=0)</div><div>  say 'Error reading 'file</div><div>  return</div><div>endif</div><div>nwcmd = sublin(result,2)</div><div>* Read subsequent records, allowing for read input buffer overflow</div><div>flag = 1</div><div>while (flag)</div><div>  ignore = 0</div><div>  wcmd = nwcmd</div><div>  while(1)</div><div>    result = read(file)</div><div>    rc = sublin(result,1)</div><div>    rc = subwrd(rc,1)</div><div>    if (rc!=0)</div><div>      flag = 0</div><div>      break</div><div>    else </div><div>      nwcmd = sublin(result,2)</div><div>    if (subwrd(nwcmd,5) != 'draw') </div><div>        wcmd = wcmd % nwcmd</div><div>      else</div><div>        break</div><div>      endif</div><div>    endif</div><div>  endwhile</div><div>* now do something with line read from the file which is stored in wcmd</div><div>endwhile</div></div><div><br class="webkit-block-placeholder"></div><div><div><div>On Nov 23, 2007, at 5:49 AM, Stegert wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Dear GrADSusers,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I tried to read in an ASCII data set (m by n matrix</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">corresponding to my model area defined in the .ctl)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">and found, that GrADS only read the first 576 letters</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">(if I counted right) and cut the rest.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">When reducing the length of the lines, all went well.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Can anyone related to the development of GrADS confirm</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">this limitation? And, is it possible to overcome this</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">limit in future GrADS releases?</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I'm actually using GrADS 1.8SL11 on WinXP.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Cheers, Christoph</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">--</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Christoph Stegert:<span class="Apple-converted-space">  </span>Ecological Modelling group</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Institut für Meereskunde - Universität Hamburg, Germany</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Zentrum f. Marine u. Atmosphärische Wissenschaften ZMAW</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Bundesstr.53, 20146 Hamburg - Phone: +49-40/ 42838-7486</div> </blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></span> </div><br></div></body></html>