Dear Ferret/PyFerret community,
I'm using PyFerret as a Python module to take adavantage of Ferret's scat2gridgauss_xy external function, but, I've probably misunderstood the use of pyferret.putdata command. I'm not an experienced Python programmer.
The lon,lat,val triple is currently in my Python session as distinct lists which I convert to numpy arrays when I create python dictionaries to use as putdata arguments:
lon_dict = {'name': 'lons', 'data': np.asarray(lon), 'title': 'Longitudes'}
lat_dict = {'name': 'lats', 'data': np.asarray(lat), 'title': 'Latitudes'}
val_dict = {'name': 'prec', 'data': np.asarray(val), 'title': 'INMET Prec'}
When I send these variables to Ferret's session, I notice any variable were passed:
pyferret.start()
pyferret.putdata(lon_dict)
pyferret.putdata(lat_dict)
pyferret.putdata(val_dict)
pyferret.run('show data')
The code snippet above returns messages showing that Ferret session started but no data were loaded:
NOAA/PMEL TMAP
FERRET v6.82 (PyFerret 0.0.9)
Linux 3.2.0-27-generic - 08/06/12
16-Apr-14 18:42
currently SET data sets:
and here
../../documentation/pyferret/example-sessions-python
My question is: what am I doing wrong?
Thanks!