Suppose (for example) all the CODAS programs were extracted into c:\w\programs. You need to
These instructions use the Control Panel to set these variables. On a recent Windows XP installation no reboot was necessary after making the changes, but rebooting (or at least calling up a new C-prompt window) may be required.
To change these using Windows tools, as administrator, go to Settings : Control Panel : System : Advanced : Environment Variables and edit the following two entries.
Note
These paths are delimited by semicolons.
The environment variables to alter are:
PATH (modify) allows the command line to find the program without the full path). This will include executables and the python program itself
add these to PATH:
- C:\w\programs\codas3\bin\win32 (for executables)
- C:\w\programs\pycurrents\adcp (for .py scripts)
- C:\w\programs\pycurrents\data\nmea (NMEA parsing programs)
PYTHONPATH (new variable) allows python to find the modules it needs to load
create a new variable called PYTHONPATH with this entry:
- C:\w\programs
You should also go into your matlab path editor and add
C:\w\programs\matlab(the path to the UH programs directory) to the path, and save it. Any time you run matlab programs you should type “adcppath; radcppath” to add the appropriate programs to your path. Alternatively, run the commands once, then go to “Set Path” and “Save”.
IMPORTANT: See this link for more information about the mex file “table1” we use for linear interpolation. This is important to get right and becomes more difficult with each new matlab release.
Any time you are going to run CODAS matlab code, type the following first to add the specific paths that are used.
adcppath; radcppath; mexpath
Make sure the “properties” of a python files (\*.py) are associated with c:\python25\python.exe (whatever your python executable is). ActiveState Python sets this up automatically. I have not tested python.org.
Open the folder C:\w\programs\pycurrents\adcp in Windows Explorer
Right-click “quick_adcp.py” and verify that the default item in “Open With” is Python.
If it is not, click “Open With” to choose the program that you want.
Click “Choose Program...” to choose the program you want.
Browse to your Python installation (eg. C:\Python26) and click on Python.exe
Select the “Always use the selected program” to open this kind of file check box if it is not selected. Click OK.
Note From now on, Windows XP will open all files that have this file name extension in the program that you selected. To change this, you must follow these steps again and associate a different program with this file name extension.
Note