Re: Is it possible to call an NCL script and pass data to it from a C script?

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Thu Nov 07 2013 - 09:54:50 MST

Hi Cathy,

There is an API to NCL functionality that allows one to *read* NCL variables/filevariables and execute scripts. Unfortunately there's no way to programmatically create and write to NCL variables and files, outside of executing lines of script. I think you're likely to have to use some sort of file to pass your 2D array. Perhaps a named pipe? In any case, you might look at the docs to see what is possible:

    http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclApi.shtml

Hope that helps…
Rick

On Nov 7, 2013, at 9:39 AM, Cathryn Meyer <cmeyer@wsi.com> wrote:

> I have an already-existing NCL script that reads in 2D temperature data from a grib file and plots it. However I want to be able to call the NCL script from the C code that generates the temperature data and simply pass the 2D array of float values into the NCL script from within the C code instead of having to print them out to a file first that NCL reads in.
>
> Is this possible?
>
> Thanks,
> Cathy
>
> --
> Cathryn Meyer |
> w: 978 983 6598 e: cathryn.meyer@weather.com
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Nov 7 09:54:57 2013

This archive was generated by hypermail 2.1.8 : Mon Nov 11 2013 - 09:45:33 MST