Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IRI16 "Error: IF clause at (1) requires a scalar LOGICAL expression" #142

Open
bzossi opened this issue Nov 23, 2021 · 1 comment
Open

Comments

@bzossi
Copy link

bzossi commented Nov 23, 2021

Hi there. I upgraded to ubuntu 21 and had to reinstall everything.
All was fine, except I can't install pyglow. On installation step "python3 setup.py install --user" got the following error

gfortran:f77: src/pyglow/models/dl_models/iri16/cosd_sind.for
gfortran:f77: src/pyglow/models/dl_models/iri16/iritec.for
gfortran:f77: src/pyglow/models/dl_models/iri16/irisub.for
gfortran:f77: src/pyglow/models/dl_models/iri16/iriflip_modified.for
extra f77 options: '-std=legacy -w -O2 -fbacktrace -fno-automatic -fPIC'
gfortran:f77: build/src.linux-x86_64-3.9/src/pyglow/models/dl_models/iri16/iri16py-f2pywrappers.f
src/pyglow/models/dl_models/iri16/irisub.for:1758:14:

 1758 |                         type*,xf2,nmes,nmes-xf2,xe3_1(hlow),nmes-xe3_1(hlow)
      |                                   1
Error: Invalid character in name at (1)
src/pyglow/models/dl_models/iri16/irifun.for:438:11:

  438 |         if(F1REG) H2BAR=HMF1*(1.0-((HMF1-HAHA)/HMF1)**(1.0+C1))
      |           1
Error: IF clause at (1) requires a scalar LOGICAL expression
error: Command "/usr/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -fPIC -O3 -funroll-loops -Ibuild/src.linux-x86_64-3.9/build/src.linux-x86_64-3.9/src/pyglow/models/dl_models/iri16 -I/home/bzossi/.local/lib/python3.9/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.9/numpy/distutils/include -I/usr/include/python3.9 -c -c src/pyglow/models/dl_models/iri16/irisub.for -o build/temp.linux-x86_64-3.9/src/pyglow/models/dl_models/iri16/irisub.o -std=legacy -w -O2 -fbacktrace -fno-automatic -fPIC" failed with exit status 1

Installation goes through all other models but stops at IRI16, my current version is gfortran 11.
When I try to import numpy on python3 get the error:
ImportError: cannot import name 'iri_sub' from 'iri16py' (/home/bzossi/.local/lib/python3.8/site-packages/iri16py.cpython-38-x86_64-linux-gnu.so).

@bzossi
Copy link
Author

bzossi commented Nov 25, 2021

Well, Second error apparently solved by adding "LOGICAL :: F1REG" before line 438 in irifun.for.
But:
ImportError: cannot import name 'iri_sub' from 'iri16py' keeps popping up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant