[Thread Prev][Thread Next][Index]

[ferret_users] Re: Running a script file with argument inside PyFerret



Answering my own question here.
Steps below did the trick:

com = "go script_name.jnl %f %f" % (lon, lat)
pyferret.run(com)

On Sat, Apr 29, 2017 at 7:05 PM, Lijo Abraham Joseph <lijo@xxxxxxxxxxx> wrote:
Dear Ferreters,
                      I have a .jnl file which takes two arguments (lon and lat). I have my lat and lon variables incremented in a loop inside python and in that loop I am using the command pyferret.run('go script_name.jnl lon lat'). However, instead of passing the value stored in lon and lat, python is just passing the names and thereby causing the error "LON and LAT unknown data" to pop out. What should I do to pass the value stored in lat and lon to pyferret.run()?

--- 
Lijo Abraham Joseph
M.Sc Ocean and Atmospheric sciences
Batch 2015-17
University of Hyderabad



--
Lijo Abraham Joseph
M.Sc Ocean and Atmospheric sciences
Batch 2015-17
University of Hyderabad

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement