[ncl-talk] ncl scripts

David Brown dbrown at ucar.edu
Wed Mar 25 15:00:50 MDT 2015


Hi Henry,

Here is how I would describe the architecture:

At the low level is the NCAR Graphics library written in Fortran (we
call it the LLU for low level utilities). It has a C interface as
well. It talks to a GKS (Graphical Kernel System) library also written
in Fortran (with its own C interface), which in turn communicates
nowadays mainly with Cairo for device-level rendering.

The HLU library is written in C and relies on the LLU layer for many
but not all of its capabilities. Some HLU features are implemented
using direct interaction with the GKS layer.
The HLU library has C, Fortran, and NCL interfaces. Also Python (through PyNGL).
The NCL interface can be used in a manner similar to the C interface,
but most of the time, people use the gsun functions (written in NCL),
which hide a lot of the low-level object-oriented details of the HLU
interface.

I am not quite sure what you mean by the C graphics. Perhaps you
really mean the HLU library. If the NCL scripts that you want to
convert to C primarily use the gsun functions, then it will be quite a
bit of work to convert them in my opinion. I would definitely want to
do some profiling first to see where the bottlenecks are. NCL has
facilities for source-level profiling, but it has to be compiled with
that option turned on. If you are interested, we can help you get a
profiling-enabled version of NCL

Hope this helps.
 -dave


On Tue, Mar 24, 2015 at 3:44 AM, Henry Butowsky <henryb at hush.com> wrote:
> We are in the process of optimizing some ncl scripts by converting them
> to C.
>    As I understand it there are several graphics libraries
>    the ncl graphics stuff
>    the C grahics lib
>    The fortran graphics lib
>    The HLU library ( callable from ncl/C/fortran)
>
>     My plan is to replace the graphics part of the ncl scripts with HLU-
>     Then once we are a happy with the results convert the whole thing to
> C, using nhlcc wrapper function.
>     Would we be better off using the C graphics straight off ?
>
>     Many thanks
>     Henry
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk


More information about the ncl-talk mailing list