Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Sun Sep 23, 2018 4:19 pm




Post new topic Reply to topic  [ 12 posts ] 

All times are UTC

Author Message
PostPosted: Tue Nov 14, 2017 8:47 pm 
Hi all,
I tried to install PyCNAL on anaconda, I followed the direction of https://github.com/ESMG/PyCNAL, but at the step check the paths in the install script and see if it runs..., I got errors , I have installed gfortran_osx-64,Is there any one having suggestions?
Code:
installing pycnal...

running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_py
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building extension "pycnal._interp" sources
f2py options: []
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal/fortranobject.c' to sources.
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal' to include_dirs.
building extension "pycnal._obs_interp" sources
f2py options: []
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal/fortranobject.c' to sources.
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal' to include_dirs.
  adding 'build/src.macosx-10.6-x86_64-3.5/pycnal/_obs_interp-f2pywrappers.f' to sources.
building extension "pycnal._remapping" sources
f2py options: []
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal/fortranobject.c' to sources.
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal' to include_dirs.
building extension "pycnal._remapping_fast" sources
f2py options: []
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal/fortranobject.c' to sources.
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal' to include_dirs.
building extension "pycnal._remapping_fast_weighted" sources
f2py options: []
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal/fortranobject.c' to sources.
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal' to include_dirs.
building extension "pycnal._iso" sources
f2py options: []
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal/fortranobject.c' to sources.
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal' to include_dirs.
build_src: building npy-pkg config files
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize Gnu95FCompiler
Found executable /Users/xiaohuizhou/anaconda3/bin/gfortran
customize Gnu95FCompiler
customize Gnu95FCompiler using build_ext
Warning: distutils distribution has been initialized, it may be too late to add an extension _interpWarning: distutils distribution has been initialized, it may be too late to add an extension _obs_interpWarning: distutils distribution has been initialized, it may be too late to add an extension _remappingWarning: distutils distribution has been initialized, it may be too late to add an extension _remapping_fastWarning: distutils distribution has been initialized, it may be too late to add an extension _remapping_fast_weightedWarning: distutils distribution has been initialized, it may be too late to add an extension _isorunning install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_py
running install_lib
running install_egg_info
Removing /Users/xiaohuizhou/python/lib/python3.5/site-packages/pycnal-0.1.0-py3.5.egg-info
Writing /Users/xiaohuizhou/python/lib/python3.5/site-packages/pycnal-0.1.0-py3.5.egg-info
running install_clib
customize UnixCCompiler
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building extension "pycnal._interp" sources
f2py options: []
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal/fortranobject.c' to sources.
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal' to include_dirs.
building extension "pycnal._obs_interp" sources
f2py options: []
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal/fortranobject.c' to sources.
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal' to include_dirs.
  adding 'build/src.macosx-10.6-x86_64-3.5/pycnal/_obs_interp-f2pywrappers.f' to sources.
building extension "pycnal._remapping" sources
f2py options: []
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal/fortranobject.c' to sources.
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal' to include_dirs.
building extension "pycnal._remapping_fast" sources
f2py options: []
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal/fortranobject.c' to sources.
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal' to include_dirs.
building extension "pycnal._remapping_fast_weighted" sources
f2py options: []
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal/fortranobject.c' to sources.
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal' to include_dirs.
building extension "pycnal._iso" sources
f2py options: []
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal/fortranobject.c' to sources.
  adding 'build/src.macosx-10.6-x86_64-3.5/build/src.macosx-10.6-x86_64-3.5/pycnal' to include_dirs.
