Re: NCL own functions

From: Will Hobbs <Will.Hobbs_at_nyahnyahspammersnyahnyah>
Date: Wed Sep 11 2013 - 03:27:43 MDT

Marston

As long as your function is defined as outlined as described in the documentation: ( http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclStatements.shtml#FunctionAndProcedureDefinitions ), then you can just save it as e.g. Marstonfunc.ncl

To call it from another script, use the 'load' command as you would if you were using a contributed or csm function, i.e.

load "<filepath>/Marstonfunc.ncl"

Will

From: Marston Johnston <shejo284@gmail.com<mailto:shejo284@gmail.com>>
Date: Wednesday, 11 September 2013 7:20 PM
To: "ncl-talk@ucar.edu<mailto:ncl-talk@ucar.edu>" <ncl-talk@ucar.edu<mailto:ncl-talk@ucar.edu>>
Subject: NCL own functions

Hi,

I've been developing my own NCL function that I would like to keep in a common file
and be able to call these functions from other NCL scripts, much like importing the header files in C or importing modules in Python.
Is there a way to do this? How should this file look and where should it be located?

Appreciate the help,
/Marston

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Sep 11 03:28:41 2013

This archive was generated by hypermail 2.1.8 : Mon Sep 16 2013 - 13:43:52 MDT