Re: C and NCL

From: Mary Haley (haley AT ucar.edu)
Date: Tue Sep 13 2005 - 09:47:22 MDT


On Tue, 13 Sep 2005, Colleen Henry wrote:

> How do I use NCL code in a C program or vice versa? I have an overarching C program to manipulate data, but I want to use NCL to pull data from a netcdf file. Any help on how to "communicate" between NCL and C either way would be appreciated.

Hi Colleen,

You can call C subroutines from NCL. It's not a trivial process, but
there is an example at:

http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclExtend.shtml#Example_6

The process is much easier if you have a Fortran program, because then
you can add a couple of comment lines to your Fortran code, run WRAPIT,
and you're set to go. So, if you have a Fortran equivalent of your code,
I recommend this route. :-)

Otherwise, if you have trouble with the above, drop me a personal
email and I'll try to help.

--Mary

> ********************
> Colleen Henry
> Graduate Student
> Department of Earth and Atmospheric Sciences
> 550 Stadium Mall Dr.
> Purdue University
> West Lafayette, IN 47906
> chenry@purdue.edu
_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Tue Sep 13 2005 - 10:22:19 MDT