build_src: building npy-pkg config files
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize Gnu95FCompiler
Found executable /Users/xiaohuizhou/anaconda3/bin/gfortran
customize Gnu95FCompiler
customize Gnu95FCompiler using build_ext
running install_lib
running install_egg_info
Removing /Users/xiaohuizhou/python/lib/python3.5/site-packages/pycnal-0.0.0-py3.5.egg-info
Writing /Users/xiaohuizhou/python/lib/python3.5/site-packages/pycnal-0.0.0-py3.5.egg-info
running install_clib
customize UnixCCompiler
Warning: distutils distribution has been initialized, it may be too late to add an extension _interpWarning: distutils distribution has been initialized, it may be too late to add an extension _obs_interpWarning: distutils distribution has been initialized, it may be too late to add an extension _remappingWarning: distutils distribution has been initialized, it may be too late to add an extension _remapping_fastWarning: distutils distribution has been initialized, it may be too late to add an extension _remapping_fast_weightedWarning: distutils distribution has been initialized, it may be too late to add an extension _isoinstalling external libraries...
installing gridgen...
Using prefix /Users/xiaohuizhou/python
Using libdir /Users/xiaohuizhou/python/lib
checking for gcc... gcc
checking for C compiler default output file name... rm: a.out.dSYM: is a directory
a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking for ar... ar
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking for main in -lm... yes
checking for realloc... yes
checking for strtod... yes
checking for strtok... yes
checking for hypot... yes
checking for -fno-force-mem option... no
configure: creating ./config.status
config.status: creating makefile
config.status: creating config.h
config.status: config.h is unchanged
/bin/sh mkinstalldirs /Users/xiaohuizhou/python/bin /Users/xiaohuizhou/python/lib /Users/xiaohuizhou/python/include
for i in libnn.a; do \
      /usr/bin/install -c -m 644 $i /Users/xiaohuizhou/python/lib/$i; \
   done
for i in nn.h; do \
      /usr/bin/install -c -m 644 $i /Users/xiaohuizhou/python/include; \
   done
for i in minell nnbathy; do \
      fname=`basename $i`; \
      /usr/bin/install -c $i /Users/xiaohuizhou/python/bin; \
   done
Using prefix /Users/xiaohuizhou/python
Using libdir /Users/xiaohuizhou/python/lib
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking for ar... ar
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking for main in -lm... yes
checking for realloc... yes
checking for hypot... yes
checking for copysign... yes
configure: creating ./config.status
config.status: creating makefile
config.status: creating config.h
config.status: config.h is unchanged
/bin/sh mkinstalldirs /Users/xiaohuizhou/python/bin /Users/xiaohuizhou/python/lib /Users/xiaohuizhou/python/include
for i in libcsa.a; do \
      /usr/bin/install -c -m 644 $i /Users/xiaohuizhou/python/lib/$i; \
   done
for i in csa.h; do \
      /usr/bin/install -c -m 644 $i /Users/xiaohuizhou/python/include; \
   done
for i in csabathy; do \
      fname=`basename $i`; \
      /usr/bin/install -c $i /Users/xiaohuizhou/python/bin; \
   done
Using prefix /Users/xiaohuizhou/python
Using libdir /Users/xiaohuizhou/python/lib
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking for ar... ar
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking nn.h usability... yes
checking nn.h presence... yes
checking for nn.h... yes
checking csa.h usability... yes
checking csa.h presence... yes
checking for csa.h... yes
checking for main in -lm... yes
checking for main in -lnn... yes
checking for main in -lcsa... yes
checking for ANSI C header files... (cached) yes
checking for strcasecmp... yes
checking for strerror... yes
checking for isnan... yes
configure: creating ./config.status
config.status: creating makefile
config.status: creating gridutilsconfig.h
config.status: gridutilsconfig.h is unchanged
  installing libgu.a
  installing libgu.so
  installing gridmap.h
  installing gucommon.h
  installing gridnodes.h
  installing getbound
  installing getnodes
  installing insertgrid
  installing setbathy
  installing subgrid
  installing xy2ij
  installing gridbathy
