[gradsusr] Extracting variable description and units from control file for use in string/title

Joe Moore joe at wxjoe.com
Thu Jul 5 13:31:28 EDT 2012


Yeah! So I could do something like:

'q ctlinfo'
temp=sublin(result,10)
desc=substr(temp,10,20)
'draw string 4.5 8.3 description is 'desc

That could work, but I didn't know if there was a more simple way of going
about it.

-Joe

On Thu, Jul 5, 2012 at 12:00 PM, Jennifer Adams <jma at cola.iges.org> wrote:

> Did you try parsing the output from 'q ctlinfo' ? --Jennifer
>
> On Jul 5, 2012, at 11:47 AM, Joe Moore wrote:
>
> Hello all!
>
> I am looking for a method to extract a variable's description and units
> from the control file. For example, if I plot tmp2m, is there an easy way
> to extract the description of what tmp2m is from the control file so that I
> can use it on the plot in a string or title? I know I can print the
> available variables and other info with the 'q file' command, but to grab
> the description and unit from the resulting text seems to be a complex
> task. Since I know I can 'q time' to get the time info, is there a
> similarly simple way to grab a variable's description/unit?
>
> I've searched online for examples of how to do this but I can't find
> anything. Maybe I'm approaching my issue in the incorrect manner? I'm
> making plots of model data for a personal website on a regular basis (eg.
> similar to http://www.instantweathermaps.com/ or accuwx pro, but much,
> much less comprehensive). I can't use OpenDAP with my web server, so I'm
> using shell scripts + grads scripts.
>
> Thanks,
> Joe
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
>  --
> Jennifer M. Adams
> IGES/COLA
> 4041 Powder Mill Road, Suite 302
> Calverton, MD 20705
> jma at cola.iges.org
>
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120705/b29e7849/attachment-0003.html 


More information about the gradsusr mailing list