Python Forum

Full Version: Python Interface for HWM14
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am relatively new in python and also new in this forum. Please forgive me if my question does not make any sense to you.
My problem is,
I am trying to retrieve HWM14 model data (model output)by running python interface for the Horizontal Wind Model version 2014 (HWM14). the scripts and programs I am trying to run were posted by Ronald Ilma at this link <https://github.com/rilma/pyHWM14>. I followed all the instructions provided by Ronald Ilma in the website and tried running these few lines as suggested at the end. However, I got an error at the very beginning and could not get the script running further. Could anyone please help me why I am getting this error and how I fix it. The error is saying 'No Module named "pyhwm2014"'. I am not sure where that module located in the programs listed and what the problem is. I have attached the lines of python script that I used here as below.
#####
from pyhwm2014 import HWM14, HWM14Plot
Traceback (most recent call last):

File "<ipython-input-1-46abbd3403b2>", line 1, in <module>
from pyhwm2014 import HWM14, HWM14Plot
ModuleNotFoundError: No module named 'pyhwm2014'
###
Thank you in advance for your help on this.

SDipti.
Hi I have the same problem. I cannot run the codes.
Is pyhwm2014 folder in the same directory as the python script?
Hi Terafy,

Thank you very much for the response. Yes, pyhwm2014 folder is in the same directory as the python script is in. But still the same problem. I just wanted to retrieve HWM14 model output and unfortunately getting stuck with this.

####
from pyhwm2014 import HWM14, HWM14Plot
File "<ipython-input-1-46abbd3403b2>", line 1, in <module>
from pyhwm2014 import HWM14, HWM14Plot
ModuleNotFoundError: No module named 'pyhwm2014'
###

I also tried running the fortran script directly from command line using gfortran command, but also got the problem as

#########
gfortran hwm14.f90

/usr/lib/gcc/i686-pc-cygwin/5.4.0/../../../libcygwin.a(libcmain.o): In function `main':
/usr/src/debug/cygwin-2.8.0-1/winsup/cygwin/lib/libcmain.c:37: undefined reference to `WinMain@16'
collect2: error: ld returned 1 exit status
######

Any help to get this solved would be highly appreciated.

Thanks again.
Well... I'm using python 3.6.3 IDLE. I get a different error.

Error:
Traceback (most recent call last): File "C:\Users\WONG\Desktop\Random\pyHWM14-master\test.py", line 4, in <module> from pyhwm2014 import HWM14, HWM14Plot File "C:\Users\WONG\Desktop\Random\pyHWM14-master\pyhwm2014\__init__.py", line 7, in <module> from . import hwm14 ImportError: cannot import name 'hwm14'