Using prefix /Users/xiaohuizhou/python
Using libdir /Users/xiaohuizhou/python/lib
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking for ar... ar
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking for main in -lm... yes
checking for tgamma... yes
checking complex.h usability... yes
checking complex.h presence... yes
checking for complex.h... yes
checking for clog... yes
checking for cexp... yes
-n checking for keyword _Complex...
yes
checking gridnodes.h usability... yes
checking gridnodes.h presence... yes
checking for gridnodes.h... yes
checking for gridnodes_readnextpoint in -lgu... yes
configure: creating ./config.status
config.status: creating makefile
config.status: creating config.h
config.status: config.h is unchanged
make: Nothing to be done for `lib'.
make: Nothing to be done for `shlib'.
  installing gridgen
  installing gridgen.h
  installing libgridgen.a
  installing libgridgen.so
installing scrip...
gfortran -g -fdefault-real-8 -ffixed-form -O2 -fPIC -Inf-config not yet implemented for cmake builds/include -c ./kinds_mod.f
gfortran: error: not: No such file or directory
gfortran: error: yet: No such file or directory
gfortran: error: implemented: No such file or directory
gfortran: error: for: No such file or directory
gfortran: error: cmake: No such file or directory
gfortran: error: builds/include: No such file or directory
make: *** [kinds_mod.o] Error 1
gfortran -g -fdefault-real-8 -ffixed-form -O2 -fPIC -Inf-config not yet implemented for cmake builds/include -c ./kinds_mod.f
gfortran: error: not: No such file or directory
gfortran: error: yet: No such file or directory
gfortran: error: implemented: No such file or directory
gfortran: error: for: No such file or directory
gfortran: error: cmake: No such file or directory
gfortran: error: builds/include: No such file or directory
make: *** [kinds_mod.o] Error 1
/bin/cp ./scrip /Users/xiaohuizhou/python/bin
cp: ./scrip: No such file or directory
make: *** [install] Error 1
cp: scrip*.so*: No such file or directory

Done installing pycnal...
pycnal make use of the so-called gridid file to store
grid information like the path to the grid file, the
number of vertical level, the vertical transformation
use, ...
Please set the environment variable PYCNAL_GRIDID_FILE
to point to your gridid file. A gridid file template
is available here:
/Users/xiaohuizhou/Documents/python_tools/PyCNAL-master/pycnal/pycnal/gridid.txt
Press any key to continue or Ctrl+C to quit this install


Top
  
Reply with quote  
PostPosted: Tue Mar 13, 2018 4:08 am 
Offline
User avatar

Joined: Tue Jul 01, 2003 4:12 am
Posts: 508
Location: NIWA
I get a similar error building pyroms (python3 branch):

https://github.com/ESMG/pyroms/tree/python3

The system is Python 3.6, Miniconda, CentOS 7. The warning is
Code:
Warning: distutils distribution has been initialized, it may be too late to add an extension _interp
Warning: distutils distribution has been initialized, it may be too late to add an extension _obs_interp
Warning: distutils distribution has been initialized, it may be too late to add an extension _remapping
Warning: distutils distribution has been initialized, it may be too late to add an extension _remapping_fast
Warning: distutils distribution has been initialized, it may be too late to add an extension _remapping_fast_weighted
Warning: distutils distribution has been initialized, it may be too late to add an extension _iso

and sure enough, when I try to import pyroms it fails on _obs_interp, _remapping, etc.

A Google search finds this message cropping up in connection with NumPy in a number of different contexts. I think it is probably generated by this file

https://github.com/numpy/numpy/blob/master/numpy/distutils/misc_util.py

at lines 1516-1520. The discussion here may cast some light:

https://github.com/numpy/numpy/issues/2434

You haven't solved this, have you? :roll:


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 13, 2018 6:13 am 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3502
Location: IMS/UAF, USA
I don't know about that one, but I avoided this one recently:
Code:
gfortran -g -fdefault-real-8 -ffixed-form -O2 -fPIC -Inf-config not yet implemented for cmake builds/include -c ./kinds_mod.f
gfortran: error: not: No such file or directory
gfortran: error: yet: No such file or directory
gfortran: error: implemented: No such file or directory
gfortran: error: for: No such file or directory
gfortran: error: cmake: No such file or directory
gfortran: error: builds/include: No such file or directory
make: *** [kinds_mod.o] Error 1
On Ubuntu, I installed netcdf-fortran with apt instead of with conda:
Quote:
sudo apt install libnetcdff-dev
Be sure to use nf-config to find the fortran-netcdf because you'll still have the nc-config in conda.


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 13, 2018 10:05 pm 
Offline
User avatar

