Thanks to Steve Kaeppler who pointed out this model to me, I have trivially wrapped the GLOW auroral VER model in Python, making it very easy to use the GLOW model from Python. I am still working on this so please leave a comment or email if it’s missing something you need (which is likely).
I would like to complement Solomon’s team who generally wrote the Fortran 77 code without excessive legacy techniques and syntax errors, which made the porting much faster. I only had to make minimal modifications to bring the code up to Fortran 77 standards.
F2PY is a great package allowing you to run a lot of Fortran code from Python. Fortran 77 code naturally has a high chance of success.
Fortran 90 code can also work, but very elaborate Fortran 90 code may not work.
On Linux, all you need to do is
sudo apt-get install python-numpy gfortran
On Windows, the f2py setup is more involved. You need the MinGW compiler and to modify your system path. I assume here that you have Anaconda Python with Numpy 1.9 installed already. This procedure was used on a 64-bit Windows 10 machine.
1) install MinGW-W64 with the setup settings:
Version 4.9.2 (or newer)
Build revision: 2
2) Insert the mingw bin path to your system path. I did this permanently by going into Windows Advanced System Settings, Environment Variables, System variables, Path, and at the end put:
check to see if that’s where your gfortran.exe is at.
test your installation by say using the lowtran7 code.
Following the instructions there, you should get a lowtran7.pyd file that is invoked when running python pylowtran7.py and you’ll see a plot of atmospheric loss.
Note: If you get the “NotImplementedError: Only MS compiler supported with gfortran on win64″, that is still occurring with Numpy 1.9.2, but has been patched in the master branch (to be released in a future version of Numpy). You can patch this yourself in c:\Anaconda\Lib\site-packages\numpy\distutils\fcompiler\gnu.py on line 337. Comment out the raise NotImplementedError(...)
and simply replace with the word pass
and you’ll be working.
Build Octave GUI: yes
JIT compiler for loops: yes
Build Java interface: yes
Do internal array bounds checking: no
Build static libraries: no
Build shared libraries: yes
Dynamic Linking: yes (dlopen)
Include support for GNU readline: yes
64-bit array dims and indexing: no
OpenMP SMP multithreading: yes
Build cross tools: no
With the only Warning being about JAVA_HOME not defined.
Then I typed
Of course, on the Raspberry Pi and Beaglebone, most people are using Debian/Ubuntu so type apt-get instead of opkg.
Some people prefer BlueZ4 over Bluez5, in part because some features were moved around or descoped in BlueZ5, but BlueZ5 can be easier to work with otherwise. The Intel Edison Bluetooth manual uses BlueZ5 to play sound from the Edison over Bluetooth headphones, to send text with Android phones, etc. Check out the manual!
List Wireless devices:
$ rfkill list
The listing will include:
2: bcm43xx Bluetooth: bluetooth
Soft blocked: yes
Hard blocked: no
Unblock Bluetooth devices:
$ rfkill unblock bluetooth
We now see another device:
3: hci0: bluetooth
Soft blocked: no
Hard blocked: no
I have updated the syntax of the original Fortran code slightly to fit with the FORTRAN 77 standard (not changing algorithm behavior, only syntactical correctness). As a byproduct, I have made demo plotting code available in Python that uses f2py to make the LCPFCT run from Python at an order 50x speedup overall since you don’t have to write output to disk and then read it back in via a custom parsing algorithm.
You will need a 32-bit winearch. Typically your default .wine directory is 64-bit. Let’s leave that alone and create a new 32-bit wineprefix and setup Goldwave 5. (Goldwave 6 is not WINE compatible as of WINE 1.6).
Download Goldwave 5 to your ~/Downloads directory.
Once you’ve installed Goldwave 5, press the F11 key to open Control Properties, then select the System tab, and click the “Use DirectSound AP” radio button. You can test your setup by clicking the Device tab, and the Test playback button, you should hear a brief test tone. Click OK to save this setting.
You should be able to create new/save/play sound files (this gives Goldwave 5 a WINE Silver rating I think)
At this time, Goldwave 6 is not compatible with WINE that I know of. I get the following errors from Goldwave 6 after installing and trying to run Goldwave 6 in a 64-bit Windows 7 wineprefix:
err:module:import_dll Library BTHPROPS (which is needed by L"C:\\Program Files\\GoldWave\\GoldWave.exe") not found
err:module:import_dll Library BLUETOOTHAPIS (which is needed by L"C:\\Program Files\\GoldWave\\GoldWave.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"C:\\Program Files\\GoldWave\\GoldWave.exe" failed, status c0000135
I had a micro SD card that would only mount read-only, in Gparted and everywhere else, even as root. I moved the SD adapter read-only switch to either position, tried it in different readers, different computers.
Then I tried a different SD adapter and read/write worked. Hmm, threw away that SD adapter!