[ncl-talk] Pass a string to ncl via csh that contains a space (Annie Seagram)

Ivica Janekovic ivica.jan at gmail.com
Wed Mar 23 18:31:29 MDT 2016


On Wed, 2016-03-23 at 11:58 -0600, ncl-talk-request at ucar.edu wrote:
> Pass a string to ncl via csh that contains a space (Annie Seagram)

Think you have to use ${title}, this is the case in bash at least.
So, I would make it like:
#!/bin/bash
title = "Thisisatitle"
ncl "year=2014" "month=5" "title=\"${title}\"" myscript.ncl



and in myscript.ncl should have something at the beginning like:

if(.not.isvar("title")) then
title="something default"
end if

if(.not.isvar("year")) then
year=2015
end if




More information about the ncl-talk mailing list