Joined: Tue Jul 01, 2003 4:12 am
Posts: 508
Location: NIWA
kate wrote:
On Ubuntu, I installed netcdf-fortran with apt instead of with conda:
Code:
sudo apt install libnetcdff-dev
Be sure to use nf-config to find the fortran-netcdf because you'll still have the nc-config in conda.


When tried to link to the system netCDF I got errors relating to libgfortran.so version incompatibilities. (Well, I definitely got errors like that at one stage, though I'm not 100% sure it was for the reason I've just given. It was a bit chaotic there for a while.)

So I used the conda netCDF and worked around the lack of a functional nf-config by specifying INCDIR, LIBDIR, and LIB explicity, just like we used to do in the Dark Ages. It isn't too hard in this case because the only libraries you need to link to are libnetcdff and libnetcdf.

Regarding my problem, I have found that "python setup.py build" creates a .so file for each extension, eg. for _obs_interp it creates _obs_interp.cpython-36m-x86_64-linux-gnu.so. If I cd to the directory containing this file, I can import it into Python with "import_obs_interp" and the resulting module has sensible looking attributes. So I should be able to get the extensions working in pyroms by copying the .so files to the appropriate directory (in my case ~/.local/lib/python3.6/site-packages/pyroms) and modifying __init__.py to import them. I don't know why "python setup.py install" has not done this for me. It does seem to be related to the warning (distutils distribution has been initialized, it may be too late to add an extension) but it might be something else. I need to learn about distutils.

One of the things that appeals to me about Python is the alleged ease in extending it with C and Fortran code. Well, creating extensions does seem straightforward, but the whole setup system is a bit of a challenge to me at the moment. :shock:


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 13, 2018 10:24 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3502
Location: IMS/UAF, USA
Let me know when you figure it all out! What's in there now is from Fred who has moved on to other jobs. He's still interested in Python, though, talking about xarray and pandas and all.

I'm getting emails about pyroms suddenly, right when the guys want to scrap it and start over.


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 14, 2018 1:00 am 
Offline
User avatar

Joined: Tue Jul 01, 2003 4:12 am
Posts: 508
Location: NIWA
kate wrote:
I'm getting emails about pyroms suddenly, right when the guys want to scrap it and start over.


I want to develop my own library of Python software for ROMS. It seems to me that the key components will be conda, python3, xarray & dask, esmf and matplotlib. The missing component is the vertical coordinate.

The only actual analysis task I've tried so far is an EOF analysis of depth-average velocities to establish spatial and temporal patterns of transport in Cook Strait, New Zealand. I was blown away by the convenience and power of xarray and the quality of the eofs package.

But before I go further I want to understand what's out there already, what it does and doesn't do, whether it could be improved. As far as I can tell, the only games in town are pyroms and PyCNAL. All I can say at the moment about pyroms is that the installation is...interesting. I wouldn't presume to suggest scrapping it and starting over, but if that is what your people want to do then I heartily agree. :D


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 14, 2018 2:23 am 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3502
Location: IMS/UAF, USA
Well, needs evolve. The gang wants to build tools that work with more than one model, supporting ROMS, MOM6, Mitgcm in an object-oriented way.


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 14, 2018 2:41 am 
Offline
User avatar

Joined: Tue Jul 01, 2003 4:12 am
Posts: 508
Location: NIWA
kate wrote:
Well, needs evolve. The gang wants to build tools that work with more than one model, supporting ROMS, MOM6, Mitgcm in an object-oriented way.


Too much for a bear of little brain like me, I suspect.

