[ncl-talk] subprocess is undefined
Guido Cioni
guidocioni at gmail.com
Fri Apr 6 04:22:04 MDT 2018
Do you have NCL 6.5.? This function is only available there.
You can still use the "old" method that exploits Python. It works pretty well and you don't necessarily need to have a NCL "driver" script.
That's how I've modified task_parallelism_2.py
def launchTask(script):
task = subprocess.Popen("ncl " + script, shell=True, executable="/bin/bash")
return task
and then simply launch it from bash as
python task_parallelism.py plot_pres_t2m_winds10m.ncl plot_gph_t_850.ncl
BTW to the devs, the link https://www.ncl.ucar.edu/Document/Functions/Built-in/subprocess.shtml <https://www.ncl.ucar.edu/Document/Functions/Built-in/subprocess.shtml> is broken.
> On 6. Apr 2018, at 12:01, Seyed Omid Nabavi <seyed.omid.nabavi at univie.ac.at> wrote:
>
> Dear NCL users,
> I am trying to build a parallel task using
> https://www.ncl.ucar.edu/Applications/task_parallelism.shtml. But I
> receive the following error.
> fatal: Undefined identifier: (subprocess) is undefined, can't continue.
> Should I load any library for that?
> Best regards,
>
> --
> Dr. Seyed Omid Nabavi;
> University of Vienna,
> Faculty of Earth Sciences, Geography and Astronomy
> UZA II Althanstrasse 14 A-1010 Vienna
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Guido Cioni
http://guidocioni.altervista <http://guidocioni.altervista/>.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180406/2a24db4f/attachment.html>
More information about the ncl-talk
mailing list