[Thread Prev][Thread Next][Index]

Re: [ferret_users] building ferret configuring site_specific.mk



Hi Dave,

PyFerret provides all the same functionality as Ferret, including the Ferret prompt/interface, but does provide additional capabilities:
-- better graphics (uses Qt/PyQt instead of a very old X-Windows library that does not provide anti-aliasing)
-- allows use of system fonts (as well as the Ferret fonts which are seen as additional lines)
-- support for translucent colors
-- support for user-defined symbols
-- support for Ferret external functions written in Python
-- a large number of statistical functions that make use of the SciPy Python module
-- shapefile functions that make use of the PyShp Python module
-- it is a Python module and can be used as such by Python users (although typical use hides this fact as the default usage goes directly to the Ferret prompt)

PyFerret is a Python module that wraps the Ferret engine.  So all the Ferret functionality is present, but being a Python module has enable the improvements mentioned above.  Often just the first two items above are enough to convince users to use PyFerret instead of Ferret.  There has been some graphics display (Qt) issues with PyFerret on the latest Mac OSX systems, but it appears those are getting resolved.

You can just download the latest release source code from GitHub without having to use the git command.  There are links for both tar.gz and zip files at https://github.com/NOAA-PMEL/PyFerret/releases (or https://github.com/NOAA-PMEL/Ferret/releases if you really want Ferret instead).  Using the git command to make a local clone of the repository does allow easy updating of the source, but that is just a nice option and not a requirement.
 
For building, these releases will work with any NetCDF 4.x, although we usually recommend getting a recent version.  (We had been using 4.4.1.1 until recently.)
For PyFerret on Linux, either PyQt4 or PyQt5, Python2.x or Python3.x, and the default system libraries (development packages where needed) have all been working fine.

Best regards,
Karl


On Thu, Oct 4, 2018 at 3:43 PM Dave Burns <tburns@xxxxxxxxxx> wrote:
HI Karl, thanks for the reply.

On Thu, Oct 4, 2018 at 11:47 AM Karl Smith - NOAA Affiliate <karl.smith@xxxxxxxx> wrote:
Hi Dave,

Yes, for many of the newer "free" Linux systems, /usr/lib/x86_64-linux-gnu is the location of the libraries.

Are you building Ferret or PyFerret? 

Someone asked me to install ferret for them. Why are there two, what are the differences? If I install pyferret, do we get the same functionality?
 
We recommend the latter.  Also, if you are going to build from source, get the latest source (7.4.3) from GitHub:

I tried that, but the instructions for the github version seemed completely confusing, and I had a hunch that it needed some newer versions of the dependencies than are available to me. I haven't used github much.

 
The RHEL7 pre-built package might work, but I have not tested it on Ubuntu.

I have never had good luck trying that before, but I have to admit I did not try it this time. 

Thanks for the hints,
Dave
 

If you are building it, and if the site_specific.mk file specifies *_LIBDIR environment variables as in the latest versions, the "platform_specific.mk.*" files assume the include directories are in sibling subdirectories to the library directories - thus "../include" relative to the library subdirectory.  (Older version specifies the parent directory and assume an "include" and "lib" or "lib64" subdirectory.)  If this is not the case, the appropriate platform_specific.mk.* file will need to be tweaked to give the proper path to the include files.

Note that if you are using system libraries, you should just use the NetCDF shared object library - thus only specify NETCDF_LIBDIR and leave all the other locations blank.  The NetCDF location needs to be specified to find the include files, although since those are in a standard location, that probably isn't actually required as long as the development (usually something like "netcdf-devel") system package is installed.

There is also an Anaconda package for PyFerret, but being a sys admin I assume you would rather have a regular installation.

Best regards,
Karl






On Thu, Oct 4, 2018 at 1:14 PM Dave Burns <tburns@xxxxxxxxxx> wrote:

Hi Ryo and Martin! Thanks for your replies.

On Wed, Oct 3, 2018 at 9:44 PM Ryo Furue <furue@xxxxxxxxxx> wrote:
Hi Dave and Martin,

It says "insert the locations of the HDF5, NetCDF, and readline directories, and java". How do I figure out what those paths are and whether or not I have the correct software installed yet?

What operating system are you working on? 

Ubuntu.
 
Most OSes have standard or popular packaging systems. 

Too bad there is none for ferret. Yeah, I have installed netcdf as a package.

