using environment variables in NCL script: arrays

From: Cathy Smith (NOAA Affiliate) <cathy.smith_at_nyahnyahspammersnyahnyah>
Date: Wed May 22 2013 - 10:42:16 MDT

NCL users
I call NCL scripts using Perl so I can change input parameters for the
script. For example, in Perl

$ENV{'psname'}=$name;

and in NCL

psname=(getenv("psname"))

I'd like to pass an array to NCL. How would I read this in NCL?

Perl would have something like

$ENV{'levels'}=@level_array;

and the array size could vary (though I can guarantee it to have at least 1 value). I have done this in the past by sending a netCDF file filled with the array values but would prefer to avoid the extra file.

Thanks for any suggestions!

Cathy Smith
 

-- 
----------------------------------------------
NOAA/ESRL PSD and CU CIRES
303-497-6263
http://www.esrl.noaa.gov/psd/people/cathy.smith/
Emails about data/webpages may get quicker responses from emailing 
esrl.psd.data@noaa.gov
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed May 22 10:42:27 2013

This archive was generated by hypermail 2.1.8 : Thu May 30 2013 - 11:38:10 MDT