pyroms maybe need update

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

pyroms maybe need update

#1 Unread post by liangliang »

Hi kate:
I find pyroms/hgrid.py have an line of code
from matplotlib.nxutils import points_inside_poly
matplotlib.nxutils has been removed from matplotlib since the last 1.3 versions(http://matplotlib.org/1.3.0/api/api_changes.html).
So When I type import pyroms, it shows an error:
No module named nxutils.
maybe it need update.
--chenzhen

liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

Re: pyroms maybe need update

#2 Unread post by liangliang »

I also try to install matplotlib 1.2.1, so it has nxutils module . But when I type import pyroms , it shows :
scrip.so not found . remapping function will not be available .
I have get scrip1.4.tar.gz from http://climate.lanl.gov/Software/SCRIP/#release and compiled it with no error . I can find scrip.o , scrip_test.o and etc . But i can not find scrip.so . Could you give me some advice ?

User avatar
rdussin
Posts: 8
Joined: Wed Jul 13, 2011 12:37 pm
Location: IMCS Rutgers

Re: pyroms maybe need update

#3 Unread post by rdussin »

hi chenzhen,

we also have found out this problem with new versions of matplotlib. The fix is done and is on its way
to github. Regarding the scrip.so, you need to compile scrip with f2py (make f2py).

best,
raphael

liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

Re: pyroms maybe need update

#4 Unread post by liangliang »

rdussin wrote:hi chenzhen,

we also have found out this problem with new versions of matplotlib. The fix is done and is on its way
to github. Regarding the scrip.so, you need to compile scrip with f2py (make f2py).

best,
raphael
Thank you ! I will have a try !

liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

Re: pyroms maybe need update

#5 Unread post by liangliang »

rdussin wrote:hi chenzhen,

we also have found out this problem with new versions of matplotlib. The fix is done and is on its way
to github. Regarding the scrip.so, you need to compile scrip with f2py (make f2py).

best,
raphael
Hi raphael
I find pyroms updated . I didn't use install_pyroms.sh to install pyroms before. So I have a try .
cd ../pyroms
sh install_pyroms.sh > install.log
get an error
makefile2:148: recipe for target 'scrip.so' failed
My compile is gfortran
I can find
./netcdf
./netcdf.h
./hdf5.h
./hdf5_hl.h
in usr/include

./libnetcdf.so.7
./libnetcdf.so
./libnetcdf.so.7.2.0
./libnetcdff.so
./libnetcdff.so.5
./libnetcdff.so.5.3.1
./libnetcdff.a
./libhdf5.so.8
./libhdf5.so
./libhdf5_hl.so.8.0.0
./libhdf5.so.8.0.0
./libhdf5_hl.so
./libhdf5.settings
./libhdf5_hl.so.8
in usr/lib

Could you give me some advice ? Some detail can be find in attachment
Thank you !
-chenzhen
Attachments
install.log
(7.68 KiB) Downloaded 510 times

User avatar
rdussin
Posts: 8
Joined: Wed Jul 13, 2011 12:37 pm
Location: IMCS Rutgers

Re: pyroms maybe need update

#6 Unread post by rdussin »

is f2py in your PATH ? what is your python version ? and OS ?
can you copy/paste the section of the makefile for f2py/scrip.so

best,
raphael

liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

Re: pyroms maybe need update

#7 Unread post by liangliang »

rdussin wrote:is f2py in your PATH ? what is your python version ? and OS ?
can you copy/paste the section of the makefile for f2py/scrip.so

best,
raphael
Hi raphael
Thank you for your reply ! My OS is Win7 64 , and I installed archlinux on Virtualbox .
I can find f2py in
/usr/lib/python2.7/site-packages/numpy/distutils/tests/f2py_ext
/usr/lib/python2.7/site-packages/numpy/distutils/tests/f2py_f90_ext
/usr/lib/python2.7/site-packages/numpy/f2py
/usr/lib/python2.7/site-packages/numpy/f2py/tests/src/assumed_shape/.f2py_f2cmap
/usr/lib/python2.7/site-packages/numpy/f2py/f2py2e.pyo
/usr/lib/python2.7/site-packages/numpy/f2py/f2py2e.py
/usr/lib/python2.7/site-packages/numpy/f2py/f2py_testing.pyc
/usr/lib/python2.7/site-packages/numpy/f2py/f2py_testing.pyo
/usr/lib/python2.7/site-packages/numpy/f2py/f2py2e.pyc
/usr/lib/python2.7/site-packages/numpy/f2py/f2py_testing.py
/usr/lib/python2.7/site-packages/numpy/f2py/f2py.1

I try to change python to python2 in install_pyroms.sh , but I still get some error .
The screen show :
[root@chenzhen pyroms]# sh /mnt/share/pyroms-master/pyroms/install_pyroms.sh > /mnt/share/install.log
error: Command "/usr/bin/gfortran -Wall -L$DESTDIR/lib build/temp.linux-i686-2.7/build/src.linux-i686-2.7/_isomodule.o build/temp.linux-i686-2.7/build/src.linux-i686-2.7/fortranobject.o build/temp.linux-i686-2.7/pyroms/src/iso.o -L/usr/lib -lpython2.7 -lgfortran -o build/lib.linux-i686-2.7/_iso.so" failed with exit status 1
error: Command "/usr/bin/gfortran -Wall -L$DESTDIR/lib build/temp.linux-i686-2.7/build/src.linux-i686-2.7/_isomodule.o build/temp.linux-i686-2.7/build/src.linux-i686-2.7/fortranobject.o build/temp.linux-i686-2.7/pyroms/src/iso.o -L/usr/lib -lpython2.7 -lgfortran -o build/lib.linux-i686-2.7/_iso.so" failed with exit status 1
make: Warning: File 'makefile' has modification time 1.3 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File 'makefile' has modification time 1.3 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File 'makefile' has modification time 1.4 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File 'makefile' has modification time 1.4 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File 'makefile' has modification time 1.4 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File 'makefile' has modification time 1.3 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File 'makefile' has modification time 1.3 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
File "<string>", line 1
import pyroms ; print pyroms.__path__[0]
^
SyntaxError: invalid syntax
cp: missing destination file operand after ‘libgridgen.so’
Try 'cp --help' for more information.
make: Warning: File 'makefile2' has modification time 1.5 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File 'makefile2' has modification time 1.4 s in the future
make: f2py: Command not found
make: *** [scrip.so] Error 127
make: Warning: File 'makefile2' has modification time 1.3 s in the future
/bin/cp: cannot stat ‘./scrip.so’: No such file or directory
make: *** [install] Error 1
cp: missing destination file operand after ‘scrip.so’
Try 'cp --help' for more information.


You can find some details in the attachment . Thank you !
--chenzhen
Attachments
makefile2.txt
../pyroms/externalscrip/source/makefile2
(4.51 KiB) Downloaded 526 times
makefile.txt
../pyroms/externalscrip/source/makefile
(4.51 KiB) Downloaded 504 times
install_pyroms.sh
(1.59 KiB) Downloaded 558 times
install.log
(17.53 KiB) Downloaded 475 times

User avatar
rdussin
Posts: 8
Joined: Wed Jul 13, 2011 12:37 pm
Location: IMCS Rutgers

Re: pyroms maybe need update

#8 Unread post by rdussin »

ok first you can fix the problem of libgridgen.so by simply copying it into the directory where pyroms is installed.

second, rename makefile2 as makefile and run "make f2py". What happens ?

liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

Re: pyroms maybe need update

#9 Unread post by liangliang »

rdussin wrote:ok first you can fix the problem of libgridgen.so by simply copying it into the directory where pyroms is installed.

second, rename makefile2 as makefile and run "make f2py". What happens ?
Thank you for your help ! I will have a try !

liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

Re: pyroms maybe need update

#10 Unread post by liangliang »

I try that , but got an error
make : f2py: Command not found
makefile : 148: recipe for target 'scrip.so' failed

User avatar
rdussin
Posts: 8
Joined: Wed Jul 13, 2011 12:37 pm
Location: IMCS Rutgers

Re: pyroms maybe need update

#11 Unread post by rdussin »

try : "which f2py" in a terminal. what happens ?

liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

Re: pyroms maybe need update

#12 Unread post by liangliang »

rdussin wrote:try : "which f2py" in a terminal. what happens ?
You are right . I did not have f2py which instead of f2py2.
I change F2PY = f2py2 in /scrip/source/makefile . and type
sh install_pyroms.sh > install.log # /pyroms
I still get an error .

The screen show :

[root@chenzhen pyroms]# sh install_pyroms.sh > install.log
rmbadname1: Replacing "string" with "string_bn".
rmbadname1: Replacing "string" with "string_bn".
error: Command "/usr/bin/gfortran -Wall -L$DESTDIR/lib build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/_isomodule.o build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/fortranobject.o build/temp.linux-x86_64-2.7/pyroms/src/iso.o -L/usr/lib -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/_iso.so" failed with exit status 1
error: Command "/usr/bin/gfortran -Wall -L$DESTDIR/lib build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/_isomodule.o build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/fortranobject.o build/temp.linux-x86_64-2.7/pyroms/src/iso.o -L/usr/lib -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/_iso.so" failed with exit status 1
make: Warning: File 'makefile' has modification time 1.9 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File 'makefile' has modification time 1.9 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File 'makefile' has modification time 1.9 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File 'makefile' has modification time 1.9 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File 'triangle.o' has modification time 0.92 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
install_pyroms.sh: line 34: python: command not found
cp: missing destination file operand after ‘libgridgen.so’
Try 'cp --help' for more information.
make: Warning: File 'makefile2' has modification time 2 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File 'remap_read.o' has modification time 0.18 s in the future
error: Command "/usr/bin/gfortran -Wall -L$DESTDIR/lib /tmp/tmpDF6Nrn/tmp/tmpDF6Nrn/src.linux-x86_64-2.7/scripmodule.o /tmp/tmpDF6Nrn/tmp/tmpDF6Nrn/src.linux-x86_64-2.7/fortranobject.o /tmp/tmpDF6Nrn/pyscrip.o kinds_mod.o constants.o iounits.o netcdf.o grids.o remap_vars.o remap_distwgt.o remap_conserv.o remap_bilinear.o remap_bicubic.o remap_read.o remap.o timers.o remap_write.o -L/usr/lib -L/usr/lib -lnetcdf -lnetcdff -lhdf5 -lhdf5_hl -lpython2.7 -lgfortran -o ./scrip.so" failed with exit status 1
make: *** [scrip.so] Error 1
/bin/cp: cannot stat ‘./scrip.so’: No such file or directory
make: *** [install] Error 1
cp: missing destination file operand after ‘scrip.so’
Try 'cp --help' for more information.
Attachments
install.log
(38.56 KiB) Downloaded 491 times

User avatar
bhatt.vihang
Posts: 11
Joined: Thu Aug 19, 2010 12:51 pm
Location: Indian Institute of Science

Re: pyroms maybe need update

#13 Unread post by bhatt.vihang »

If I may advise, do not use install pyroms script.

following easy steps by reading the script.

1) install bathy_smoother. this should give error with unable to find lp_slove that exist in external folder
2) go to lp_slove folder compile it for python using setup.py in lp_slove/extra/Python folder
3) install pyroms_toolbox
4) compile and install all external library individually in /usr/local/lib by giving --prefix=/usr/local with configure script (steps are shown in install_pyroms.sh)
5) to build scrip.so, if make f2py is not working, use make scrip.so. easy to do it that way.
6) install pyroms using setup.py
7) copy scrip.so (python-sitepackages path)/pyroms/remapping

Note: check each installation by importing install libs in python. it should not give any message if lib is completely installed.
check installatoin of pyroms_toolbox after installation of pyroms. Pyroms_toolbox should be installed prior to installing pyroms thogh.
I do not know why, but that is the case.


Happy pyromming. :D

liangliang
Posts: 61
Joined: Mon Jul 20, 2009 2:41 pm
Location: Port And Costal Engineering Laboratory

Re: pyroms maybe need update

#14 Unread post by liangliang »

Hi bhatt.vihang and rdussin:
Thank you for your help ! I have succeed install pyroms . I have refer to
http://houstonthereisaproblem.blogspot. ... -1072.html
It's very useful ! I aslo try python2 make_YELLOW_grd_v1.py and can get YELLOW_grd_v1.nc.
Thank you again !
--chenzhen

Post Reply