Steve,<br><br>Thanks so much - I didn't even notice this. I thought I was going crazy!<br><br>-Joe<br><br><div class="gmail_quote">On Sun, Sep 4, 2011 at 11:51 AM, Stephen McMillan <span dir="ltr"><<a href="mailto:smcmillan@planalytics.com">smcmillan@planalytics.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello Joe,<br><br>Your time query is introducing a space into the "day" variable. PRINTIM doesn't like spaces in the filename string. Try this instead:<br>
<span style="font-family:courier new,monospace">day=substr(result, 11, 9)</span><br>
<br>It should work with above change.<br><br>Stephen McMillan<br><div class="gmail_quote"><div><div></div><div class="h5">On Sat, Sep 3, 2011 at 4:53 PM, Joe Moore <span dir="ltr"><<a href="mailto:joe@wxjoe.com" target="_blank">joe@wxjoe.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div></div><div class="h5">Greetings!<br><br>I'm just getting started with GrADS and I'm still a beginner, but I'm having a problem that I can't seem to resolve from reading the documentation and searching online, including the archives of this mailing list.<br>
<br>Problem: When using a variable in the filename to save the output, I'm getting an error. <br><br>Here's the relevant code:<br><br><span style="font-family:comic sans ms,sans-serif">'printim out/RTMA_TMP_'day'_'hr'.png'</span><br style="font-family:comic sans ms,sans-serif">
<br>where I am defining the variable day and hour using the following:<br><span style="font-family:courier new,monospace">'q time'</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">hr=substr(result, 8, 2)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">day=substr(result, 11, 10)</span><br><br>The result of which, when I print as a string or in the title, comes out to be 23 for the hour and 16AUG2011.<br><br>Expect result: I should have a file output called RTMA_TMP_16AUG2011_23.png<br>
<br>What actually is happening: The file output is just called RTMA_TMP_23AUG2011 (that's it- no .png) and when I run I get the following error: PRINTIM error: Invalid option; ignored<br><br>I've been able to sometimes get this to work, like if I put a few characters (not including an underscore or period) in the output filename - but I can't figure it out. I'd like to use either underscores, dashes or periods to separate the variables in the output file name, and I've seen it done in example scripts I've found on the web.<br>
<br>Configuration: I am running OpenGrADS 2.0.a9.oga.1 on Ubuntu 11.04. The data is coming from the RTMA grib2 from the NOAA NOMADS server. Here is my full grads config info:<br><span style="font-family:courier new,monospace">ga-> q config</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">Config: v2.0.a9.oga.1 little-endian readline printim grib2 netcdf hdf4-sds hdf5 opendap-grids,stn athena geotiff shapefile</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">Grid Analysis and Display System (GrADS) Version 2.0.a9.oga.1</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">Copyright (c) 1988-2010 by Brian Doty and the</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">Institute for Global Environment and Society (IGES) </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">This program is distributed WITHOUT ANY WARRANTY </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">See file COPYRIGHT for more information. </span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">Built Mon Oct 4 14:16:26 EDT 2010 for i686-pc-linux-gnu</span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">This version of GrADS has been configured with the following options:</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> o Built on a LITTLE ENDIAN machine</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> o Athena Widget GUI ENABLED</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> o Command line editing ENABLED </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> <a href="http://tiswww.case.edu/php/chet/readline/rltop.html" target="_blank">http://tiswww.case.edu/php/chet/readline/rltop.html</a> </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> o printim command for image output ENABLED </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> <a href="http://www.zlib.net" target="_blank">http://www.zlib.net</a> </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> <a href="http://www.libpng.org/pub/png/libpng.html" target="_blank">http://www.libpng.org/pub/png/libpng.html</a> </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> <a href="http://www.libgd.org/Main_Page" target="_blank">http://www.libgd.org/Main_Page</a> </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> o GRIB2 interface ENABLED </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> <a href="http://www.ijg.org" target="_blank">http://www.ijg.org</a> </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> <a href="http://www.ece.uvic.ca/%7Emdadams/jasper" target="_blank">http://www.ece.uvic.ca/~mdadams/jasper</a> </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> <a href="http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2" target="_blank">http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2</a> </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> g2clib-1.1.8 </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> o NetCDF interface ENABLED </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> <a href="http://www.unidata.ucar.edu/software/netcdf" target="_blank">http://www.unidata.ucar.edu/software/netcdf</a> </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> netcdf 4.1.1 of Jul 10 2010 23:36:25 $ </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> o OPeNDAP gridded data interface ENABLED</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> o OPeNDAP station data interface ENABLED</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> <a href="http://iges.org/grads/gadoc/supplibs.html" target="_blank">http://iges.org/grads/gadoc/supplibs.html</a> </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> libgadap 2.0.oga.1 </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> o HDF4 and HDF5 interfaces ENABLED </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> <a href="http://hdfgroup.org" target="_blank">http://hdfgroup.org</a> </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> HDF 4.2r3 </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> HDF5 1.8.4 </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> o GeoTIFF and KML/TIFF output ENABLED</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> <a href="http://www.libtiff.org" target="_blank">http://www.libtiff.org</a> </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> <a href="http://geotiff.osgeo.org" target="_blank">http://geotiff.osgeo.org</a> </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> o KML contour output ENABLED</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> o Shapefile interface ENABLED</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> <a href="http://shapelib.maptools.org" target="_blank">http://shapelib.maptools.org</a> </span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">For additional information please consult <a href="http://iges.org/grads" target="_blank">http://iges.org/grads</a></span><br>
<br>Not sure if its needed, but here is also the code I am using: <a href="http://pastebin.com/hHuXR6ae" target="_blank">http://pastebin.com/hHuXR6ae</a> (There's a few comments and irrelevant things as this has been my sandbox script to learn new things.) <br>
<br>Thanks in advance for any and all assistance!<br><font color="#888888"><br>-Joe Moore<br>
</font><br></div></div>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br>
<pre>***************************************************
The information contained in this e-mail message
is intended only for the use of the recipient(s)
named above and may contain information that is
privileged, confidential, and/or proprietary.
If you are not the intended recipient, you may not
review, copy or distribute this message. If you have
received this communication in error, please notify
the sender immediately by e-mail, and delete the original message.
***************************************************
</pre><br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br>