ESMG / pyroms

Python tools for the Regional Ocean Modeling System (ROMS)
Other
141 stars 88 forks source link

Problem with installing scrip in install_pyroms.sh #19

Closed MathewBiddle closed 5 years ago

MathewBiddle commented 5 years ago

After following the instructions and having successful build and installs for pyroms_toolbox and bathy_smoother I get the following error at the end of install_pyroms.sh:

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

It looks like nf-config is causing problems? https://github.com/Unidata/netcdf-fortran/issues/60

When I open python and import pyroms I get the following ModuleNotFoundError:

>>> import pyroms
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "[path to my pyroms folder]/pyroms/pyroms/__init__.py", line 19, in <module>
    from . import tools
  File "[path to my pyroms folder]/pyroms/pyroms/tools.py", line 4, in <module>
    import _iso
ModuleNotFoundError: No module named '_iso'

I assume they are connected?

kshedstrom commented 5 years ago

This is actually two completely different problems. I ran into both of them today, trying for a clean, fresh build.

  1. The nf-config thing for me is coming from the netcdf that came in when Anaconda installed ESMF. I got around it by pointing to an older nf-config that still works.

  2. The "import _iso" line needs to be "from . import _iso". I'll push a fix for these things tomorrow. It's some change due to a Python update.

MathewBiddle commented 5 years ago

Thanks! Any thoughts on adding this to conda-forge for easier conda install?

MathewBiddle commented 5 years ago

I was having the same trouble with import _interp and import _remapping. I tried adjusting them to from . import _interp and from . import _remapping, but that was unsuccessful.

Commenting those import statements out lets me import pyroms without error... Obviously those functions wont work when I try to use them, but at least I can import pyroms.

kshedstrom commented 5 years ago

Some of them need to be "from pyroms import _remapping". I just pushed my updates - see if that works for you.

I tried changing from numpy.distutils to setuputils and it failed because the latter doesn't understand Fortran. I think it would take me a lot of flailing to get this onto conda-forge. It's just not my current priority - better to start trying out xarray.