Installing xlma, etc.

Prerequisites

Installing xlma

For version: 7 March 2005 distribution from NMT

Create an folder to hold xlma in your home directory. I have mine in a subfolder that holds all my idl routines. Pick any name you'd like.

cd ~/idl/
mkdir xlmastuff

Download the most recent xlma, lma_lib, and idl_lib. You can find a copy on the NMT STEPS page or on the common drive in FRDD/ebruning. There is a new version of xlma (only available on the common drive) that was updated in May 2005 to read the output of the new LMA processing software.

Move the three .tar.gz files to the directory you just created and unzip them.

tar -zxvf idllib_03-07-05.tar.gz
etc...
You should see a new directory for each:
ls prints
idllib                  lma_lib                 xlma
idllib_03-07-05.tar.gz  lma_lib_03-07-05.tar.gz xlma-test_05-24-05.tar.gz

There's an incompatible version of of the file_date routine in lma_lib. Deal with this by going into the lma_lib directory and changing the name of file_date.pro to file_dateold.pro

Open idlde and go to File->Preferences..., and click on the Paths tab. Click insert and navigate to the directory with the idllib, lma_lib and xlma directories. When the directory you want is listed under Selection, click OK. Repeat for each directory. My IDL path preference window looks like the image below:

The bottom three listings are for xlma. Click apply, save and dismiss.

Go to the command prompt at the bottom of the idlde window, and type:

xlma, state
You'll be asked to locate the lma_lib directory. Do so. If asked any questions about saving preferences to a file, say yes. xlma should be ready to go.

Upgrading xlma

If you're upgrading an earlier installation rename your old xlma installation to a different name. Then simply recreate the same directory structure with your new installation, roughly following the outline above. Your old paths should still work. This is helpful in case the new version breaks something you need; the old version is still around if you need it.

If anything crashes, which it did for me when recently upgrading, you probably have an incompatible version of the xlma prefs file lying around. It's called prefs.txt. Find it:

find ~/. -name "prefs.txt"
and rename it to something like prefs.lmaold.txt.

To let xlma read in vector E merge files, open read_balloon.pro. Change line 195 from data = {Eh:0.0, Ez:0.0, ... to data = {Eh:0.0,Ex:0.0, Ey:0.0, Ez:0.0,... . Reading the balloon data via the xlma menu command still won't properly load the balloon data, but you'll need to do this anyway to let xlma know it has balloon data. After doing that, run read_bal_3d, state . This routine is included in the brawl3d package. Check the command line when you read in the data. For 2003 and 2004 data, you should see a message "Leaving E polarity as in file," while for 2000 (STEPS) data you should see no message. The STEPS data had a different (non-standard) convention for E polarity, and is corrected to the standard interpretation (E = +x, N = +y, Up = +Z) when it's read in.

In balloon_plot_e_field, add if (n_wb lt 2) then w_b = [0,1] on line 71 below where w_b and n_wb are assigned. This hackish fix prevents a crash if the currently selected time in xlma doesn't overlap with the balloon.

In the most recent version of xlma, the way the balloon data is stored in state has been changed. This means read_bal_3d, and all the other code written by Norman folks to deal with state is no longer compatible with xlma. A quick fix is to change the last few lines of read_bal_3d to

ptr_free (*(*state).balloon).balloon_pos
(*(*state).balloon).balloon_pos = PTR_NEW(balloon_pos)
This change then breaks brawl3d when state has balloon data loaded through xlma. Change line 2358 of brawl3d from brawl_replace_balloons, info, (*(*state).balloon) to brawl_replace_balloons, info, (*(*(*state).balloon).balloon_pos)

Installing brawl3d

Create an folder to hold brawl3d in your home directory. I have mine in a subfolder that holds all my idl routines. Pick any name you'd like.

cd ~/idl/
mkdir brawl3d
cd brawl3d
Grab the latest version from FRDD/ebruning on the common drive and put it in the directory you just created. Exapand it:
tar -zxvf brawl3d_050104.tar.gz
You should see lots of .pro files when you issue an ls.

Start idlde and go to File->New->Project... . Create a new project (brawl3d.prj) in your brawl3d directory. IDL will create a file that keeps track of what files are associated with the project.

Add all the files in the brawl3d directory to the project. Go to Project->Add/remove files... and navigate to the brawl3d directory. Change the filter to *.pro, and add all .pro files. Shift click to select a range of files instead of moving them one at a time. Once you've added all the files, click ok. In the file menu, tell IDL to save the project.

In the project section of the IDL interface, you should be see brawl3d.prj, and if you expand the source folder, a list of the files you just added. Right click on radar_colors.pro->properties and uncheck the compile file box.

The name_it routine needs to be compiled before the routine that calls it:

  1. Go to the brawl3d project window where it lists all the source files
  2. Click on the "Build Order" tab at the bottom
  3. Scroll through the list, find name_it, and click on it to highlight it
  4. Use the little arrows (triangles) at the bottom of the project to move name_it to the top of the list
  5. In the file menu, choose "Save Project"

Click the little gear button above the project file listing to compile the files. You can also go to Project->Compile->All files. brawl3d should be all set to go.

Using and gridding KOUN product files

Converting KOUN data from sweeps stored in product files to UF as well as cartesian grids requires a few pieces of software:

These setup instructions deal with installing RSL and uf_radar, and with using RSL to convert the data.

Obtain RSL and uf_radar from the common drive. The most recent versions are:

RSL versions before 23 June 2005 contain some rounding errors that affect the polarimetric fields.

Set up the directory structure for the two packages:

cd your/idl/code/directory
mkdir rsl
mv rsl_ecb_20050524.tar rsl
mv rslapps_ecb_20050524.tar rsl
cd rsl
tar -xvf rsl*.tar
cd ..
mkdir uf_radar
mv uf_radar_052405b.tar uf_radar
tar -xvf uf_radar_052405b.tar
Once these are in place, add the paths to your idl preferences as above. The screenshot above shows how rsl and uf_radar are installed on my machine. Note that you can add the base rsl directory, and have IDL search all directories inside it by checking the box next to the path.

To convert to UF, simply run koun_makeuf from the command line in IDL. You will be prompted for the directory containing the product files you wish to combine as a UF volume. Typically, the product data for many volumes reside in the same directory. Once you choose the directory, you will be presented with a list of volumes within the directory. Choose the volume you want, and the software will go about converting the data. The final UF file will be named KOUN_YYYYMMDD_HHMMSS.uf. This file can be used with uf_radar, and is also the raw data input to the reorder for gridding.

Running uf_radar is pretty simple. From the IDL command line, start it with uf_radar. If you want to load LMA and balloon data, the easiest way to do this is to load both into xlma first, and then start uf_radar with uf_radar, state. Once you've loaded radar data, you may then choose to "Balloon:Read balloon data from xlma state" if a balloon has been loaded in xlma. Note that the "Balloon:Select a file and open" doesn't work for TELEX data, since the file format changed, placing lat and lon in different columns.

Installing koun raw data gridding (Obsolete)

Instructions are like those for brawl3d: create a project, add files, and compile.

Running it:

read_koun_volume
run_raw_gridding,'/data/radartest.sav', '/data/2004/KOUN/GRID/',
                 [0,1,150,16],radarID='KOUN'
where /data/radartest.sav is the file saved by read_koun_volume, and the directory you want to save to has a trailing slash.

Eric Bruning