ncl-ncarg is already the newest version (6.3.0-6build1).
nco is already the newest version (4.5.4-1build1).
netcdf-bin is already the newest version (1:4.4.0-2).

 But that doesn't tell me where  the HDF5, NetCDF, and readline directories, and java are. Packages can put libraries in various places, which file or directory am I looking for in each case?

And which package should I install for HDF5? apt search HDF5 returns a million hits. I am installing 
h5utils/xenial 1.12.1-4 amd64
hdf5-helpers/xenial-updates,xenial-security 1.8.16+docs-4ubuntu1.1 amd64
hdf5-tools/xenial-updates,xenial-security 1.8.16+docs-4ubuntu1.1 amd64
hdfview/xenial 2.9-5 amd64

But which filename shall I search for? Ah libhdf5*


 On Wed, Oct 3, 2018 at 9:05 PM Martin Schmidt <martin.schmidt@xxxxxxxxxxxxxxxxx> wrote:

Hi Dave,

there are several options:

- if the machine you are working on is your PC, this is mostly /usr/local/bin and /usr/local /lib or /usr/local/lib64. The include files are in /usr/local/include. To check this, just issue

> which ncdump


# which ncdump
/usr/bin/ncdump
 

This shows you the path to ncdump. The case this is /usr/local/bin just issue

> ls /usr/local/lib/libnetcdf*


# ls /usr/lib/libnet*
/usr/lib/libnetpbm.so.10  /usr/lib/libnetpbm.so.10.0
root@:~# ls /usr/local/lib/libnet*
ls: cannot access '/usr/local/lib/libnet*': No such file or directory
root@:~# ls /usr/local/bin/libnet*
ls: cannot access '/usr/local/bin/libnet*': No such file or directory
root@:~# ls /usr/local/libnet*
ls: cannot access '/usr/local/libnet*': No such file or directory
root@:~# ls /usr/local/lib/libnet*
ls: cannot access '/usr/local/lib/libnet*': No such file or directory
root@:~# ls /usr/local/lib64/libnet*
ls: cannot access '/usr/local/lib64/libnet*': No such file or directory

 So I tried Ryo's idea:
# find /usr -iname '*libnetcdf*'
/usr/lib/x86_64-linux-gnu/libnetcdf_c++.so.4
/usr/lib/x86_64-linux-gnu/libnetcdf.so.11.0.0
/usr/lib/x86_64-linux-gnu/libnetcdf.so.11
/usr/lib/x86_64-linux-gnu/libnetcdf_c++.so.4.2.0

So that means /usr/lib/x86_64-linux-gnu is the value I put for NetCDF.

to see the location of the netcdf-library. If you used some system installers they may be in /usr/bin, /usr/lib and so on.

The same applies for hdf5.


Search for libhdf5? Yeah, that worked:
root@:~# find /usr -iname '*libhdf5*'
/usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10
/usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.2
/usr/lib/x86_64-linux-gnu/libhdf5_serial_fortran.so.10.0.2
/usr/lib/x86_64-linux-gnu/libhdf5_serial_fortran.so.10
/usr/lib/x86_64-linux-gnu/libhdf5_serialhl_fortran.so.10
/usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0
/usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10
/usr/lib/x86_64-linux-gnu/libhdf5_serialhl_fortran.so.10.0.2

 

- if the machine you are working on is a server, just look at the same place first. Otherwise ask the system administrator


Blush. I am the system administrator. But I don't know a thing about ferret, netcdf, etc. I always use packages, almost never compile anything.

root@:~# ls /usr/lib/x86_64-linux-gnu/libsz*
/usr/lib/x86_64-linux-gnu/libsz.so.2  /usr/lib/x86_64-linux-gnu/libsz.so.2.0.1

root@:~# ls /usr/lib/x86_64-linux-gnu/libread*
/usr/lib/x86_64-linux-gnu/libreadline.a  /usr/lib/x86_64-linux-gnu/libreadline.so

Looks like  /usr/lib/x86_64-linux-gnu is the answer in all cases.

Thanks!
Dave


--
Karl M. Smith, Ph.D.
JISAO Univ. Wash. and PMEL NOAA
"The contents of this message are mine personally and do
not necessarily reflect any position of the Government
or the National Oceanic and Atmospheric Administration."


--
Karl M. Smith, Ph.D.
JISAO Univ. Wash. and PMEL NOAA
"The contents of this message are mine personally and do
not necessarily reflect any position of the Government
or the National Oceanic and Atmospheric Administration."

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

Privacy Policy | Disclaimer | Accessibility Statement