So, will pyroms development cease?


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 14, 2018 3:54 am 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3502
Location: IMS/UAF, USA
m.hadfield wrote:
So, will pyroms development cease?
It doesn't have to. It's been limping along for years without a real vision. No reason that can't continue. Any reasonable pull requests will be honored.


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 14, 2018 5:10 am 
Offline
User avatar

Joined: Wed Jul 13, 2011 12:37 pm
Posts: 8
Location: IMCS Rutgers
Hi Mark & Kate,

There seem to be several projects (more or less advanced) by people interested in
using xarray, dask, esmf,... Our original idea with PyCNAL is to have several modules,
based on a PyCNAL-core lib (containing grid objects "a la pyroms") with a module for
grid generation, regridding (cf https://github.com/ESMG/PyCNAL_regridding)
and analysis functions (transports,sections,...). Ideally this would work with both ROMS
and MOM6. Now I am moving to MITgcm so I'd love to be using the same package for everything.

Feel free to email me if you want to discuss more about it.


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 14, 2018 3:20 pm 
Offline

Joined: Sun Jul 27, 2003 6:49 pm
Posts: 84
Location: UNH, USA
Dear All,

The errors of the type
Code:
Warning: distutils distribution has been initialized, it may be too late to add an extension _interp
Warning: distutils distribution has been initialized, it may be too late to add an extension _obs_interp


are a bit of a red herring. You can make the codes work by copying the *.so files as suggested in the installation instructions. I have recently and successfully re-installed pyroms on an OS X and Linux box.


Jamie


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 20, 2018 6:44 am 
Offline

Joined: Tue Oct 07, 2008 11:27 am
Posts: 22
Location: MetOcean - New Zealand
I still happily use pyroms as well. I can see the advantages of making something work across different models. I think it's an interesting balance. You have to make the abstractions more generic and might not be able to fully map each model objects into one library, what will eventually result in stripping out useful features of each model in favour of making it work for all of them. Of course, inheritance is a powerful python feature to help with that, where base classes can resolve the more generic problem and more specialised classes will drill into each model-specific functionality. Maintainability can become tricky if inheritance gets too complex. I have not much knowledge on how the other models in the mix work, but IMHO, ROMS is a big enough monster to have a dedicated library.

Mark, to share my experience at installing pyroms, I came up with the below recipe, which works in a Centos 7 based system. I've done this a while back, and can't remember why I had to leave those numpy and scipy installs to the end, and also to manually create those links. Note that I'm not using conda to manage my python environment.

Code:
    cd /local_source &&\
    git clone --depth=1 https://github.com/ESMG/pyroms.git &&\
    cd /local_source/pyroms/pyroms_toolbox &&\
    python setup.py build &&\
    python setup.py install &&\
    cd /local_source/pyroms/bathy_smoother &&\
    python setup.py build &&\
    python setup.py install &&\
    cd /local_source/pyroms/pyroms/external/nn &&\
    ./configure &&\
    make &&\
    make install &&\
    cd /local_source/pyroms/pyroms/external/csa &&\
    ./configure &&\
    make &&\
    make install &&\
    cd /local_source/pyroms/pyroms/external/gridutils &&\
    ./configure &&\
    make &&\
    make install &&\
    cd /local_source/pyroms/pyroms/external/gridgen &&\
    ./configure &&\
    make &&\
    make lib &&\
    make shlib &&\
    make install &&\
    cd /local_source/pyroms/pyroms &&\
    python setup.py install &&\
    chmod ugo+x /usr/local/lib/libgridgen.so &&\
    chmod ugo+x /usr/local/lib/libgu.so &&\
    cd /usr/lib64/python2.7/site-packages/pyroms/ &&\
    ln -s /usr/local/lib/libgridgen.so . &&\
    ln -s /usr/local/lib/libgu.so &&\
    cd /usr/lib64/ &&\
    ln -s /usr/local/lib/libgridgen.so &&\
    ln -s /usr/local/lib/libgu.so

    # Not sure which of these packages is crashing the pyroms setup.py install
    # so leaving them to be installed after it

    pip install numpy==1.12.0 scipy==0.17.0


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group